How do I get Emacs to use the Mac OS Keychain for my SMTP email password?
I'd like to eschew an .authinfo file in favour of the Mac OS Keychain
but can't seem to get it going. I keep receiving the error
auth-source-macos-keychain-search: The MacOS Keychain auth-source backend doesn't support creation yet.
Some relevant excerpts from my init file:
'(auth-sources (quote (macos-keychain-internet macos-keychain-generic))) '(smtpmail-smtp-server "mail.example.com") '(smtpmail-smtp-service 465) '(smtpmail-smtp-user "email@example.com") '(smtpmail-stream-type (quote ssl)) '(send-mail-function (quote smtpmail-send-it))
I have created an entry with Keychain Access in my default keychain with the following:
- Keychain Item Name:
- Account Name:
The following commands return the password:
$ security find-generic-password -l mail.example.com -a address@hidden -w => password12345 $ security find-generic-password -s mail.example.com -a address@hidden -w => password12345
However, if I eval
(auth-source-search :label "mail.example.com") => nil (auth-source-search :server "mail.example.com") = nil (auth-source-search :label "mail.example.com" :user "address@hidden") => nil
The Mac OS authorisation popup appears, but I can't tell whether it's returning the password...
I have the
security retrieval method working for OfflineIMAP using the
real Keychain entry, so it's not a user/password problem.
I'm happy to switch to another