X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fimap.el;h=0492044d83c438f2b54e5464e449d0602b0bd35b;hb=b3d3bffcc2f09659761224bf28ec3f46b4a5687d;hp=84457df02e0cec3643d7c40ccf259b85a5cb3e83;hpb=03440feabbb3101aa039ec10ff2a41d4a38c3c20;p=gnus diff --git a/lisp/imap.el b/lisp/imap.el index 84457df02..0492044d8 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -179,7 +179,12 @@ the list is tried until a successful connection is made." :group 'imap :type '(repeat string)) -(defcustom imap-gssapi-program '("imtest -m gssapi -u %l -p %p %s") +(defcustom imap-gssapi-program (list + (concat "gsasl --client --connect %s:%p " + "--imap --application-data " + "--mechanism GSSAPI " + "--authentication-id %l") + "imtest -m gssapi -u %l -p %p %s") "List of strings containing commands for GSSAPI (krb5) authentication. %s is replaced with server hostname, %p with port to connect to, and %l with the value of `imap-default-user'. The program should accept @@ -247,6 +252,16 @@ encoded mailboxes which doesn't translate into ISO-8859-1." :group 'imap :type 'string) +(defcustom imap-read-timeout (if (string-match + "windows-nt\\|os/2\\|emx\\|cygwin" + (symbol-name system-type)) + 1.0 + 0.1) + "*How long to wait between checking for the end of output. +Shorter values mean quicker response, but is more CPU intensive." + :type 'number + :group 'imap) + ;; Various variables. (defvar imap-fetch-data-hook nil @@ -548,7 +563,7 @@ sure of changing the value of `foo'." (set-buffer buffer) ;; XXX "blue moon" nntp.el bug (goto-char (point-min)) ;; cyrus 1.6.x (13? < x <= 22) queries capabilities - (or (while (looking-at "^C:") + (or (while (looking-at "^C:") (forward-line)) t) ;; cyrus 1.6 imtest print "S: " before server greeting @@ -558,7 +573,10 @@ sure of changing the value of `foo'." (not (and (imap-parse-greeting) ;; success in imtest 1.6: (re-search-forward - "^\\(Authenticat.*\\)" nil t) + (concat "^\\(\\(Authenticat.*\\)\\|\\(" + "Client authentication " + "finished.*\\)\\)") + nil t) (setq response (match-string 1))))) (accept-process-output process 1) (sit-for 1)) @@ -1729,7 +1747,11 @@ on failure." (unless (< len 10) (setq imap-have-messaged t) (message "imap read: %dk" len)) - (accept-process-output imap-process 1))) + (accept-process-output imap-process + (truncate imap-read-timeout) + (truncate (* (- imap-read-timeout + (truncate imap-read-timeout)) + 1000))))) (when imap-have-messaged (message "")) (and (memq (process-status imap-process) '(open run))