procmail
[Top] [All Lists]

Re: recipe to drop spam depending on numerical hits score

2003-08-12 07:18:49
On Tue, Aug 12, 2003 at 12:29:29PM +0300, ODHIAMBO Washington wrote:

Ehlo everyone ;)

I hope that it's very possible to drop (into the bottomless pit) mail
that have been tagged as spam with a certail score.

You'll want to search the procmail archives (this question comes up
every now and then). The following works for positive scores:

MAXSPAM=9.71
:0
* ^X-Spam-Status:.*hits=\/[0-9\.\-]+
{
        :0:
        * $ -${MAXSPAM}^0
        * $ ${MATCH}^0
        /dev/bottomless/pit
}

A true bottomless pit, of course, needs no lockfile, so strip the
trailing colon off the inner recipe's flags.

I'm not sure how procmail will interpret something like this:

    * $ -${MAXSPAM}^0

when MAXSPAM is -6.3 (i.e., double negative), for example. You'll want
to test that out before using it.

Scott
-- 
Scott Wiersdorf
scott(_at_)perlcode(_dot_)org

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