- (unless (setq response (elmo-pop3-read-response process t))
- ;; response is NO or BAD.
- (signal 'elmo-authenticate-error
- (list (intern
- (concat "elmo-pop3-auth-"
- (downcase name))))))
- (if (string-match "^\+OK" response)
- (if (sasl-next-step client step)
- ;; Bogus server?
- (signal 'elmo-authenticate-error
- (list (intern
- (concat "elmo-pop3-auth-"
- (downcase name)))))
- ;; The authentication process is finished.
- (throw 'done nil)))
+ (setq response (elmo-pop3-read-response process t))
+ (unless (eq 'ok (car response))
+ (if (or (eq (car response) 'in-use)
+ (eq (car response) 'login-delay))
+ (error (cond ((eq (car response) 'in-use)
+ "Maildrop is currently in use")
+ ((eq (car response) 'login-delay)
+ "Not allowed to login \
+until the login delay period has expired")))
+ (signal 'elmo-authenticate-error
+ (list (intern (concat "elmo-pop3-auth-"
+ (downcase name)))))))
+ (if (sasl-next-step client step)
+ ;; Bogus server?
+ (signal 'elmo-authenticate-error
+ (list (intern
+ (concat "elmo-pop3-auth-"
+ (downcase name)))))
+ ;; The authentication process is finished.
+ (throw 'done nil))