[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: |
Mon, 11 Jan 2021 13:02:31 +1100 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
Lars Ingebrigtsen writes:
> Duncan Bayne <duncan@bayne.id.au> writes:
>
>> What it seems to be doing with (car (... :max 1) is to simply take the
>> first match and use that.
>>
>> What I *think* it should do is either a) error out in the case of an
>> ambiguous match, or b) prompt the use to ask which of the various
>> matches it should use.
>
> As Ted said, it's common to have specific passwords for some services,
> and use a fallback for the rest.
>
> machine foo port smtp password zot
> machine foo port nntp password bar
> machine foo password gazonk
>
> Changing how this works would break people's setups, so we can't do
> that.
In the case you've cited above, there is no bug. I wouldn't change that
behaviour at all. There is only one SMTP account present.
But consider this hypothetical configuration (not so hypothetical,
because as I say, this recently happened to me):
machine foo port smtp login Alice@example.com password zot
machine foo port smtp login bob@example.com password bar
If smtpmail is configured not to specify smtpmail-smtp-user, *and* there
are multiple SMTP accounts in .authinfo, it'll just quietly use the
first account.
This behaviour I argue *is* a bug, because that is almost certainly the
wrong thing to do.
Perhaps to put it another way - can you imagine a case where it
*wouldn't* be a bug for smtpmail to behave in this way? I honestly
can't.
> But I see that this hasn't actually been documented anywhere? So
> I've now added that to the auth manual in Emacs 28.
Thank you :) That would have been helpful at the time this was
initially confusing me, & will hopefully help others too.
--
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.