From: Lars Magne Ingebrigtsen Date: Sun, 19 Sep 2010 12:45:07 +0000 (+0200) Subject: Allow anonymous login. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=691291e24ebea292e8479f962b725f598102f37a Allow anonymous login. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d4505504..a43eed987 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-09-19 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-authenticator): New variable. + (nnimap-open-connection): Allow anonymous login. + * gnus-art.el (gnus-article-describe-briefly): Fix up typo in last patch, found by Knut Anders Hatlen. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index c27b3ec77..ce9e9e39e 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -66,6 +66,10 @@ Values are `ssl' and `network'.") This is always done if the server supports UID EXPUNGE, but it's not done by default on servers that doesn't support that command.") +(defvoo nnimap-authenticator nil + "How nnimap authenticate itself to the server. +Possible choices are nil (use default methods) or `anonymous'.") + (defvoo nnimap-connection-alist nil) (defvoo nnimap-current-infos nil) @@ -254,7 +258,10 @@ not done by default on servers that doesn't support that command.") (when (setq connection-result (nnimap-wait-for-connection)) (unless (equal connection-result "PREAUTH") (if (not (setq credentials - (nnimap-credentials nnimap-address ports))) + (if (eq nnimap-authenticator 'anonymous) + (list "anonymous" + (message-make-address)) + (nnimap-credentials nnimap-address ports)))) (setq nnimap-object nil) (setq login-result (nnimap-command "LOGIN %S %S" (car credentials)