procmail
[Top] [All Lists]

Re: Procmail doing neat-o things.

2000-07-25 22:52:57

Try this site out.  I am sure I saw a solution for you there:
http://www.procmail.org/jari/pm-tips.html
regards
Andrew

I'm trying to make procmail do an autoresponder based on a code in the
subject.  If it finds a positive match, I want it to send a reply and
disregard the email.  Otherwise, I want it to bounce it to a local mailbox
and send a "Unknown code" reply.  Here is the pertinent stuff I have so
far (No clue how to make it bounce to local user.  Thats my question)

Email addresses removed to protect the innocent

:0 h
* ^TOxx(_at_)xx(_dot_)net
* ^Subject: JSTEST1.*test/\/[^ ]+
* !^FROM_DAEMON
* !^X-Loop: xx(_at_)xx(_dot_)net
{
        :0 h
        | (formail -rtb -I"Precedence: bulk" \
          -I"From: <xx(_at_)xx(_dot_)net>" \
          -A"X-Loop: xx(_at_)xx(_dot_)net"; \
          $REPLYDIR/xx.procexp $MATCH \
        ) | $SENDMAIL -oi -t
}

xx.procexp contains

#!/bin/sh
XXDIR=$HOME/xx/xx/
CODE=$1

if [ -f $XX/$CODE.txt ]; then
        cat $XX/$CODE.txt
else
        cat $XX/unknown.txt
fi

Anyone have any clue how to either 1)  Make the body available to my
program sending the emails so I can deliver the email myself, or 2, still
fork off to sendmail, but make procmail drop through to the next message.

TIA,

Jason

---
Jason Slagle - CCNA - CCDA
Network Administrator - Toledo Internet Access - Toledo Ohio
- raistlin(_at_)tacorp(_dot_)net - jslagle(_at_)toledolink(_dot_)com - WHOIS 
JS10172
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 GE d-- s:+ a-- C++ UL+++ P--- L+++ E- W- N+ o-- K- w---
O M- V PS+ PE+++ Y+ PGP t+ 5 X+ R tv+ b+ DI+ D G e+ h! r++ y+
------END GEEK CODE BLOCK------



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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