all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Rankin <paul@tilk.co>
To: "help-gnu-emacs\@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Mac OS Keychain with SMTP
Date: Tue, 25 Nov 2014 15:15:15 +1000	[thread overview]
Message-ID: <m2y4qz97z0.fsf@tilk.co> (raw)

Hello,

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 "user@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:  mail.example.com
Account Name:        user@example.com
Password:            password12345

The following commands return the password:

    $ security find-generic-password -l mail.example.com -a user@example.com -w
    => password12345
    $ security find-generic-password -s mail.example.com -a user@example.com -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 "user@example.com")
    => 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 `send-mail-function`. If anyone has
working SMTP email with Mac OS Keychain auth I would love some pointers :)

Many thanks,

-- 
Paul W. Rankin
http://www.paulwrankin.com

Before printing this email please take a moment to think about the
environment. Just stop and think about it. Think about the last time you
were walking alone in a forest, how you felt at peace, how a wave of
clarity seemed to overcome you and you had to stop and reevaluate your
life, what you're doing with the limited time you have here. "Damn," you
thought, "life is so precious. I should really be doing ______." Are you
doing that now? Why not? Go on, pick up your computer and throw it out
the window! It'll be great, like that scene from Network where everyone
starts yelling "I'M MAD AS HELL AND I'M NOT GOING TO TAKE THIS ANY
MORE." That'll be you, but it will be real. Now's your moment.



             reply	other threads:[~2014-11-25  5:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  5:15 Paul Rankin [this message]
     [not found] <mailman.14515.1416892539.1147.help-gnu-emacs@gnu.org>
2014-11-25  9:58 ` Mac OS Keychain with SMTP Ted Zlatanov
2014-11-26  5:56   ` Paul Rankin
     [not found]   ` <mailman.14638.1416984364.1147.help-gnu-emacs@gnu.org>
2014-11-26 14:08     ` Ted Zlatanov
2014-11-28  3:45       ` Paul Rankin
2014-11-28  4:13         ` Paul Rankin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2y4qz97z0.fsf@tilk.co \
    --to=paul@tilk.co \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.