GNU bug report logs - #57373
28.1; authinfo keyword smtp-auth does not work

Previous Next

Package: emacs;

Reported by: John Kehayias <john.kehayias <at> protonmail.com>

Date: Tue, 23 Aug 2022 22:02:02 UTC

Severity: normal

Tags: fixed, moreinfo

Found in version 28.1

Fixed in versions 29.1, 28.2

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 57373 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: 57373 <at> debbugs.gnu.org
Cc: John Kehayias <john.kehayias <at> protonmail.com>
Subject: Re: bug#57373: 28.1; authinfo keyword smtp-auth does not work
Date: Wed, 24 Aug 2022 11:30:27 +0200
>>>>> On Tue, 23 Aug 2022 22:01:10 +0000, John Kehayias via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> said:

    John> I believe the problem is that in smtpmail-try-auth-methods
    John> the smtp-auth keyword is read in by auth-source-search as a
    John> string, while the call to smtpmail-try-auth-method that uses
    John> it all match with eql, eg. as (eql 'plain).

Yep.

    John> I have tried different ways to get the smtp-auth value read
    John> differently in my authinfo, to no avail. Looking back at the
    John> devel mailing list, there was some confusion that this
    John> feature needed plstore, but in the end did not:
    John> <https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg00002.html>
    John> I can confirm that reading the authinfo does provide the
    John> smtp-auth keyword, it just won't match any method to call.

    John> Perhaps there is a different format for specifying smtp-auth that I didn't find?

auth-source search always returns a plist containg strings as the key
values. Does the following work for you

diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index c2f8f27377..8573532eac 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -577,7 +577,7 @@ smtpmail-try-auth-methods
                     (stringp result))
           (setq result (catch 'done
 		         (smtpmail-try-auth-method
-                          process (pop mechs) user password))))
+                          process (intern-soft (pop mechs)) user password))))
         ;; A string result is an error.
         (if (stringp result)
             (progn


Robert
-- 




This bug report was last modified 2 years and 274 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.