In your message dated Sun, 20 Jul 2003 12:00:33 -0400, Phil Hilton said
that ...
My SpamAssassin install reports spam in the following manner:
X-Spam-Status: Yes, hits=17.6 required=5.0
Mine gives that and a spam-level: (with stars representing scores) so I use:
:0 W
* ^X-Spam-Level:[ ]\*\*\*\*\*
{
:0 hif
| formail -A"X-Puremail: 5 Star Junk"
LOG="$NL Extreme **JUNK** Filter $NL"
:0:
$TRASH
}
:0 W
* ^X-Spam-Flag: YES
{
:0 hif
* ^Subject:[ ]*\/.*
| formail -I"Subject: **JUNK** ${MATCH}"
LOG="$NL Possible JUNK Mail - Flag & Deliver $NL"
:0:
$DELIVER
}
I found a procmail recipe on a website which is supposed to dump
all mail with a spam assassin score higher than X. It attempts to
score the message at -X, and then adds in the score SpamAssassin gave
it to see if it comes out positive. However, I think there is a
syntax error in the regex usage. Can procmail actually capture a
regex match like this? And is it really accessed via $MATCH? My
logging implies that the "MATCH" variable is empty. TIA.
MAXSPAM=10.0
:0
* ^X-Spam-Status: Yes
* hits\=[0-9\.]+
{
LOG="Checking Spam Score...($MAXSPAM vs $MATCH)$NL"
:0
* $ -$ {MAXSPAM}^0
* $ $ {MATCH}^0
{
LOG=" Spam Score Too High - Dropped$NL"
:0
/dev/null
}
}
--
Best Regards,
Tim Rice
---------------
Phuket Thailand
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail