procmail
[Top] [All Lists]

spamassassin hit capturing

2003-07-20 09:09:05
Hello all,

        Last time I bug ya'll.... I hope.

        My SpamAssassin install reports spam in the following manner:

                X-Spam-Status: Yes, hits=17.6 required=5.0

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

-----------------------------------------------
Phil Hilton
philip(_dot_)hilton(_at_)maine(_dot_)edu

Oracle - You need a database. Larry needs a new boat.
 MySQL - Larry can buy his own damn boat.

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