[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fixed code
The procmail stuff I sent yesterday was slightly broken. It
seems that keyservers respond well to 'mget 36E61FB1', but not 'get
36E61FB1'
To auto retrieve keys, use these two procmail recipies:
# auto key retreival
:0BW
* -----BEGIN PGP
KEYID=|/usr3/adam/bin/sender_unknown
# I have an elm alias, pgp, points to a keyserver
:0ac
|elm -s"mget $KEYID" pgp
sender_unknown
#!/bin/sh
# sender_unknown returns a keyid, exits 1 if the key is known
OUTPUT=`pgp -f +VERBOSE=0 +batchmode -o /dev/null`
echo $OUTPUT | egrep -s 'not found in file'
EV=$?
if [ $EV -eq 0 ]; then
echo $OUTPUT | awk '{print $6}'
fi
exit $EV