[Exim] Procmail_pipe problems

Top Page
Delete this message
Reply to this message
Author: Kevin Sindhu
Date:  
To: exim-users
Subject: [Exim] Procmail_pipe problems
Hello,

I am having a really bizzare problem. I have a pgp auto-reply configured in my procmailrc (See below), which automatically sends my pgp key out, for those who ask for it. However, it works perfectly when I have
"|/usr/local/bin/procmail -f-" in my .forward, but if I use promail_pipe, it sends the pgp key back my self(Logs below).

I am a bit confused on where I am going wrong. Any help?

-Kevin


------------Procmailrc--------------
########################################
#
# tiny PGP KEY SERVER
#
# If e-mail message has subject of "get pgp key" or
# "send pgp key", then this will reply with my pgp key
# and log the request in $MAILDIR/pgpkey-request.log
#
# Orignally by me (Andrew Cosgriff), MIME niceties added by
# Richard Coleman (coleman@???).
######################################################
MYADDR=kevin@???
FROMSIG="Kevin Sindhu <$MYADDR>"
WHOAMI="Kevin Sindhu <$MYADDR>"
KEYID=1B9EDE5A
PGPKEYLOG=$MAILDIR/pgpkey-request.log
SENDMAIL=/usr/sbin/sendmail

:0 c
* ^Subject:.*(send|get) *pgp *key
* !^X-Loop: $MYADDR
{
        FROM=`formail -rt -xTo:`
    SUBJECT=`formail -xSubject:`
        :0 ch: pgp$LOCKEXT
        | (formail -rI"From: $FROMSIG" \
            -I"Reply-To: $MYADDR" \
            -I"Subject: PGP public key" \
              -I"Mime-Version: 1.0" \
            -I"Content-Type: application/pgp; format=keys-only" \
                -I"Content-Description: PGP key of $WHOAMI" \
            -I"Content-Transfer-Encoding: 7bit" \
            -I"X-Loop: $MYADDR" ;\
            sh -c "gpg --armor --export $KEYID 2>/dev/null") \
       | $SENDMAIL -oi -t
       :0 w: $PGPKEYLOG$LOCKEXT
      | echo "`date` : $FROM : $SUBJECT" >> $PGPKEYLOG
}
------------Procmailrc--------------


---------------log------------------
2001-06-07 10:44:18 1583pS-0005Cl-00 <= kevin@??? H=(fax.tgivan.com) [202
.144.239.157] P=esmtp S=1279 id=3B1FBD40.932647F7@???
2001-06-07 10:44:21 1583pV-0007Ox-00 <= kevin@??? U=kevin P=local S
=2374
2001-06-07 10:44:21 1583pS-0005Cl-00 => kevin <kevin@???> D=procmail T
=procmail_pipe
2001-06-07 10:44:21 1583pS-0005Cl-00 Completed
2001-06-07 10:44:24 1583pV-0007Ox-00 => kevin <kevin@???> D=procmai
l T=procmail_pipe
2001-06-07 10:44:24 1583pV-0007Ox-00 Completed
---------------log------------------