[ale] Procmail... ?

Jason Day jasonday at worldnet.att.net
Thu Sep 25 14:47:30 EDT 2003


On Thu, Sep 25, 2003 at 01:56:33PM -0400, Robert L. Harris wrote:
> I've got spamassassin + procmail working happily.  By default if it has
> a score of 5.1 I save the email to ~/Spam.  Since spamassassin saves the
> number of hits (7.3, 15.2, 35.1, etc) in the headers, is it possible for
> procmail to /dev/null anything with a score of 10.0+ and then put
> anything between 5.1 and 9.9 in the ~/Spam?

An easier way to do this is to have procmail match against the
X-Spam-Level header.  By default, spamassassin sets this header with a
number of `*'s equal to the int value of the score.  So, for example, if
a message has a score of 6.2, the level header would look like this:

X-Spam-Level: ******

Assuming that SA is setting this header for you, then the following
recipes should work (but this is totally untested):

:0:
* ^X-Spam-Level: \*{5,9}
$(HOME)/Spam

:0:
* ^X-Spam-Level: \*{10,}
$(HOME)/HiScoreSpam

When you've convinced yourself that this works as expected, change
$(HOME)/HiScoreSpam to /dev/null .

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9



More information about the Ale mailing list