<<< Date Index >>>     <<< Thread Index >>>

Re: Retrieving select PGP keys



* Jorge Luis <lists@xxxxxxxx> [22.11.08 14:41]:
> * Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> [20081121 16:57 -0600]:
> > 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?
> 
> Thanks, Kyle.
> 
> The gpg.rc that ships with my distribution's mutt includes
> 
> set pgp_getkeys_command="gpg --no-verbose --batch --fetch-keys 
> hkp://subkeys.pgp.net"
> 
> The command needs some tweaking; it leaves my screen in a disarrayed
> state, but I think what I need--and what you put me on to--is a message
> hook that simply excludes ~l.
> -- 
> JL <lists@xxxxxxxx>
> This message optimized for teletypes.
* Ciò letto, correndo sabato 22 novembre 2008, alle 14 e 53 rispondo così:

For garbaged screen try redirecting on /dev/null.

I have:

set pgp_getkeys_command="gpg --recv-keys %r > /dev/null 2>&1"


ciao
Ataualpa aka Francesco Ciattaglia.

--
           /\__  Cosa invecchia presto?  La gratitudine. [Aristotele]
  .--.----'  - \
 /    )    \___/
|  '------.___)
 `---------`
- I love linux, my wife hates it! || www.ataualpa.altervista.org