procmail
[Top] [All Lists]

Newbie question

2003-04-24 14:31:15
Hi,

I sent a message earlier today (probably still sitting with the
moderators) about how to do a specific thing. I don't know if people
would want to use this type of thing, but here is what I was trying to
do.

SpamAssassin kindly scores the messages it filters, and I wanted to sort
spam after a specific fashion. I consider things with a score between 5
and 12 to be a possible false positive, so I want to look through them.
I also consider things with a high score a source of amusement, so I
want to look through them as well. Things between a low and high
watermark I don't mind showing in a folder and forget about until every
sunday afternoon when I have time to scan through subjects in case there
was something that sneaked through.

After having spent lots of time swearing over the search function in the
mailing list archive and long times reading on various webpages (as some
people so fondly like to fob off newbies with RTFM) I have managed to
come up with something that does exactly what I want.

As I thought of this and found it useful, I thought I should share.

The recipe is a follows.

# Recepie to filter out spam between Score 12 and 50
:0
* ^X-Spam-Flag:.*YES
{
  SCORE=`formail -c -xX-Spam-Level | tr -d ' ' | wc -c`
  :0
  * ? [ $SCORE -gt 12 ] && [ $SCORE -lt 60 ]
  CrapMail.mbox
}

As far as I can tell (having looked in many places for a half decent
tutorial) when trying out this recipe on some spam I had lying about, it
works quite well indeed. I.e. it does the job.

Have fun.. :)

-- 
Anders Karlsson <anders(_at_)trudheim(_dot_)com>
Trudheim Technology Limited

Attachment: signature.asc
Description: This is a digitally signed message part

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