X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fimap.el;h=d4d40238656d2f29a3f80e225e8c56c8a50c95c5;hb=b74fac078f05fa78c65ef6ac22a644331120f096;hp=f26590fda4aa0f41a660a7ae39589a316a521f78;hpb=4dc0c478fdf39b896a5185812101be972b98d5c7;p=elisp%2Fgnus.git- diff --git a/lisp/imap.el b/lisp/imap.el index f26590f..d4d4023 100644 --- a/lisp/imap.el +++ b/lisp/imap.el @@ -1,7 +1,7 @@ ;;; imap.el --- imap library ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005 Free Software Foundation, Inc. +;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Simon Josefsson ;; Keywords: mail @@ -176,8 +176,7 @@ the list is tried until a successful connection is made." :type '(repeat string)) (defcustom imap-gssapi-program (list - (concat "gsasl --client --connect %s:%p " - "--imap --application-data " + (concat "gsasl %s %p " "--mechanism GSSAPI " "--authentication-id %l") "imtest -m gssapi -u %l -p %p %s") @@ -588,6 +587,13 @@ sure of changing the value of `foo'." (while (and (memq (process-status process) '(open run)) (set-buffer buffer) ;; XXX "blue moon" nntp.el bug (goto-char (point-min)) + ;; Athena IMTEST can output SSL verify errors + (or (while (looking-at "^verify error:num=") + (forward-line)) + t) + (or (while (looking-at "^TLS connection established") + (forward-line)) + t) ;; cyrus 1.6.x (13? < x <= 22) queries capabilities (or (while (looking-at "^C:") (forward-line)) @@ -596,6 +602,10 @@ sure of changing the value of `foo'." (or (not (looking-at "S: ")) (forward-char 3) t) + ;; GNU SASL may print 'Trying ...' first. + (or (not (looking-at "Trying ")) + (forward-line) + t) (not (and (imap-parse-greeting) ;; success in imtest 1.6: (re-search-forward @@ -1090,8 +1100,11 @@ necessary. If nil, the buffer name is generated." stream)) ;; We're done, kill the first connection (imap-close buffer) - (kill-buffer buffer) - (rename-buffer buffer) + (let ((name (if (stringp buffer) + buffer + (buffer-name buffer)))) + (kill-buffer buffer) + (rename-buffer name)) (message "imap: Reconnecting with stream `%s'...done" stream) (setq imap-stream stream)