Re: Retrieving select PGP keys
- To: mutt-users@xxxxxxxx
- Subject: Re: Retrieving select PGP keys
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 21 Nov 2008 16:57:27 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=5pwH0iXpD21M1pil+8e0s89wnAY=; b=MCpU QPuIZGJReZtkU/p1nGSweGtLPp6MRFl+u37WIRMT7vk/LuMZOl+8ZVlIB00QOPvl vnUpjSyCxGaN3dSHJhuCZdSoBgJz8vb/Ok+yTk3veuHMZ86qDfAukMlpf2FnCXi9 0Z1KC1O5ehwEHqdh4w4BrjKPd1NfjUk63LTX52s=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=MZvlp2GycD7BWhCaSwd/HE6qTxoCiTYj00bhUKiu4HhE1v+4qiyhmqrPTvOectlfNpvOStp1gMn5vTkZREBur2J1CjucbeWu5/hQgYAVFr47SFUbN0Q3QlIVZCfiC5xYcZ4HmIysisM9TP71IahKt0DCM+1xXOjfKYenr68ZYYI=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20081121221818.GA77488@xxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20081121221818.GA77488@xxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-11-16)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, November 21 at 05:18 PM, quoth Jorge Luis:
> I want to auto-retrieve PGP public keys for only certain messages.
> I don't want to fill my keyring with keys from mailing lists, for
> example, but I do want to retrieve and verify keys from private
> correspondents.
This can be accomplished pretty easily using a message hook and some
extra variables.
First, put your pgp decode commands in custom variables, like so:
set my_pgpdecode="gpgwrapper.sh --charset utf-8 --status-fd=2 --no-verbose
--quiet --batch --output - %f"
set my_pgpdecrypt="gpg --status-fd=2 --no-verbose --quiet --batch --output
- %f"
Now, store the special argument:
set my_pgplookuparg="--keyserver-options auto-key-retrieve=1"
Then create a few message hooks, like this:
message-hook . 'set pgp_decode_command="$my_pgpdecode $my_pgplookuparg"'
message-hook . 'set pgp_decrypt_command="$my_pgpdecrypt $my_pgplookuparg"'
message-hook ~l 'set pgp_decode_command="$my_pgpdecode"'
message-hook ~l 'set pgp_decrypt_command="$my_pgpdecrypt"'
I haven't tested that; you may have to set up more hooks for the other
pgp-related commands (pgp_verify_command, etc), but that's the basic
idea: messages from mailing lists don't get the auto-key-retrieve
keyserver option. What do you think?
~Kyle
- --
When we blindly adopt any religion, political system, or literary
dogma, we become automatons. We cease to grow.
-- Anais Nin
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkknPNcACgkQBkIOoMqOI17BwQCg1nG+NxXgowVLR0CYrnXfFE99
48wAn31Lc2rXUAYG6k03XElLaogSWk69
=rZob
-----END PGP SIGNATURE-----