On Tue, Sep 24, 2002 at 05:35:43PM +0200, Johan Almqvist wrote:
> > Florian Weimer <[EMAIL PROTECTED]> writes:
> > > If I send someone a message, and I've got his key, Gnus doesn't
> > > suggest to encrypt the message.
> This was about Gnus, but can mutt do this?
i use this script:
gpgers.sh:
#!/bin/sh
GPGERS=$HOME/.muttrc.d/gpgers
GPGERS_TMP=$HOME/.muttrc.gpgers.tmp
GPGERS_LOCK=$HOME/.muttrc.d/gpgers.lock
PUBRING=$HOME/.gnupg/pubring.gpg
if [ -f "$GPGERS_LOCK" ]; then
exit
fi
touch $GPGERS_LOCK
if [ ! -f "$GPGERS" -o "$PUBRING" -nt "$GPGERS" ]; then
gpg --list-keys --with-colons 2> /dev/null \
| awk -F: '$1=="pub" {a=$7;gsub("-","",a)}
$1 ~ /uid|pub/ {print a"0 "$10}' \
| awk '$1 == 0 || $1 > '`date +'%Y%m%d0'`' {print $0}' \
| egrep '<.*@.*>' \
| sed 's/^.*<\(.*\)>.*$/send-hook "\1" "set pgp_autoencrypt"/' \
| sort -u \
> "$GPGERS_TMP"
mv "$GPGERS_TMP" "$GPGERS"
fi
rm "$GPGERS_LOCK"
i run this from cron every hour. i then include the file
$HOME/.muttrc.d/gpgers (see the GPGERS var to change it). some people i
know with gpg keys don't like encrypted mail regularly (read: pine users)
so i list their send-hooks after the include gpgers line.
kevin
--
[EMAIL PROTECTED] "How do we know Saddam has weapons of mass
fork()'ed on 37058400 destruction? We looked at the receipt."
meatspace place: home--Bill Hicks
http://ie.suberic.net/~kevin