Subject: bug#22824: Use smtpmail-smtp-user if auth-source-search doesn't return user field

From: Jun Hao <[email-masked]>
Date: Sun, 28 Feb 2016 17:07:19 +0800

I'm working on fix auth-source-search. This is actually affecting any
field (including password) with these kind of symbols and non-ASCII chars. Will post a patch
once I'm done.

I think it's safe to assume what auth-source-search returns should match
smtpmail-smtp-user and no harm to fallback to it. But if you think it's
confusing, let's just drop this patch.

It's utf-8 encoded.

On 2016-02-28 at 13:32, Lars Ingebrigtsen <[email-masked]> wrote:
> Jun Hao <[email-masked]> writes:
>
>> Long term is to fix auth-source-search. Looks like it missed this case
>> in auth-source-macos-keychain-search-items. If account has '\' in it,
>> security will return something like:
>>
>> "acct"<blob>=0x414E545C6A756E68616F  "ANT\134junhao"
>>
>> instead of form current code expects:
>>
>> "acct"<blob>="junhao"
>>
>> Even auth-source-search is fixed, I still think this patch is nice
>> to have to make smtpmail more robust.
>
> Well, this is purely a bug in auth-source, so I think a workaround in
> smtpmail.el would just be confusing.
>
> What is that encoding of the user name that the MacOS keychain uses?