Antispam

Rick Moen rick at linuxmafia.com
Mon Jul 14 18:20:39 PDT 2003


Quoting Roy S. Rapoport (rsr at inorganic.org):

> I've had fabulous luck with SpamAssassin on my UNIX mail server.  What does
> the NS7.1 client do with spam? How does it identify it? How configurable is
> it?

I was just looking over my SpamAssassin setup.  Although one can
integrate SA into one's MTA (e.g., http://marc.merlins.org/linux/exim/sa.html),
I instead have it as a system facility that users can apply via their
MDA (procmail) if they so wish.  

Since I _do_ so wish, I have the following two rules in ~/.procmailrc :

:0fw                                                                            
| /usr/bin/spamassassin -P                                                      

 :0:
* ^X-Spam-Flag: YES
$HOME/junkmail

The first runs all my arriving mail through SA for testing and marking.
The second plonks anything with a sufficiently high tested spamicity
into mbox "junkmail".  

As time passes, I slightly tweak the rulesets via my
~/.spamassassin/user_prefs file, including whitelisting some senders and
some (group) recipients, so that the tests remain reliable.  Last, I
have this in my personal configuration file for my MUA, mutt:

folder-hook junkmail push 'D.\n'
message-hook "~h RAZOR" "unignore X-Spam-Status"
macro index S "| spamassassin -r" "report message to Vipul's Razor"


You'll note that, whenever I use mutt to look at the junkmail folder,
all contents get automatically pre-marked as scheduled for deletion.
Thus, all I have to do is un-mark anything that's _not_ spam.

I've found the above setup to be highly effective.  I could improve on
it, but it's both simple and good enough.

-- 
Cheers,              First they came for the verbs, and I said nothing, for
Rick Moen            verbing weirds language.  Then, they arrival for the nouns
rick at linuxmafia.com  and I speech nothing, for I no verbs. - Peter Ellis



More information about the Baylisa mailing list