procmail
[Top] [All Lists]

Multiple Subjects in - Multiple Subjects out

1997-01-30 14:15:09
Here's what I want to do, but get nothing more than errors when
I try: I'm sure that will be obvious to anyone who's not so
lame at this as I.

Paul


when a message comes in with the:
Subject open case
I want to reply with a Subject line that says:

Subject: CASE-2450


when a message comes in to the same address with:
Subject: help

I want to reply with a different file and Subject line.

when a message comes in requesting info on a product
Subject: Red Tricycle

I want to reply with a Subject: info you requested on the red tricycle
etc, etc, etc......


Here's how I set it up, and haven't been able to make it work.
Also .... I want the counter to be the first thing that's run
should the subject be: open case


:0ic
* !^X-Loop: username(_at_)xxxx(_dot_)com
* ^To:.*username
* ^Subject:.*open case
| /users/username/countmail.ksh

:0hb
* !^X-Loop: username(_at_)xxxx(_dot_)com
* ^Subject:.*open case
   { SUBJECT=`cat $HOME/.counter` }
   { NEWSUB=`echo CASE-$SUBJECT` }
   | ( formail -r -I"Subject: $NEWSUB " -A"Precedence: bulk" ; \
       /bin/cat /users/username/case_reply ) | $SENDMAIL -oi -t

:0hb
* !^X-Loop: username(_at_)xxxx(_dot_)com
* ^Subject:.*help
   { NEWSUB=`echo Response to request for help` }
   | ( formail -r -I"Subject: $NEWSUB " -A"Precedence: bulk" ; \
       /bin/cat /users/username/case_reply ) | $SENDMAIL -oi -t

:0hb
* !^X-Loop: username(_at_)xxxx(_dot_)com
* ^Subject:.*Red Tricycle
   { NEWSUB=`echo info you requested about our red tricycle` }
   | ( formail -r -I"Subject: $NEWSUB " -A"Precedence: bulk" ; \
       /bin/cat /users/username/trikes/red ) | $SENDMAIL -oi -t

<Prev in Thread] Current Thread [Next in Thread>
  • Multiple Subjects in - Multiple Subjects out, Paul Keller <=