procmail
[Top] [All Lists]

Re: Procmail question using {}

1995-11-30 12:30:37
jjg(_at_)cadence(_dot_)com (John Gianni) said:

JG> procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de, Do you have any 
examples using
JG> the curly braces in Procmail version "v3.10 1994/10/31"? We don't
JG> seem to know the answer here at Cadence. Maybe you folks can help?

        Well, here's one that I use for PGP key exchanges:

SENDMAIL=$HOME/pgpsendmail/pgpsendmail
PGPPATH=$HOME/.pgp
TZ=CST6CDT

:0
* !^From .*(smd|stend|dreschs)
* !^Subject:.*Re:
* !^FROM_DAEMON
* ^Subject:.*PGP.*(trade|exchange)
{

 :0 cW
 | pgp -kaf +batchmode >& /dev/null

 :0 a
 {

  :0 c
  | (formail -rti 'X-Secure: always-secure discard-receipt' ; \
     echo "\tThank you.  Here's my PGP public key:"; \
     sh -c 'pgp -kxf +batchmode dreschs 2> /dev/null') | $SENDMAIL -oi -t

  :0 a
  mail.keys.added.spool

 }

 :0 E
 {

  :0 c
  | (formail -rti 'X-Secure: insecure discard-receipt'; \
     cat $HOME/.pgp/PGPexchange.reject) |  $SENDMAIL -oi -t

  :0:
  mail.keys.bad.spool

 }

}

        (Note for the curious: yes, if you send me someone _else's_
public key, it will be filed in keys.added, but you won't get a reply
unless I already have your key, and I'll never know about it. ;)  Maybe
sometime in the future I'll look at generating a spoof reply.  Then
again, if you spoof it, perhaps you shouldn't get a reply.)

-- 
#include <disclaimer.h>                         /* Sten Drescher */
To get my PGP public key, send me email with your public key and
        Subject: PGP key exchange
Key fingerprint =  90 5F 1D FD A6 7C 84 5E  A9 D3 90 16 B2 44 C4 F3

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