procmail
[Top] [All Lists]

Re: simple receipe to handle 'get pgp keys'

1999-12-09 20:15:48
1999-12-09-00:11:46 Raju K V:
Can somebody suggest a simple receipe to handle 'get pgp keys'?
I am using procmail v3.11pre7 and gnupg 1.0.0

Well, I'd start by dumping the key out in the format you want to export it; I
would _not_ run gpg to export the key in direct response to the email. So e.g.

        gpg -a --export <your-key-id> >$HOME/.gnupg/mykey.txt

This reduces it to problems nicely illustrated with examples in procmailex(5);
extrapolating from them, perhaps

        :0 h c
        * !^FROM_DAEMON
        * !^X-Loop: your(_at_)own(_dot_)mail(_dot_)address
        * ^Subject: get pgp keys$
        | (formail -r -I"Precedence: junk" \
                -A"X-Loop: your(_at_)own(_dot_)mail(_dot_)address" ; \
                cat $HOME/.gnupg/mykey.txt) | $SENDMAIL -t

(untested) A couple of comments:

(1) That's pretty strict; it requires that the command be precisely "get pgp
    keys", nothing else, and only in the subject (ignores the body). That may
    be a good idea; make it too tolerant and it would have barfed back a key
    at you for your posting to this list. Which brings up another one...

(2) Make _certain_ this is after all your rules that file your mailing list
    traffic into other folders!

-Bennett

Attachment: pgpVIu4ngsCWO.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>