From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: smtpmail authentication again
Date: Sun, 08 Jan 2012 14:36:44 -0500 [thread overview]
Message-ID: <87fwfqouk3.fsf@lifelogs.com> (raw)
In-Reply-To: <krpqevpo4d.fsf@news.eternal-september.org>
On Sat, 07 Jan 2012 15:45:54 +0100 Richard Riley <rileyrg@gmail.com> wrote:
RR> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Sat, 07 Jan 2012 06:33:11 +0100 Richard Riley <rileyrg@gmail.com> wrote:
>>
RR> So long as the passwords are encrypted in the authinfo.gpg....
>>
>> .gpg files are always encrypted if EPA/EPG is enabled, so yes.
>>
>> You can also encrypt individual passwords in an otherwise unencrypted
>> netrc/authinfo file with `auth-source-netrc-use-gpg-tokens'. But they
>> are not usable with other tools then.
RR> ,----
RR> | Documentation:
RR> | Set this to tell auth-source when to create GPG password
RR> | tokens in netrc files. It's either an alist or `never'.
RR> | Note that if EPA/EPG is not available, this should NOT be used.
RR> `----
RR> I dont understand the docstring. How does auth-source create passwords?
`auth-source-search' can, in some cases, create a whole entry, including
a password. If this is created in an unencrypted file, you can choose
to encrypt just the password. Also there's a "plstore" auth-source
backend (in addition to the "netrc" default backend) which stores
passwords and other secrets safely in an otherwise unencrypted file.
RR> While on the subject, whats the best elisp example/snippet to get a
RR> password from the authinfo based on only machine name or machine name
RR> and user id so I can use this in other elisp apps (e.g use authinfo to
RR> get my irc password from .authinfo.gpg).
Which IRC client? I had a ERC patch a while ago but Deniz Dogan (the
maintainer then IIRC) didn't have the time to work on it. In any case,
I'd rather submit a patch to the IRC client so you don't have to do this
yourself.
To answer your question about how to search, and assuming you don't want
to auto-create entries:
(let* ((auth-info (car
(auth-source-search
:host "yourhost.com"
:user "yourusername"
:max 1
:require '(:user :secret)
:create nil)))
(user (plist-get auth-info :user))
(password (plist-get auth-info :secret)))
(when (functionp password)
(setq password (funcall password)))
(list user password auth-info))
If this returns nil, you can repeat the search without the :user query,
so you'll get any "yourhost.com" entries.
Ted
next prev parent reply other threads:[~2012-01-08 19:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 16:06 Richard Riley
2012-01-03 22:25 ` Lars Magne Ingebrigtsen
2012-01-05 8:03 ` Kostas Zorbadelos
2012-01-05 19:00 ` Richard Riley
2012-01-05 9:29 ` Leo
2012-01-05 19:02 ` Richard Riley
2012-01-07 2:07 ` Ted Zlatanov
2012-01-07 2:16 ` Ted Zlatanov
2012-01-07 2:28 ` Lars Magne Ingebrigtsen
2012-01-07 2:43 ` Ted Zlatanov
2012-01-26 18:58 ` Lars Ingebrigtsen
2012-01-26 22:44 ` Ted Zlatanov
2012-01-27 17:59 ` Lars Ingebrigtsen
2012-01-27 19:17 ` Ted Zlatanov
2012-01-27 18:25 ` Lars Ingebrigtsen
2012-01-28 11:30 ` Steinar Bang
2012-02-01 18:48 ` Ted Zlatanov
2012-02-01 18:53 ` Johann 'Myrkraverk' Oskarsson
2012-02-01 19:02 ` Ted Zlatanov
2012-02-02 7:44 ` Richard Riley
2012-01-07 5:33 ` Richard Riley
2012-01-07 13:10 ` Ted Zlatanov
2012-01-07 14:45 ` Richard Riley
2012-01-08 19:36 ` Ted Zlatanov [this message]
2012-01-10 2:34 ` Richard Riley
2012-01-10 14:37 ` Ted Zlatanov
2012-01-10 14:47 ` Ted Zlatanov
2012-01-11 5:45 ` Richard Riley
2012-01-11 13:39 ` Ted Zlatanov
2012-01-12 23:47 ` Richard Riley
2012-01-11 22:59 ` Eric S Fraga
2012-01-10 16:26 ` Richard Riley
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=87fwfqouk3.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).