Local spamassassin rules

I’m the maintainer for a FreeBSD port (hopefully more soon), unfortunately they have made the strange decision to publish all maintainers email addresses completely readable online. Subsequently almost all spam that gets through is being sent to this specific address. Even though it’s few it’s still irritating and I dislike manual repetitive tasks such as filtering spam. I have even considered turning it into a spam trap but that feels like letting the spammers win.

The solution – adding a pair of rules that gives that address an additional spam rating.

Since I run amavisd and Maia to manage filtering on my server the file for my local spamassassin configuration is /var/maiad/.spamassassin/user_prefs

This is pretty much spamassassin 101 but I wanted to share it anyway.

The rules are pretty self explanatory;
header LOCAL_TO_PORTS_ADDR To =~ /ports\@mydomain\.se/i
score LOCAL_TO_PORTS_ADDR 0.5

header LOCAL_BCC_PORTS_ADDR Bcc =~ /ports\@mydomain\.se/i
score LOCAL_BCC_PORTS_ADDR 0.5
(I set a low score here since all that gets through is close to my limit of 5 to begin with)

Restart maiad and it’s done.

Now all mail sent to that address will get an extra 0.5 added to the spam score which should be safe not to trap any ham but give the spam that little push over the edge. Hardly any ham comes in there anyway..

Share

Leave a Reply

Your email address will not be published. Required fields are marked *