From unknown Thu Sep 11 09:17:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79214: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg Resent-From: Roman Rusch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Aug 2025 04:09:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 79214@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17548852909754 (code B ref -1); Mon, 11 Aug 2025 04:09:03 +0000 Received: (at submit) by debbugs.gnu.org; 11 Aug 2025 04:08:10 +0000 Received: from localhost ([127.0.0.1]:46608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulJpR-0002XF-Pg for submit@debbugs.gnu.org; Mon, 11 Aug 2025 00:08:10 -0400 Received: from lists.gnu.org ([2001:470:142::17]:44162) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulANj-0004tY-Ad for submit@debbugs.gnu.org; Sun, 10 Aug 2025 14:02:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulANd-0007mn-KL for bug-gnu-emacs@gnu.org; Sun, 10 Aug 2025 14:02:49 -0400 Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulANX-00071V-E8 for bug-gnu-emacs@gnu.org; Sun, 10 Aug 2025 14:02:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.ch; s=s31663417; t=1754848958; x=1755453758; i=roman.rusch@gmx.ch; bh=kDf3xBLMY2xpD3tXApV1BroZq3qRtMmiyfmnRD65vEw=; h=X-UI-Sender-Class:Date:Message-Id:From:To:Subject:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=r6wgEIflUVRZ9H5nqEga7x99YtaXwUy0uSVre6+DtUwsXVPmCpjKJTDiaR1jn0ly 3esJk+jVTnrmOhjJXcMRGuXkC1wj7EMCYUfAZXWj+4cnkbHvErRO9+VzUTCHORVer 37Oi+yRFDkT32RUNvrgUTeHS7TdWc/u8dYN4ns7xmSdlKCIPQ+sJwE49Q5nn8hi8w oqYf7vxoMo008eclP4quW68n8tg03HnmZ5KE2ZtiQuVnt9Cr0m6am0LpCvdA5T1I5 LOv4eU0EzeCOddU6J7VD3wnSovyKX0G5SFEPD2GoFzGH/cPyu4k5bWw2/QViIqFOy JAx5C7il7sv08Htd6w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from bsdmachine ([212.203.51.62]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVN6j-1vDRxR215z-00WvUJ for ; Sun, 10 Aug 2025 20:02:38 +0200 Date: Sun, 10 Aug 2025 20:02:29 +0200 Message-Id: <86ectjcax6.fsf@gmx.ch> From: Roman Rusch X-Provags-ID: V03:K1:fpnAG2l/YPgNit+QKQkiYCv6RZdsbH+ZDM5sOvoj5GjkhZWArBj FNTmb/7qdqphfdLnh/v5NLkEcLbyfPC0w1CC7sdf3ET7bAMVMmkbWeDyjLTz76h/AQWDYvB LV7+naN4WVBTkQHnlSXQOTWNz495PNKwfBHcto6z+Vz+KB11x/Y84PbOoYz8XTO5uTxUyNp Yx5ElKpophI8s9xfjvb/w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:SsGRWa1Mfro=;2v7Uva8knL4BwFFjQGc/DrvC3u9 xrdaW/gCjoDvexUzOmF7M9J3TvueO/uB7P9wFR4TKeH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Jq0OGAMnqHVnfRbVgiIVOnzFKpKXt+Oxt7fH1ivgkRSlzsD8EQR6UErc5F IGZ2KzqgbF8E3A6RSoBiRwtPgW1Hexi7XB+8UdA4NzcwDNO/OHMB78fxWb8= Received-SPF: pass client-ip=212.227.15.19; envelope-from=roman.rusch@gmx.ch; helo=mout.gmx.net X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DEAR_SOMETHING=1.973, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Dear Sir or Madam, I've set up emacs rmail to withdraw the emails from two remote Mailboxes (with gnu movemail) and store it in one local inbox by having two entrances in rmail-inbox list like below: Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.7 DEAR_SOMETHING BODY: Contains 'Dear (something)' -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (roman.rusch[at]gmx.ch) 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) 0.0 SPOOFED_FREEMAIL No description available. X-Mailman-Approved-At: Mon, 11 Aug 2025 00:08:02 -0400 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: 0.7 (/) Dear Sir or Madam, I've set up emacs rmail to withdraw the emails from two remote Mailboxes (with gnu movemail) and store it in one local inbox by having two entrances in rmail-inbox list like below: rmail-inbox-list '("pops://XXX" "pops://YYY") The password for both accounts are correctly stored in a .authinfo.gpg file, as described in the Info-page "Auth-source" for Emacs. The two passwords are different. The bug is that the command to get the emails always triggers an "authentication failed" for the second account - whatever the order in the above list is. But the authentication always works when in rmail-inbox-list only one account is defined. It took me a while to figure out that rmail is NOT reading in the password from the .authinfo.gpg file at all for the second account, because it already has read in one before and thinks it does not have to do so anymore. As a consequence it uses the password of the first account also for the second one, which causes the "authentication failed" error. I believe I've found the reason for the above problem in the file "rmail.el" -> "defun rmail-get-remote-password". By commenting out the first "when" expression as shown below I could at least make it work again for my case: ;;(when (not rmail-encoded-remote-password) (if (not rmail-remote-password) (setq rmail-remote-password (let ((found (nth 0 (auth-source-search :max 1 :user user :host host :require '(:secret))))) (if found (auth-info-password found) (read-passwd (if imap "IMAP password: " "POP password: ")))))) (rmail-set-remote-password rmail-remote-password) (setq rmail-remote-password nil);;) (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) ) I like rmail a lot for its simplicity and hope this helps to make it even better. Best regards, Roman From unknown Thu Sep 11 09:17:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79214: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Aug 2025 11:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Roman Rusch Cc: 79214@debbugs.gnu.org Received: via spool by 79214-submit@debbugs.gnu.org id=B79214.17553431153727 (code B ref 79214); Sat, 16 Aug 2025 11:19:02 +0000 Received: (at 79214) by debbugs.gnu.org; 16 Aug 2025 11:18:35 +0000 Received: from localhost ([127.0.0.1]:41315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unEvj-0000y3-9K for submit@debbugs.gnu.org; Sat, 16 Aug 2025 07:18:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39352) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unEvg-0000xo-CV for 79214@debbugs.gnu.org; Sat, 16 Aug 2025 07:18:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1unEva-00030e-5D; Sat, 16 Aug 2025 07:18:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=aFiCD0LB5g+mO5Gb+wjHB9ta2P2WL+UEGF9X0SpQFsU=; b=bMe2YhqeMSRS AODrWFkjHL0dI0q08bOZHmJmkJuz1b+TLrjNpchaV8oqgfhbgx7qH8MUEao4miNGzZ3jrogDoW6/m iVy7PExsVILjPZMJY6CNZUT9oIcNHqAP6o4F1dS5pK8ys6O/8HF9eLRkX24eIvQEaHCplgWym/ZlG 68DyGlO8RKGx0Z5M2+1pJhYyE79KmRYyZq1nyLYAFFCJbiENqwxXxK9qaT5caLGwrSozlK7/ak7zu nhIxHYitl/8qrum26OvXM+HHGNOLF45fiU2TiPQ9dqaNawBYIu5ONyYKuhcDtdhZDdXy4R/lnSHYe 7yuhSD+CY5IX/jxe5tAANg==; Date: Sat, 16 Aug 2025 14:18:23 +0300 Message-Id: <86sehrjz0g.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <86ectjcax6.fsf@gmx.ch> (bug-gnu-emacs@gnu.org) References: <86ectjcax6.fsf@gmx.ch> X-Spam-Score: -0.6 (/) 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.6 (-) > Date: Sun, 10 Aug 2025 20:02:29 +0200 > From: Roman Rusch via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Dear Sir or Madam, > > I've set up emacs rmail to withdraw the emails from two remote > Mailboxes (with gnu movemail) and store it in one local inbox by > having two entrances in rmail-inbox list like below: > > rmail-inbox-list '("pops://XXX" > "pops://YYY") > > The password for both accounts are correctly stored in a .authinfo.gpg > file, as described in the Info-page "Auth-source" for Emacs. The two > passwords are different. > > The bug is that the command to get the emails always triggers an > "authentication failed" for the second account - whatever the order in > the above list is. But the authentication always works when in > rmail-inbox-list only one account is defined. > > It took me a while to figure out that rmail is NOT reading in the > password from the .authinfo.gpg file at all for the second account, > because it already has read in one before and thinks it does not have > to do so anymore. As a consequence it uses the password of the first > account also for the second one, which causes the "authentication > failed" error. > > I believe I've found the reason for the above problem in the file > "rmail.el" -> "defun rmail-get-remote-password". By commenting out the > first "when" expression as shown below I could at least make it work > again for my case: > > ;;(when (not rmail-encoded-remote-password) > (if (not rmail-remote-password) > (setq rmail-remote-password > (let ((found (nth 0 (auth-source-search > :max 1 :user user :host host > :require '(:secret))))) > (if found > (auth-info-password found) > (read-passwd (if imap > "IMAP password: " > "POP password: ")))))) > (rmail-set-remote-password rmail-remote-password) > (setq rmail-remote-password nil);;) > (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) > ) Thanks. I don't use multiple POP inboxes, so I wonder whether you could implement a simple change along the lines below and test it in your environment: . introduce 2 new variables, rmail-remote-password-host and rmail-remote-password-user . in rmail-get-remote-password record the values of the USER and HOST arguments in the above 2 variables . replace this condition in rmail-get-remote-password: (when (not rmail-encoded-remote-password) with (when (or (not rmail-encoded-remote-password) (not (equal user rmail-remote-password-user)) (not (equal host rmail-remote-password-host))) This should cause Rmail to ask you for the password, but only when it needs to fetch email from an inbox different from the one used before. Which I think is what you want. From unknown Thu Sep 11 09:17:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79214: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg Resent-From: Roman Rusch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Aug 2025 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79214 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 79214@debbugs.gnu.org Received: via spool by 79214-submit@debbugs.gnu.org id=B79214.17553560525890 (code B ref 79214); Sat, 16 Aug 2025 14:55:02 +0000 Received: (at 79214) by debbugs.gnu.org; 16 Aug 2025 14:54:12 +0000 Received: from localhost ([127.0.0.1]:43111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1unIIO-0001Wt-25 for submit@debbugs.gnu.org; Sat, 16 Aug 2025 10:54:12 -0400 Received: from mout.gmx.net ([212.227.15.19]:48657) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1unIIL-0001Wa-0h for 79214@debbugs.gnu.org; Sat, 16 Aug 2025 10:54:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.ch; s=s31663417; t=1755356036; x=1755960836; i=roman.rusch@gmx.ch; bh=djRBBo/iic4zCRp3CwRT/Q7WFo+CR8340uoabBfhCrc=; h=X-UI-Sender-Class:Date:Message-Id:From:To:Cc:In-Reply-To:Subject: References:Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=bxWF0/5fyzuQwAfizOPRkE2qI3o3KPOTcy4njUMsrKVkybIts3NRoSWFIK46Spud aLUHKPrIFeUXLaUdo6gy4asDl/bBOd0N1zl7mJ9+PWHPdJW4LeQQncoRj0XW55/Wh Aw7sxlZjZFm04qrcbV/j7z1Qpw23+6GQ5b3xg5oNJV3URey0I7x7eKbtZI3Ie7gk9 njbQg6iNndzMA1HYyIWtRQhVzPBfUwZNNNsIxeXRQ3E2cDu4IAZr+TtHzIppbiz1r hUSfsBS/cxSpTHCfj6cXGNi0rWF7IpfWpleMnP+iaeQmbC78mPq2jsKN7j6kyjqWs HrOuWEYJbRLLprPm9w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from bsdmachine ([212.203.51.72]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlw7V-1u60zn2RPv-00jDkP; Sat, 16 Aug 2025 16:53:56 +0200 Date: Sat, 16 Aug 2025 16:53:55 +0200 Message-Id: <86ldnjgvwc.fsf@gmx.ch> From: Roman Rusch In-Reply-To: <86sehrjz0g.fsf@gnu.org> (message from Eli Zaretskii on Sat, 16 Aug 2025 14:18:23 +0300) References: <86ectjcax6.fsf@gmx.ch> <86sehrjz0g.fsf@gnu.org> X-Provags-ID: V03:K1:teL/PRweI5Q23qz6HjkaBVm2Z5MKLFOnWzafIH1GLCIr8QDYa8a j3wqmGAG3XDarPxPDtkrRp60ThN1L/vA4vKAqQ6D1oKiv+5heSLkmKRmPxQ5lC+K0rQFrgq z2oBNSrirgJeXnNfdWQ60oRVLt5qrlv1cU7mV0DzFHOA/SU7ggEe3TDJxQZvydglob2mn/9 sRfn84Sv3UFAc95JKXmFA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Wg4itJXXBeU=;X2fzHwvCx7HEP+nVHI3AYE8VPBH lkgbwRHZ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Rf1KTnW/yRII8FM6LoXNgfkEJ77sPOwUHp2d8k10SeYSbKqY1S1zswCZ35HuMthT 7UacOO3J9vIn7cquB/9THe2YF72LH3oGxmyzXcg0hQUBDBbr7FRpfe8fpT1z8Lok/pDPBToHj /U8bDKogm9vd+HU4B8Xw0b4bLGBldmkMgiyS4xhty8tnrsXkLDFFj5rtr3Xux+/pZGCLubUaQ qL2i5NP0Tzfc8nRzLpRQdFfxbH3E3SMQM8DY0W7TEDC9VPNc0uu/NSUvAtvw4zO86LhURlI8O 2RAFvP3HDj3kB+ro3HgwH7j5Q= Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.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: 0.0 (/) > Date: Sat, 16 Aug 2025 14:18:23 +0300 > From: Eli Zaretskii > Cc: 79214@debbugs.gnu.org >=20 > > Date: Sun, 10 Aug 2025 20:02:29 +0200 > > From: Roman Rusch via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > >=20 > > Dear Sir or Madam, > >=20 > > I've set up emacs rmail to withdraw the emails from two remote > > Mailboxes (with gnu movemail) and store it in one local inbox by > > having two entrances in rmail-inbox list like below: > >=20 > > rmail-inbox-list '("pops://XXX" > > "pops://YYY") > >=20 > > The password for both accounts are correctly stored in a .authinfo.gpg > > file, as described in the Info-page "Auth-source" for Emacs. The two > > passwords are different. > >=20 > > The bug is that the command to get the emails always triggers an > > "authentication failed" for the second account - whatever the order in > > the above list is. But the authentication always works when in > > rmail-inbox-list only one account is defined. > >=20 > > It took me a while to figure out that rmail is NOT reading in the > > password from the .authinfo.gpg file at all for the second account, > > because it already has read in one before and thinks it does not have > > to do so anymore. As a consequence it uses the password of the first > > account also for the second one, which causes the "authentication > > failed" error. > >=20 > > I believe I've found the reason for the above problem in the file > > "rmail.el" -> "defun rmail-get-remote-password". By commenting out the > > first "when" expression as shown below I could at least make it work > > again for my case: > >=20 > > ;;(when (not rmail-encoded-remote-password) > > (if (not rmail-remote-password) > > (setq rmail-remote-password > > (let ((found (nth 0 (auth-source-search > > :max 1 :user user :host host > > :require '(:secret))))) > > (if found > > (auth-info-password found) > > (read-passwd (if imap > > "IMAP password: " > > "POP password: ")))))) > > (rmail-set-remote-password rmail-remote-password) > > (setq rmail-remote-password nil);;) > > (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) > > ) >=20 > Thanks. I don't use multiple POP inboxes, so I wonder whether you > could implement a simple change along the lines below and test it in > your environment: >=20 > . introduce 2 new variables, rmail-remote-password-host and > rmail-remote-password-user > . in rmail-get-remote-password record the values of the USER and HOST > arguments in the above 2 variables > . replace this condition in rmail-get-remote-password: >=20 > (when (not rmail-encoded-remote-password) >=20 > with >=20 > (when (or (not rmail-encoded-remote-password) > (not (equal user rmail-remote-password-user)) > (not (equal host rmail-remote-password-host))) >=20 > This should cause Rmail to ask you for the password, but only when it > needs to fetch email from an inbox different from the one used before. > Which I think is what you want. >=20 Hi Eli, Thank you for your email. I can confirm your proposal works with my environment. Below is what I did around the defun in rmail.el, without the docstring: (setq rmail-remote-password-host "" rmail-remote-password-user "") (defun rmail-get-remote-password (imap user host) (when (or (not rmail-encoded-remote-password) (not (equal user rmail-remote-password-user)) (not (equal host rmail-remote-password-host))) (setq rmail-remote-password-host host rmail-remote-password-user user) (if (not rmail-remote-password) (setq rmail-remote-password (let ((found (nth 0 (auth-source-search :max 1 :user user :host host :require '(:secret))))) (if found (auth-info-password found) (read-passwd (if imap "IMAP password: " "POP password: ")))))) (rmail-set-remote-password rmail-remote-password) (setq rmail-remote-password nil)) (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) ) =2D- Regards, Roman From unknown Thu Sep 11 09:17:57 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: Roman Rusch Subject: bug#79214: closed (Re: bug#79214: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg) Message-ID: References: <86ect2b68h.fsf@gnu.org> <86ectjcax6.fsf@gmx.ch> X-Gnu-PR-Message: they-closed 79214 X-Gnu-PR-Package: emacs Reply-To: 79214@debbugs.gnu.org Date: Sat, 23 Aug 2025 11:58:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1755950285-13923-1" This is a multi-part message in MIME format... ------------=_1755950285-13923-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79214: 30.1; rmail with two remote mailboxes and both passwords in .authin= fo.gpg 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 79214@debbugs.gnu.org. --=20 79214: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79214 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1755950285-13923-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79214-done) by debbugs.gnu.org; 23 Aug 2025 11:57:53 +0000 Received: from localhost ([127.0.0.1]:38933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1upmsZ-0003c9-Bp for submit@debbugs.gnu.org; Sat, 23 Aug 2025 07:57:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37178) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1upmsW-0003bp-4R for 79214-done@debbugs.gnu.org; Sat, 23 Aug 2025 07:57:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1upmsP-0004wD-M6; Sat, 23 Aug 2025 07:57:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IUz04zYS66TrHnJnzSUHWfF4Q9v1T8M5ZI2fU27D9BQ=; b=QPxU9u4NeyO9 osEJmxW2+8CkfmGT4EiH848zbA9Uec9/KFMVrz9ueTWZCOoUr6tqtedLVn4tXlmx5NXPFBP4Joa6G 7XTg+I6KVHDCOMbJqTGRqnkslXn+kTPINLkYiqc2atgAoSu0o6S5cp19qESiEY2Tam+74bj1/Qi5v OZZ52s2krnfzX4VjhrS1LMvVhK2H56bUDaX55l/IurDCQR2HkWTs4VizVVW7XMfmS9M8JoB2D3rBM /uanyyopnM93zf6kDLH5P2siANoW6EJ5dEo/r7+OWoJ8/lTq/Gw4QR/mtA/DzYK3pyCw2EdsSh+7R UZYp4JmjDvQrJoNXEW8E0g==; Date: Sat, 23 Aug 2025 14:57:34 +0300 Message-Id: <86ect2b68h.fsf@gnu.org> From: Eli Zaretskii To: Roman Rusch In-Reply-To: <86ldnjgvwc.fsf@gmx.ch> (message from Roman Rusch on Sat, 16 Aug 2025 16:53:55 +0200) Subject: Re: bug#79214: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg References: <86ectjcax6.fsf@gmx.ch> <86sehrjz0g.fsf@gnu.org> <86ldnjgvwc.fsf@gmx.ch> X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 79214-done Cc: 79214-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: -1.6 (-) > Date: Sat, 16 Aug 2025 16:53:55 +0200 > From: Roman Rusch > Cc: 79214@debbugs.gnu.org > > > Date: Sat, 16 Aug 2025 14:18:23 +0300 > > From: Eli Zaretskii > > Cc: 79214@debbugs.gnu.org > > > > > Date: Sun, 10 Aug 2025 20:02:29 +0200 > > > From: Roman Rusch via "Bug reports for GNU Emacs, > > > the Swiss army knife of text editors" > > > > > > Dear Sir or Madam, > > > > > > I've set up emacs rmail to withdraw the emails from two remote > > > Mailboxes (with gnu movemail) and store it in one local inbox by > > > having two entrances in rmail-inbox list like below: > > > > > > rmail-inbox-list '("pops://XXX" > > > "pops://YYY") > > > > > > The password for both accounts are correctly stored in a .authinfo.gpg > > > file, as described in the Info-page "Auth-source" for Emacs. The two > > > passwords are different. > > > > > > The bug is that the command to get the emails always triggers an > > > "authentication failed" for the second account - whatever the order in > > > the above list is. But the authentication always works when in > > > rmail-inbox-list only one account is defined. > > > > > > It took me a while to figure out that rmail is NOT reading in the > > > password from the .authinfo.gpg file at all for the second account, > > > because it already has read in one before and thinks it does not have > > > to do so anymore. As a consequence it uses the password of the first > > > account also for the second one, which causes the "authentication > > > failed" error. > > > > > > I believe I've found the reason for the above problem in the file > > > "rmail.el" -> "defun rmail-get-remote-password". By commenting out the > > > first "when" expression as shown below I could at least make it work > > > again for my case: > > > > > > ;;(when (not rmail-encoded-remote-password) > > > (if (not rmail-remote-password) > > > (setq rmail-remote-password > > > (let ((found (nth 0 (auth-source-search > > > :max 1 :user user :host host > > > :require '(:secret))))) > > > (if found > > > (auth-info-password found) > > > (read-passwd (if imap > > > "IMAP password: " > > > "POP password: ")))))) > > > (rmail-set-remote-password rmail-remote-password) > > > (setq rmail-remote-password nil);;) > > > (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) > > > ) > > > > Thanks. I don't use multiple POP inboxes, so I wonder whether you > > could implement a simple change along the lines below and test it in > > your environment: > > > > . introduce 2 new variables, rmail-remote-password-host and > > rmail-remote-password-user > > . in rmail-get-remote-password record the values of the USER and HOST > > arguments in the above 2 variables > > . replace this condition in rmail-get-remote-password: > > > > (when (not rmail-encoded-remote-password) > > > > with > > > > (when (or (not rmail-encoded-remote-password) > > (not (equal user rmail-remote-password-user)) > > (not (equal host rmail-remote-password-host))) > > > > This should cause Rmail to ask you for the password, but only when it > > needs to fetch email from an inbox different from the one used before. > > Which I think is what you want. > > > Hi Eli, > > Thank you for your email. I can confirm your proposal works with my > environment. Below is what I did around the defun in rmail.el, without > the docstring: > > (setq rmail-remote-password-host "" > rmail-remote-password-user "") > > (defun rmail-get-remote-password (imap user host) > (when (or (not rmail-encoded-remote-password) > (not (equal user rmail-remote-password-user)) > (not (equal host rmail-remote-password-host))) > (setq rmail-remote-password-host host > rmail-remote-password-user user) > (if (not rmail-remote-password) > (setq rmail-remote-password > (let ((found (nth 0 (auth-source-search > :max 1 :user user :host host > :require '(:secret))))) > (if found > (auth-info-password found) > (read-passwd (if imap > "IMAP password: " > "POP password: ")))))) > (rmail-set-remote-password rmail-remote-password) > (setq rmail-remote-password nil)) > (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) > ) Thanks, I've now installed a change along these lines on the master branch, and I'm therefore closing this bug. ------------=_1755950285-13923-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Aug 2025 04:08:10 +0000 Received: from localhost ([127.0.0.1]:46608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ulJpR-0002XF-Pg for submit@debbugs.gnu.org; Mon, 11 Aug 2025 00:08:10 -0400 Received: from lists.gnu.org ([2001:470:142::17]:44162) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ulANj-0004tY-Ad for submit@debbugs.gnu.org; Sun, 10 Aug 2025 14:02:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulANd-0007mn-KL for bug-gnu-emacs@gnu.org; Sun, 10 Aug 2025 14:02:49 -0400 Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ulANX-00071V-E8 for bug-gnu-emacs@gnu.org; Sun, 10 Aug 2025 14:02:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.ch; s=s31663417; t=1754848958; x=1755453758; i=roman.rusch@gmx.ch; bh=kDf3xBLMY2xpD3tXApV1BroZq3qRtMmiyfmnRD65vEw=; h=X-UI-Sender-Class:Date:Message-Id:From:To:Subject:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=r6wgEIflUVRZ9H5nqEga7x99YtaXwUy0uSVre6+DtUwsXVPmCpjKJTDiaR1jn0ly 3esJk+jVTnrmOhjJXcMRGuXkC1wj7EMCYUfAZXWj+4cnkbHvErRO9+VzUTCHORVer 37Oi+yRFDkT32RUNvrgUTeHS7TdWc/u8dYN4ns7xmSdlKCIPQ+sJwE49Q5nn8hi8w oqYf7vxoMo008eclP4quW68n8tg03HnmZ5KE2ZtiQuVnt9Cr0m6am0LpCvdA5T1I5 LOv4eU0EzeCOddU6J7VD3wnSovyKX0G5SFEPD2GoFzGH/cPyu4k5bWw2/QViIqFOy JAx5C7il7sv08Htd6w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from bsdmachine ([212.203.51.62]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MVN6j-1vDRxR215z-00WvUJ for ; Sun, 10 Aug 2025 20:02:38 +0200 Date: Sun, 10 Aug 2025 20:02:29 +0200 Message-Id: <86ectjcax6.fsf@gmx.ch> From: Roman Rusch To: bug-gnu-emacs@gnu.org Subject: 30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg X-Debbugs-Cc: X-Provags-ID: V03:K1:fpnAG2l/YPgNit+QKQkiYCv6RZdsbH+ZDM5sOvoj5GjkhZWArBj FNTmb/7qdqphf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Kar5XlHdcP2Z2nTObYkvl58cLADYM9bPhy+tXQKOn u90r5xhcPDtE8aEMwVZ9UcYEtWTgMTZUhX5k96KS3Gh+9FzFIeSVl6he0MRK9I2wv666OhQHy vVNe+ZTt/1XD7UqlPHExbUTnm01pke95cEsEkUdgAdWF/lPcvACW+qPZUcaMyefAK/QBM7A6n vPlET+uts4oO5AXsBS3dmDXkLFAX1OcGs15jenS6PDY0ZQgeHOOd9i/YrpwhFFQck5hJFKZJS Q0Rl7sZcmY1SVveJq0OGAMnqHVnfRbVgiIVOnzFKpKXt+Oxt7fH1ivgkRSlzsD8EQR6UErc5F IGZ2KzqgbF8E3A6RSoBiRwtPgW1Hexi7XB+8UdA4NzcwDNO/OHMB78fxWb8= Received-SPF: pass client-ip=212.227.15.19; envelope-from=roman.rusch@gmx.ch; helo=mout.gmx.net X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DEAR_SOMETHING=1.973, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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 the administrator of that system for details. Content preview: Dear Sir or Madam, I've set up emacs rmail to withdraw the emails from two remote Mailboxes (with gnu movemail) and store it in one local inbox by having two entrances in rmail-inbox list like below: Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.7 DEAR_SOMETHING BODY: Contains 'Dear (something)' -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (roman.rusch[at]gmx.ch) 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) 0.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 11 Aug 2025 00:08:02 -0400 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: 0.7 (/) Dear Sir or Madam, I've set up emacs rmail to withdraw the emails from two remote Mailboxes (with gnu movemail) and store it in one local inbox by having two entrances in rmail-inbox list like below: rmail-inbox-list '("pops://XXX" "pops://YYY") The password for both accounts are correctly stored in a .authinfo.gpg file, as described in the Info-page "Auth-source" for Emacs. The two passwords are different. The bug is that the command to get the emails always triggers an "authentication failed" for the second account - whatever the order in the above list is. But the authentication always works when in rmail-inbox-list only one account is defined. It took me a while to figure out that rmail is NOT reading in the password from the .authinfo.gpg file at all for the second account, because it already has read in one before and thinks it does not have to do so anymore. As a consequence it uses the password of the first account also for the second one, which causes the "authentication failed" error. I believe I've found the reason for the above problem in the file "rmail.el" -> "defun rmail-get-remote-password". By commenting out the first "when" expression as shown below I could at least make it work again for my case: ;;(when (not rmail-encoded-remote-password) (if (not rmail-remote-password) (setq rmail-remote-password (let ((found (nth 0 (auth-source-search :max 1 :user user :host host :require '(:secret))))) (if found (auth-info-password found) (read-passwd (if imap "IMAP password: " "POP password: ")))))) (rmail-set-remote-password rmail-remote-password) (setq rmail-remote-password nil);;) (rmail-encode-string rmail-encoded-remote-password (emacs-pid)) ) I like rmail a lot for its simplicity and hope this helps to make it even better. Best regards, Roman ------------=_1755950285-13923-1--