From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jun 2020 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 41951@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159258851924439 (code B ref -1); Fri, 19 Jun 2020 17:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2020 17:41:59 +0000 Received: from localhost ([127.0.0.1]:56769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmL1a-0006M7-Qa for submit@debbugs.gnu.org; Fri, 19 Jun 2020 13:41:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:36710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmL1Z-0006M0-Jg for submit@debbugs.gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmL1Z-0007nV-BV for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:36622 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmL1X-0001qF-Jg for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 7FE6FFA0AC for ; Fri, 19 Jun 2020 17:41:54 +0000 (UTC) From: Eric Abrahamsen Date: Fri, 19 Jun 2020 10:41:53 -0700 Message-ID: <871rmb54wu.fsf@ericabrahamsen.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 13:37:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain IMAP servers that allow anonymous authentication advertise that fact in their capabilities as AUTH=ANONYMOUS. nnimap currently lets you take advantage of this explicitly, by setting (nnimap-authenticator anonymous) in the server definition. But this requires you to know in advance that the server allows anonymous authentication, and decide to use it. Gnus could figure this out itself and anonymously log in, using the attached patch. It seems to work fine, but there might be further consequences I haven't thought of. And possibly we'd simply prefer that settings like this be a little more explicit for the user? Does anyone have any opinions on this? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnimap-anonymous.diff diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index f306889a7f..ebb1236674 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -837,6 +837,7 @@ gnus-registry-find-keywords (completing-read "Keyword: " (gnus-registry-keywords) nil t))) (registry-lookup-secondary-value gnus-registry-db 'keyword keyword)) + (defun gnus-registry-register-message-ids () "Register the Message-ID of every article in the group." (unless (gnus-parameter-registry-ignore gnus-newsgroup-name) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3c4e75ede8..18d3cba173 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -509,7 +509,8 @@ nnimap-open-connection-1 (split-string capabilities))) (unless (string-match-p "[*.] PREAUTH" greeting) (if (not (setq credentials - (if (eq nnimap-authenticator 'anonymous) + (if (or (eq nnimap-authenticator 'anonymous) + (nnimap-capability "AUTH=ANONYMOUS")) (list "anonymous" (message-make-address)) ;; Look for the credentials based on --=-=-=-- From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Abrahamsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.15951208511680 (code B ref 41951); Sun, 19 Jul 2020 01:08:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 01:07:31 +0000 Received: from localhost ([127.0.0.1]:59526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwxnf-0000R2-7w for submit@debbugs.gnu.org; Sat, 18 Jul 2020 21:07:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwxnb-0000Qk-St for 41951@debbugs.gnu.org; Sat, 18 Jul 2020 21:07:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wfbocPXs+6suQ9bk4nMHJRW5zPZc1gmlH1e4rSdFly8=; b=Ht5ud0PmjSZ5etLcP2kPgUNrFK KucT+GWtdTP6Bi/z2P626hu1HmcjCASqOW+gytFr+XB/PAKd97rMM8AtOmtfVtrafCMAUCsBuDKDG Wxs+4z08SosHnhmHfmwbpm9aWRhSB2UTDMtbJHJKT706sDN8NS6nWHoRawz3/Al1sYvg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwxnQ-0007MZ-0a; Sun, 19 Jul 2020 03:07:22 +0200 From: Lars Ingebrigtsen References: <871rmb54wu.fsf@ericabrahamsen.net> Date: Sun, 19 Jul 2020 03:07:14 +0200 In-Reply-To: <871rmb54wu.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 19 Jun 2020 10:41:53 -0700") Message-ID: <87mu3wwbwd.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > Gnus could figure this out itself and anonymously log in, using the > attached patch. It seems to work fine, but there might be further > consequences I haven't thought of. And possibly we'd simply [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > Gnus could figure this out itself and anonymously log in, using the > attached patch. It seems to work fine, but there might be further > consequences I haven't thought of. And possibly we'd simply prefer that > settings like this be a little more explicit for the user? Would this interfere with logging in normally with your own user name? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 03:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159512845914717 (code B ref 41951); Sun, 19 Jul 2020 03:15:01 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 03:14:19 +0000 Received: from localhost ([127.0.0.1]:59802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzmM-0003pJ-T9 for submit@debbugs.gnu.org; Sat, 18 Jul 2020 23:14:19 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:38592 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzmK-0003p6-Nw for 41951@debbugs.gnu.org; Sat, 18 Jul 2020 23:14:17 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 0E8CFFA0B2; Sun, 19 Jul 2020 03:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595128451; bh=DAnhSp4F0VJY8M5UsREOfonMtMLwH+jz7lFupYgLy84=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cA+H6Mz81Iz9KAXfkHOZGEMPD2RZIXKcc5b/Y8qHpHSHHvZCfrE+E7eLcuUvTVrHB RGhANeC3OfWiZmhJMhUAtsYUyPS/QVqM1uFbSABTPChD8e5V8hLupILDvQcFYLKTcK YKC8CecAY5BwlZ52EVqkheTqY3X6NTzklDtF2GNY= From: Eric Abrahamsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> Date: Sat, 18 Jul 2020 20:14:09 -0700 In-Reply-To: <87mu3wwbwd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 03:07:14 +0200") Message-ID: <87a6zwci2m.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 07/19/20 03:07 AM, Lars Ingebrigtsen wrote: > Eric Abrahamsen writes: > >> Gnus could figure this out itself and anonymously log in, using the >> attached patch. It seems to work fine, but there might be further >> consequences I haven't thought of. And possibly we'd simply prefer that >> settings like this be a little more explicit for the user? > > Would this interfere with logging in normally with your own user name? I think if we did it this way: (if (or (eq nnimap-authenticator 'anonymous) (and (null nnimap-authenticator) (nnimap-capability "AUTH=ANONYMOUS"))) (list "anonymous" (message-make-address)) ;; normal log in process ) Then we only fall back on anonymous if the user hasn't specified anything explicitly. I haven't yet verified that (null nnimap-authenticator) does the right thing in this case, though. Eric From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 03:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Abrahamsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159512865715038 (code B ref 41951); Sun, 19 Jul 2020 03:18:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 03:17:37 +0000 Received: from localhost ([127.0.0.1]:59806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzpZ-0003uU-Ad for submit@debbugs.gnu.org; Sat, 18 Jul 2020 23:17:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzpU-0003uD-2Q for 41951@debbugs.gnu.org; Sat, 18 Jul 2020 23:17:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9dwybN8NRfowSGvhuWg8xECr0jmSi3St/uUAPAN/ZZ8=; b=XewIqmL608/tT0HIRrUCy4mGLU sIL1rPpDREPTUzFOgwN9hwTeLEG7UXiJxUY54v5+f+dhV9Yd67Ys5FH8XvPv7/Q9Dku9+uQjhN+ur R0stqhpKMimERq7QbQb8CIILjCrsb7Jtd6i4YA8T2StxNBpNS3QSMq4A5Gs1u6vtodvY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwzpH-0000N1-Up; Sun, 19 Jul 2020 05:17:25 +0200 From: Lars Ingebrigtsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> Date: Sun, 19 Jul 2020 05:17:18 +0200 In-Reply-To: <87a6zwci2m.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 18 Jul 2020 20:14:09 -0700") Message-ID: <87blkctcqp.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > I think if we did it this way: > > (if (or (eq nnimap-authenticator 'anonymous) > (and (null nnimap-authenticator) > (nnimap-capability "AUTH=ANONYMOUS"))) > (list "anonymous" > (message-make-addres [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > I think if we did it this way: > > (if (or (eq nnimap-authenticator 'anonymous) > (and (null nnimap-authenticator) > (nnimap-capability "AUTH=ANONYMOUS"))) > (list "anonymous" > (message-make-address)) > ;; normal log in process > ) > > Then we only fall back on anonymous if the user hasn't specified > anything explicitly. I haven't yet verified that (null > nnimap-authenticator) does the right thing in this case, though. The code now is: (if (not (setq credentials (if (eq nnimap-authenticator 'anonymous) (list "anonymous" (message-make-address)) ;; Look for the credentials based on ;; the virtual server name and the address (nnimap-credentials (gnus-delete-duplicates (list server nnimap-address)) ports nnimap-user)))) That call to nnimap-credentials looks into the .authinfo file, and if the password is present there, it uses it. So at the very least, the auto-anonymous thing would have to be reversed in priority -- after the call to nnimap-credentials. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 03:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159512884415310 (code B ref 41951); Sun, 19 Jul 2020 03:21:01 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 03:20:44 +0000 Received: from localhost ([127.0.0.1]:59810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzsZ-0003ys-P4 for submit@debbugs.gnu.org; Sat, 18 Jul 2020 23:20:44 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:40182 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzsY-0003yf-NV for 41951@debbugs.gnu.org; Sat, 18 Jul 2020 23:20:43 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id AEF9FFA0B2; Sun, 19 Jul 2020 03:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595128836; bh=j7n/9yoZHbNmRBA+iRZbTg+pgbMGGe5/5MUVHXCBKQo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IcEbEGusus3ecpofXBvzQhRvZejXuJu9uLyKnOWdjDfgLgUTjRrwsFiaEq0506E78 3yyS0Tg2b4Im3ogjPqCBSPzEl3vEg8C/epvNT9FBJEM2s0LdWw8fwzzIOjscK5ktu4 68xKV4vAhAgqkKSzecCbttaadV5FdO68cByNyQP0= From: Eric Abrahamsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> Date: Sat, 18 Jul 2020 20:20:35 -0700 In-Reply-To: <87blkctcqp.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 05:17:18 +0200") Message-ID: <875zakchrw.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 07/19/20 05:17 AM, Lars Ingebrigtsen wrote: > Eric Abrahamsen writes: > >> I think if we did it this way: >> >> (if (or (eq nnimap-authenticator 'anonymous) >> (and (null nnimap-authenticator) >> (nnimap-capability "AUTH=ANONYMOUS"))) >> (list "anonymous" >> (message-make-address)) >> ;; normal log in process >> ) >> >> Then we only fall back on anonymous if the user hasn't specified >> anything explicitly. I haven't yet verified that (null >> nnimap-authenticator) does the right thing in this case, though. > > The code now is: > > (if (not (setq credentials > (if (eq nnimap-authenticator 'anonymous) > (list "anonymous" > (message-make-address)) > ;; Look for the credentials based on > ;; the virtual server name and the address > (nnimap-credentials > (gnus-delete-duplicates > (list server nnimap-address)) > ports > nnimap-user)))) > > That call to nnimap-credentials looks into the .authinfo file, and if > the password is present there, it uses it. > > So at the very least, the auto-anonymous thing would have to be reversed > in priority -- after the call to nnimap-credentials. So only honor AUTH=ANONYMOUS if the user has set no nnimap-authenticator, and also we don't find this server in our auth-source-search, right? From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 03:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Abrahamsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159512891615446 (code B ref 41951); Sun, 19 Jul 2020 03:22:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 03:21:56 +0000 Received: from localhost ([127.0.0.1]:59814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwztk-000414-4Q for submit@debbugs.gnu.org; Sat, 18 Jul 2020 23:21:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwzti-00040r-O5 for 41951@debbugs.gnu.org; Sat, 18 Jul 2020 23:21:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X0w479a9TEZ1DkJvYoqWBQ6/hTrfaD/R++WJb1tf+9Y=; b=bhiP0I49C7zARrH+lX3dpQ6gef PBSuuce1b1V/ls5qgvWwG5afrcADxRk/te2Y/etNEmKgQzunwlP3MaKxZ7kAipwYHbzvu8+oZmhq7 tknvPPsW70doCfbtfn1UmmLtZ5C/WNWtZPyTDAJmYi68fosYgMBMw3iH7V55uknP5tcY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwzta-0000Pa-Jh; Sun, 19 Jul 2020 05:21:49 +0200 From: Lars Ingebrigtsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> <875zakchrw.fsf@ericabrahamsen.net> Date: Sun, 19 Jul 2020 05:21:45 +0200 In-Reply-To: <875zakchrw.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 18 Jul 2020 20:20:35 -0700") Message-ID: <877dv0tcja.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > So only honor AUTH=ANONYMOUS if the user has set no > nnimap-authenticator, and also we don't find this server in our > auth-source-search, right? Yes. nnimap-authenticator is nil by default. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > So only honor AUTH=ANONYMOUS if the user has set no > nnimap-authenticator, and also we don't find this server in our > auth-source-search, right? Yes. nnimap-authenticator is nil by default. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 04:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159513128719006 (code B ref 41951); Sun, 19 Jul 2020 04:02:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 04:01:27 +0000 Received: from localhost ([127.0.0.1]:59830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0Vz-0004wU-N6 for submit@debbugs.gnu.org; Sun, 19 Jul 2020 00:01:27 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:49990 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0Vw-0004wG-3C for 41951@debbugs.gnu.org; Sun, 19 Jul 2020 00:01:26 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 23CD5FA0B2; Sun, 19 Jul 2020 04:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595131277; bh=7Q8ZeMLINnDsdVUJqhryJxcakwPYEnrxflRRwUAzzBg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WAaMdNoI8AAu1I87M3znc23oW7Rp90KBdz5Z47PntniP96Z1ukeGBNSdTyxotZBbe t7OiNGP9gNVYQQ3IEcBDjA9sCklMHCkJb2Em2ykHlRfVelFgYe/aX6GhZrhRer/QaK 3FShbITKtW9AvMcBXfqS+ub59/7lmTZHyV05Kzs4= From: Eric Abrahamsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> <875zakchrw.fsf@ericabrahamsen.net> <877dv0tcja.fsf@gnus.org> Date: Sat, 18 Jul 2020 21:01:15 -0700 In-Reply-To: <877dv0tcja.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 05:21:45 +0200") Message-ID: <871rl8cfw4.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> So only honor AUTH=3DANONYMOUS if the user has set no >> nnimap-authenticator, and also we don't find this server in our >> auth-source-search, right? > > Yes. nnimap-authenticator is nil by default. Hmm, but `nnimap-credentials->auth-source-search' will prompt for auth details and save them if none are found, which is the behavior I was trying to avoid to begin with. Meh, this probably isn't the right thing to do. The manual specifically says (about `nnimap-authenticator'): "Some IMAP servers allow anonymous logins. In that case, this should be set to =E2=80=98anonymous=E2=80=99. If this variable isn=E2=80=99t set, th= e normal login methods will be used." So implicitly short-circuiting the normal login procedure is actually contrary to the documentation, which says do it explicitly. I'm inclined to drop this... From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 04:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eric Abrahamsen Cc: 41951@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159513139819171 (code B ref 41951); Sun, 19 Jul 2020 04:04:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 04:03:18 +0000 Received: from localhost ([127.0.0.1]:59834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0Xm-0004z9-1i for submit@debbugs.gnu.org; Sun, 19 Jul 2020 00:03:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0Xk-0004yv-BM for 41951@debbugs.gnu.org; Sun, 19 Jul 2020 00:03:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zN1g7WJPgM6XDZWhgpe5Z3M7bJMbxRocJEhpMx69TUU=; b=Raq21xEdhLL3RNssb7aXLqbdp1 oKPGfLNzEGJcCjXuuzI4j64nZ9eTL0xAJtikqV4UbDuryhyisj4JRoVH+NUmCO3fwSeLkdmBFcIGW zsSdb4dVwlYHOre1XX/4Vv20pDjzAOCEYSmu3MyCLnHNChzqui1Oa28LqRaEK+7nmQ8I=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jx0Xb-0000pN-F5; Sun, 19 Jul 2020 06:03:10 +0200 From: Lars Ingebrigtsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> <875zakchrw.fsf@ericabrahamsen.net> <877dv0tcja.fsf@gnus.org> <871rl8cfw4.fsf@ericabrahamsen.net> Date: Sun, 19 Jul 2020 06:03:06 +0200 In-Reply-To: <871rl8cfw4.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 18 Jul 2020 21:01:15 -0700") Message-ID: <87y2ngrw1x.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > Hmm, but `nnimap-credentials->auth-source-search' will prompt for auth > details and save them if none are found, which is the behavior I was > trying to avoid to begin with. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Abrahamsen writes: > Hmm, but `nnimap-credentials->auth-source-search' will prompt for auth > details and save them if none are found, which is the behavior I was > trying to avoid to begin with. We could change that to not prompt if AUTH=3DANONYMOUS is available? > Meh, this probably isn't the right thing to do. The manual specifically > says (about `nnimap-authenticator'): > > "Some IMAP servers allow anonymous logins. In that case, this should be > set to =E2=80=98anonymous=E2=80=99. If this variable isn=E2=80=99t set, = the normal login > methods will be used." > > So implicitly short-circuiting the normal login procedure is actually > contrary to the documentation, which says do it explicitly. I'm inclined > to drop this... Yeah, it's pretty obscure anyway, isn't it? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 04:24:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 04:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 41951@debbugs.gnu.org, 41951-done@debbugs.gnu.org Received: via spool by 41951-submit@debbugs.gnu.org id=B41951.159513197920049 (code B ref 41951); Sun, 19 Jul 2020 04:13:02 +0000 Received: (at 41951) by debbugs.gnu.org; 19 Jul 2020 04:12:59 +0000 Received: from localhost ([127.0.0.1]:59840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0h9-0005DE-5d for submit@debbugs.gnu.org; Sun, 19 Jul 2020 00:12:59 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:52730 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0h7-0005Cv-JA; Sun, 19 Jul 2020 00:12:57 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 20FBEFA0B2; Sun, 19 Jul 2020 04:12:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595131971; bh=mlo0sR3TAvYtL8ukJlRTKkYSNx85+qdlh/GyQ8Pg6Uo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YnmPYwo/ACT7rNRhEHfodOF/3NjIvkYJMY1HxMzyRjKhkbVebIdOlq08pR9Z+wnoY 7jCow8BUNg+0LrNKW7tm2vIOnEqbCEb1gbzysSUpz/KG1Z1R9AisO6L3/MLOGk8VIP wkI9qXaN8wa+Icpj8qexaivgxpJjVHX+19f/dLY0= From: Eric Abrahamsen References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> <875zakchrw.fsf@ericabrahamsen.net> <877dv0tcja.fsf@gnus.org> <871rl8cfw4.fsf@ericabrahamsen.net> <87y2ngrw1x.fsf@gnus.org> Date: Sat, 18 Jul 2020 21:12:49 -0700 In-Reply-To: <87y2ngrw1x.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 06:03:06 +0200") Message-ID: <87wo30b0se.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> Hmm, but `nnimap-credentials->auth-source-search' will prompt for auth >> details and save them if none are found, which is the behavior I was >> trying to avoid to begin with. > > We could change that to not prompt if AUTH=3DANONYMOUS is available? > >> Meh, this probably isn't the right thing to do. The manual specifically >> says (about `nnimap-authenticator'): >> >> "Some IMAP servers allow anonymous logins. In that case, this should be >> set to =E2=80=98anonymous=E2=80=99. If this variable isn=E2=80=99t set,= the normal login >> methods will be used." >> >> So implicitly short-circuiting the normal login procedure is actually >> contrary to the documentation, which says do it explicitly. I'm inclined >> to drop this... > > Yeah, it's pretty obscure anyway, isn't it? Yup. Sorry for the noise. From unknown Sun Jun 22 04:24:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eric Abrahamsen Subject: bug#41951: closed (Re: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap?) Message-ID: References: <87wo30b0se.fsf@ericabrahamsen.net> <871rmb54wu.fsf@ericabrahamsen.net> X-Gnu-PR-Message: they-closed 41951 X-Gnu-PR-Package: emacs Reply-To: 41951@debbugs.gnu.org Date: Sun, 19 Jul 2020 04:13:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1595131983-20067-1" This is a multi-part message in MIME format... ------------=_1595131983-20067-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41951: 28.0.50; Automatically detect AUTH=3DANONYMOUS in Gnus nnimap? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41951@debbugs.gnu.org. --=20 41951: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41951 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595131983-20067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41951-done) by debbugs.gnu.org; 19 Jul 2020 04:12:59 +0000 Received: from localhost ([127.0.0.1]:59838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0h8-0005DB-V6 for submit@debbugs.gnu.org; Sun, 19 Jul 2020 00:12:59 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:52730 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jx0h7-0005Cv-JA; Sun, 19 Jul 2020 00:12:57 -0400 Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 20FBEFA0B2; Sun, 19 Jul 2020 04:12:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1595131971; bh=mlo0sR3TAvYtL8ukJlRTKkYSNx85+qdlh/GyQ8Pg6Uo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YnmPYwo/ACT7rNRhEHfodOF/3NjIvkYJMY1HxMzyRjKhkbVebIdOlq08pR9Z+wnoY 7jCow8BUNg+0LrNKW7tm2vIOnEqbCEb1gbzysSUpz/KG1Z1R9AisO6L3/MLOGk8VIP wkI9qXaN8wa+Icpj8qexaivgxpJjVHX+19f/dLY0= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? References: <871rmb54wu.fsf@ericabrahamsen.net> <87mu3wwbwd.fsf@gnus.org> <87a6zwci2m.fsf@ericabrahamsen.net> <87blkctcqp.fsf@gnus.org> <875zakchrw.fsf@ericabrahamsen.net> <877dv0tcja.fsf@gnus.org> <871rl8cfw4.fsf@ericabrahamsen.net> <87y2ngrw1x.fsf@gnus.org> Date: Sat, 18 Jul 2020 21:12:49 -0700 In-Reply-To: <87y2ngrw1x.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Jul 2020 06:03:06 +0200") Message-ID: <87wo30b0se.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41951-done Cc: 41951@debbugs.gnu.org, 41951-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> Hmm, but `nnimap-credentials->auth-source-search' will prompt for auth >> details and save them if none are found, which is the behavior I was >> trying to avoid to begin with. > > We could change that to not prompt if AUTH=3DANONYMOUS is available? > >> Meh, this probably isn't the right thing to do. The manual specifically >> says (about `nnimap-authenticator'): >> >> "Some IMAP servers allow anonymous logins. In that case, this should be >> set to =E2=80=98anonymous=E2=80=99. If this variable isn=E2=80=99t set,= the normal login >> methods will be used." >> >> So implicitly short-circuiting the normal login procedure is actually >> contrary to the documentation, which says do it explicitly. I'm inclined >> to drop this... > > Yeah, it's pretty obscure anyway, isn't it? Yup. Sorry for the noise. ------------=_1595131983-20067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Jun 2020 17:41:59 +0000 Received: from localhost ([127.0.0.1]:56769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmL1a-0006M7-Qa for submit@debbugs.gnu.org; Fri, 19 Jun 2020 13:41:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:36710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmL1Z-0006M0-Jg for submit@debbugs.gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmL1Z-0007nV-BV for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from ericabrahamsen.net ([52.70.2.18]:36622 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmL1X-0001qF-Jg for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 13:41:57 -0400 Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 7FE6FFA0AC for ; Fri, 19 Jun 2020 17:41:54 +0000 (UTC) From: Eric Abrahamsen To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Date: Fri, 19 Jun 2020 10:41:53 -0700 Message-ID: <871rmb54wu.fsf@ericabrahamsen.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/19 13:37:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain IMAP servers that allow anonymous authentication advertise that fact in their capabilities as AUTH=ANONYMOUS. nnimap currently lets you take advantage of this explicitly, by setting (nnimap-authenticator anonymous) in the server definition. But this requires you to know in advance that the server allows anonymous authentication, and decide to use it. Gnus could figure this out itself and anonymously log in, using the attached patch. It seems to work fine, but there might be further consequences I haven't thought of. And possibly we'd simply prefer that settings like this be a little more explicit for the user? Does anyone have any opinions on this? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=nnimap-anonymous.diff diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index f306889a7f..ebb1236674 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -837,6 +837,7 @@ gnus-registry-find-keywords (completing-read "Keyword: " (gnus-registry-keywords) nil t))) (registry-lookup-secondary-value gnus-registry-db 'keyword keyword)) + (defun gnus-registry-register-message-ids () "Register the Message-ID of every article in the group." (unless (gnus-parameter-registry-ignore gnus-newsgroup-name) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3c4e75ede8..18d3cba173 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -509,7 +509,8 @@ nnimap-open-connection-1 (split-string capabilities))) (unless (string-match-p "[*.] PREAUTH" greeting) (if (not (setq credentials - (if (eq nnimap-authenticator 'anonymous) + (if (or (eq nnimap-authenticator 'anonymous) + (nnimap-capability "AUTH=ANONYMOUS")) (list "anonymous" (message-make-address)) ;; Look for the credentials based on --=-=-=-- ------------=_1595131983-20067-1--