[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45711: 27.1; Ambiguous account match in .authinfo still used by smtp
From: |
Duncan Bayne |
Subject: |
bug#45711: 27.1; Ambiguous account match in .authinfo still used by smtpmail |
Date: |
Thu, 07 Jan 2021 23:12:09 +1100 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
When I have an .authinfo file that contains multiple accounts for the
same host:
machine smtp.gmail.com login duncan@example.org password bazqux port 587
machine smtp.gmail.com login duncan@example.com password foobar port 587
... and have neglected to configure smptmail with the smtpmail-smtp-user
variable in either mu4e context, e.g.:
,(make-mu4e-context
:name "example-com"
:vars '((
;; Should contain, but doesn't ...
;; (smtpmail-smtp-user . "duncan@example.com"
(smtpmail-starttls-credentials . '(("smtp.gmail.com" 587 nil nil)))
(smtpmail-default-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-service . 587))))
... then smtpmail proceeds to authenticate with the *first* matching
account it finds. So in this example, even if I'm using the
duncan@example.com context, it will log in as duncan@example.org.
(In practice this resulted in me sending email with the wrong From:
address, because Gmail unhelpfully and in violation of the relevant RFCs
re-writes the From: header to match the account to which you're logged
in, because STUFF YOU WE'RE GOOGLE. Anyway.)
I think the correct behaviour here would be to have smtpmail to refuse
to send if there's an ambiguous account match in .authinfo. I can't
off-hand think of a single case where I'd *want* it to just take the
first matching account where there are several possibilities.
Details from report-emacs-bug:
In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2020-11-03 built on duncan-w540
Repository revision: 7ff33faa62c0f3ca7b8dee9ec23671d650f827c5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.10
Configured using:
'configure --with-x=yes --with-x-toolkit=lucid
--with-toolkit-scroll-bars --without-gconf --without-gsettings'
Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD
PDUMPER LCMS2 GMP
Important settings:
value of $LANG: en_AU.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8
--
Duncan Bayne
+61 420 817 082 | https://duncan.bayne.id.au/
I usually check my mail every 24 - 48 hours. If there's something
urgent going on, please send me an SMS or call me.
- bug#45711: 27.1; Ambiguous account match in .authinfo still used by smtpmail,
Duncan Bayne <=