SpamAssassin cumulative rules

When I started using SpamAssassin about one year ago, I didn’t like the fact that even with high Bayes scores messages were not deleted, but marked as spam instead. At the same time Mozilla Thinderbird virtually never made a mistake deciding whether message is a junk mail or not.

On the other hand, messages with low Bayes scores and one or two matches by SA formal rules were getting low overall score too.

I’ve started analyzing messages that Thunderbird marked as junk mail. Soon I came to conclusion which seems quite obvious: if we have both Bayes match and formal rule match, than the overall probability that message is a spam becomes much higher. So, to solve the problem, we have to implement some meta rules that would execute when number of conditions match at the same time.

The implementation is very simple. Some samples from my local.cf below.

Example #1

meta        BAYES_HIGH_BADRELAY ( BAYES_80 || BAYES_95 || BAYES_99 ) && UNPARSEABLE_RELAY
describe    BAYES_HIGH_BADRELAY Unparsable relay in message with high Bayes score
score       BAYES_HIGH_BADRELAY 0 0 3.3 3.3
 
meta        BAYES_AVRG_BADRELAY ( BAYES_50 || BAYES_60 ) && UNPARSEABLE_RELAY
describe    BAYES_AVRG_BADRELAY Unparsable relay in message with average Bayes score
score       BAYES_AVRG_BADRELAY 0 0 1.7 1.7

So, if message contains unparseable relay string and hits Bayes filter with high score, increase overall score by 3.3 (same principle for average Bayes, but increase only by 1.7).

Example #2

meta        BAYES_HIGH_RAZOR2   ( BAYES_99 || BAYES_95 || BAYES_80 ) && RAZOR2_CHECK
describe    BAYES_HIGH_RAZOR2   High Bayes probability matches Razor2 check
score       BAYES_HIGH_RAZOR2   0 0 0 3.5
 
meta        BAYES_AVG_RAZOR2    ( BAYES_60 || BAYES_50 ) && RAZOR2_CHECK
describe    BAYES_AVG_RAZOR2    Average Bayes probability matches Razor2 check
score       BAYES_AVG_RAZOR2    0 0 0 2.7

Same as above: if we have digest network hit along with Bayes filter positive, increase the score accordingly.

The approach described above notably cleans up your mail traffic. The drawback is also obvious: you have to set up a lot of custom rules.

Re: SpamAssassin cumulative rules

Sometimes an idea just resonates. It might be the simplest of plans, such as donating money to a deserving charity. But how a civic-minded organization gets the word out can make all the difference adult hosting.

Target, Inc. is a leader in Corporate Social Responsibility (CSR). It is one of the 20 companies that I am following for a research project for Georgetown University’s Center for Social Impact Communication, so I am familiar with corporate citizenship efforts. I am also a fan and practitioner of social media. I love when the two combine forces.

Reading my Twitter feed this morning, I saw a tweet from @GoParks (the National Park Foundation) asking me and its 1,511 other followers to support America’s National Parks by visiting Target’s Facebook page to vote and help direct the $3 million that Target is donating to charity. @GoParks even provided the link to make it very easy for me to add my support for our National Parks or another charity website templates.

When I clicked on the link, I was very pleased to see that Bullseye Gives, Target’s Community Outreach effort which donates $3 million each week – 5% of its income, was asking site visitors to vote once each day through May 25 for one of 10 selected charities: Breast Cancer Research Fund, Feeding America, HandsOn Network, Kids In Need, National Park Foundation, Operation Gratitude, Parent Teacher Association, Red Cross, Salvation Army and St. Jude Children’s Research Hospital cheap web hosting.

I voted for NPF, which linked news of my support with my Facebook page and allowed me to write an individual call to action to my FB friends. So simple; so gratifying. The FB site also allowed me to see how the voting was proceeding and the donation amount that each deserving charity was earning. Tomorrow, I will vote again. And the next day. Each day through May 25. Such a small action; such a big impact.

I retweeted @GoParks original missive, feeling empowered and wanting my followers to have the opportunity to be socially responsible. Together, through social media, we can all do good together. I hope this plan resonates for you, and you’ll support Bullseye Gives with your vote cheap vps.