From: kevin lyda (kevin at domain ie.suberic.net)
Date: Wed 10 Jul 2002 - 11:01:03 IST
On Wed, Jul 10, 2002 at 10:37:54AM +0100, Gavin McCullagh wrote:
> On Wed, 10 Jul 2002, David Neary wrote:
> > 1) I'd like to register my public key somewhere where others can
> > get it without me having to send it to them
> in .gnupg:
~/.gnupg/options
> keyserver wwwkeys.eu.pgp.net
>
> (or something like that)
once that's configured, type:
gpg --send-key your.email at domain your.domain
> > 2) I'd like to have mails automatically pgp signed on sending
> .muttrc send hooks such as:
>
> send-hook \
> (somebody\ at domain somewhere.org|billy\ at domain william\.com) \
> pgp_autosign=yes; set pgp_autoencrypt=yes"
i wrote the enclosed script to make a file called ~/.muttrc.gpgers.
i then include the file with "source ~/.muttrc.gpgers" in my .muttrc
(the same way you include .mutt_aliases).
specifically i do this:
send-hook . "unset pgp_autoencrypt;set pgp_autosign"
source "~/.muttrc.gpgers"
send-hook ilug at domain linux.ie "unset pgp_autosign;unset pgp_autoencrypt"
i also set the following:
set pgp_getkeys_command="gpg --recv-keys %r > /dev/null 2>&1"
set pgp_replysignencrypted=yes
set pgp_replyencrypt=yes
set pgp_replysign=yes
that means my encryption levels are determined by who i reply to.
in addition it will automagically snarf new keys as they're encountered.
also, the new gpgers script tries to weed out expired keys. if anyone
finds this useful and has a bit of free time and knows how to script
things, i'd love to see a replacement for the pgp_list_pubring_command.
it lists the keys for your recipients, however it's not possible to
set preferences. if i send mail to joe bob and always want to use his
4096 bit key, it would be nice if the listing script only spewed that key
(in which case mutt would automagically use it). currently the command
line is: gpg --no-verbose --batch --with-colons --list-keys %r
kevin
gpgers:
------
#!/bin/sh
if [ ! -f $HOME/.muttrc.gpgers \
-o $HOME/.gnupg/pubring.gpg -nt $HOME/.muttrc.gpgers ]; then
gpg --list-keys --with-colons 2> /dev/null \
| awk -F: '$1=="pub" {a=$7;print $7" "$10} $1=="uid" {print a" "$10}' \
| sed 's/-//;s/-//' \
| awk '$1 > '`date +'%Y%m%d'`' {print $0}' \
| egrep '<.* at domain .*>' \
| sed 's/^.*<\(.*\)>.*$/send-hook "\1" "set pgp_autoencrypt"/' \
> $HOME/.muttrc.gpgers.tmp
mv $HOME/.muttrc.gpgers.tmp $HOME/.muttrc.gpgers
fi
-- kevin at domain suberic.net that a believer is happier than a skeptic is no more to fork()'ed on 37058400 the point than the fact that a drunken man is happier meatspace place: home than a sober one. the happiness of credulity is a http://ie.suberic.net/~kevin cheap & dangerous quality -- g.b. shaw
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:17:47 GMT