Setup SpamAssassin anti-spam

From OpenFSG
Jump to: navigation, search

Contents

Having your own mailserver sitting right there in your study is kinda cool. But you might find yourself missing the anti-spam protection you enjoy with commercial email services. Fret no more! SpamAssassin isn't too scary to get going.

NOTE these steps tested on v3.1.29 only. Feel free to play on yours. Or donate a couple of FSGs and I'll play with them ;)

First Steps

These are the easy bits! Open up an SSH session and su to root.

ipkg install spamassassin
ipkg install procmail

Perl support is required, but mine already had it and I don't recall adding it manually, so I suspect it's supplied with the distro.

Time to get your hands dirty

We need to do some configuration work now, and most of it has to be done per user/mailbox, I'm afraid. Unless somebody can come up with a clever script to automate that?

For each user:

:0fw: spamassassin.lock
| /opt/bin/spamassassin
(I guess this file can be the same for every user)
cd /opt/etc/spamassassin
vi local.cf
and uncomment (by removing the hash) the line:
# rewrite_header Subject *****SPAM*****
and probably remove a few of those asterisks too! But that's just personal taste.

And you're done

OK, that's a lie, you still need to test it! From another account, send yourself:

and check the results. With a little luck, only the third one will be tagged as SPAM.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox