procmail
[Top] [All Lists]

Newbie - help please

2004-03-25 08:06:15
Hallo list,

I am in the process of trying to learn very simple procmail scripts.
What I want is to send an autoreponder to all messages and then delete the
message.
The tricky part is I want some to get through, so in effect, all messages
except those having certain keywords in the From: field should get an auto
responder and then the mail gets deleted, the ones I let through should just
get delivered.
This is what I have so far, the keywords here are 'apple', 'pear' and
'potato'. If these are in the From: field they should be allowed through. I
want to match on the exact word, for example a match on apple but not on
appl .

PATH=/bin:/usr/bin:/usr/bin
MAILDIR=/var/spool/mail
LOGFILE=$MAILDIR/from
:0
* !^FROM_DAEMON
* !^From:.*(apple|pear|potato)
* !^X-Loop:account(_at_)server(_dot_)com
| (formail -r -I"Precedence: junk" \
 -A"X-Loop: account(_at_)server(_dot_)com" ; \
cat $HOME/.autoreply ) | $SENDMAIL -t

Can somebody tell me whether this is OK, what potential pitfalls I might get
etc..

Many thanks advance.

Stef




_______________________________________________
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>
  • Newbie - help please, Steffen Bisgaard - Xtrasource <=