procmail
[Top] [All Lists]

To and From fields matching

2002-06-21 14:09:15
I have tried this code to send msgs to a file named "spam" if the To &
From fields contain the same info.
All messages however, go to a file named (whatever is in the from
field).
Why is the $SPAMFILE variable being overwritten?
Any ideas?
Thanks!

SPAMFILE = ~/spam
SPAMRULE

:0
* SPAMRULE ?? ^^^^
SENTBY=`formail -z -xFrom:`
*$ ^To:.*$\SENTBY
{ SPAMRULE="Sender and Recipient are the Same" }

:0:
* ! SPAMRULE ?? ^^^^
| formail -A "X-SPAM-RULE: $SPAMRULE" >> $SPAMFILE

--
mv $win /dev/null


_______________________________________________
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>