GNU bug report logs -
#79214
30.1; rmail with two remote mailboxes and both passwords in .authinfo.gpg
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
This bug report was last modified 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.