[gnus git] branch master updated: m0-5-208-g4704a2e =1= Allow specifying the login method for nnimap

Lars Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  4704a2e650646ac28300f051cea9cab3e46fb2f4 (commit)
      from  761a84220fa9ce3292d587047f61f0f91bf68d0a (commit)


- Log -----------------------------------------------------------------
commit 4704a2e650646ac28300f051cea9cab3e46fb2f4
Author: Lars Ingebrigtsen <[email protected]>
Date:   Tue Dec 25 12:40:14 2012 +0100

    Allow specifying the login method for nnimap
    
    * nnimap.el (nnimap-authenticator): Expand to allow specifying the
    login methods.
    (nnimap-login): Respect the `nnimap-authenticator' variable.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 69558f9..b62b1ad 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
 2012-12-25  Lars Ingebrigtsen  <[email protected]>
 
+	* nnimap.el (nnimap-authenticator): Expand to allow specifying the
+	login methods.
+	(nnimap-login): Respect the `nnimap-authenticator' variable.
+
 	* gnus-sum.el (gnus-summary-push-marks-to-backend): Push the complete
 	mark state when moving articles.  Otherwise unticked articles will get
 	their ticks back after moving.
diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 3277a7f..968d1ee 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -100,7 +100,8 @@ Uses the same syntax as `nnmail-split-methods'.")
 
 (defvoo nnimap-authenticator nil
   "How nnimap authenticate itself to the server.
-Possible choices are nil (use default methods) or `anonymous'.")
+Possible choices are nil (use default methods), `anonymous',
+`login', `plain' and `cram-md5'.")
 
 (defvoo nnimap-expunge t
   "If non-nil, expunge articles after deleting them.
@@ -498,9 +499,13 @@ textual parts.")
    ;; round trips than CRAM-MD5, and it's less likely to be buggy),
    ;; and we're using an encrypted connection.
    ((and (not (nnimap-capability "LOGINDISABLED"))
-	 (eq (nnimap-stream-type nnimap-object) 'tls))
+	 (eq (nnimap-stream-type nnimap-object) 'tls)
+	 (or (null nnimap-authenticator)
+	     (eq nnimap-authenticator 'login)))
     (nnimap-command "LOGIN %S %S" user password))
-   ((nnimap-capability "AUTH=CRAM-MD5")
+   ((and (nnimap-capability "AUTH=CRAM-MD5")
+	 (or (null nnimap-authenticator)
+	     (eq nnimap-authenticator 'cram-md5)))
     (erase-buffer)
     (let ((sequence (nnimap-send-command "AUTHENTICATE CRAM-MD5"))
 	  (challenge (nnimap-wait-for-line "^\\+\\(.*\\)\n")))
@@ -513,9 +518,13 @@ textual parts.")
 			       (base64-decode-string challenge))))
 	"\r\n"))
       (nnimap-wait-for-response sequence)))
-   ((not (nnimap-capability "LOGINDISABLED"))
+   ((and (not (nnimap-capability "LOGINDISABLED"))
+	 (or (null nnimap-authenticator)
+	     (eq nnimap-authenticator 'login)))
     (nnimap-command "LOGIN %S %S" user password))
-   ((nnimap-capability "AUTH=PLAIN")
+   ((and (nnimap-capability "AUTH=PLAIN")
+	 (or (null nnimap-authenticator)
+	     (eq nnimap-authenticator 'plain)))
     (nnimap-command
      "AUTHENTICATE PLAIN %s"
      (base64-encode-string
diff --git a/texi/ChangeLog b/texi/ChangeLog
index cd3182b..8a184e8 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-25  Lars Ingebrigtsen  <[email protected]>
+
+	* gnus.texi (Customizing the IMAP Connection): Mention the other
+	authenticators.
+
 2012-12-24  Lars Ingebrigtsen  <[email protected]>
 
 	* gnus.texi (Browse Foreign Server): Document
diff --git a/texi/gnus.texi b/texi/gnus.texi
index 8fb5904..edbae06 100644
--- a/texi/gnus.texi
+++ b/texi/gnus.texi
@@ -14208,7 +14208,11 @@ what you need.
 
 @item nnimap-authenticator
 Some @acronym{IMAP} servers allow anonymous logins.  In that case,
-this should be set to @code{anonymous}.
+this should be set to @code{anonymous}.  If this variable isn't set,
+the normal login methods will be used.  If you wish to specify a
+specific login method to be used, you can set this variable to either
+@code{login} (the traditional @acronym{IMAP} login method),
+@code{plain} or @code{cram-md5}.
 
 @item nnimap-expunge
 If non-@code{nil}, expunge articles after deleting them.  This is always done

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog |    4 ++++
 lisp/nnimap.el |   19 ++++++++++++++-----
 texi/ChangeLog |    5 +++++
 texi/gnus.texi |    6 +++++-
 4 files changed, 28 insertions(+), 6 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.