procmail
[Top] [All Lists]

Re: Recipe to dump mail based om Spamassasin score

2002-08-29 03:10:00
From: bfonsdontsendmecrap(_at_)usermail(_dot_)com

Here is my question, I want mail to be tagged as spam with a score of
10 from Spammassin, and want to dump mail with a score of 16 or so.


I want to go to something like:

:0fw
| /usr/bin/spamc

:0:
X-Spam-Status: Yes, hits=>16
/dev/null

I have tested this but have got nowhere.  Do I need any particular
flags around the > sign?

Procmail doesn't know how to judge the value of raw numbers
found in the regex; and your syntax is not kosher for catching
what comes after "hits=" in the SpamAssassin-edited headers.
This should work, though, with a fairly recent version of
procmail (what's yours?):

        :0
        * ^X-Spam-Status: Yes, hits=\/[^.]+
        {
        :0:
        * MATCH ?? ^^1[0-5]^^
        likelyspam

        :0 E
        /dev/null
        }

That saves mail SA marked as spam (score >=10 according to
your SA ruleset) but less than your absolute ceiling to a
file called likelyspam; and dumps anything else SA identified
as spam (will be 16 or higher) to /dev/null.

Notice the lockfile (second colon) on the first internal-brace
recipe but not on the second.  You didn't really want a lockfile
on your sample that dumped to /dev/null.  (There's nothing to
lock.) 

-- 
dman

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