Enhanced spam filtering and contact list whitelisting

2013-09-30 20:42:30 PST

Tags: , ,

So more spam has been reaching my inbox lately so I’ve been looking to fix that. I updated my spamassassin and amavis and tweeked their rules but that still can only go so far. The way to do better is to make it more aggressive but I don’t want false positives. So the first step seems to be to make it autowhite list people in my address book. To that end I started with the instructions at http://www.iredmail.org/forum/topic2195-iredmail-support-postfixamavisdroundcube-whitelist-addressbooks.html. They tell you how to get amavis to read a file for whitelisting. In my case, my contact list in roundcube is in a different talbe because it’s coming from ownCloud, so I wrote the following script to dump it daily

#!/bin/sh
 
/usr/bin/mysql -u USER -pPASSWORD -D roundcube  -e 'select email from carddav_contacts;' | sed  's/, /\n/' | sed '1d' > /etc/whitelist.amavis

then tossed it into cron and ran it. Now amavis should whitelist people I correspond list. The next step was to dramatically reduce the sa_tag2_level_deflt (I’m trying 3) and set sa_kill_level_deflt to it’s own value (6.31 for me) and then make sure $final_spam_destiny = D_PASS so that I get the spam for now and can file it as spam and ham accordingly to train it. Finally uncomment the @spam_subject_tag2_maps = (‘***SPAM*** _SCORE_ (_REQD_) ‘) line to make sure it’s flagged in the subject.

Now hopefully I should have less false positives from important people, and a lower threshold for detection and I can train it a bit better manually with time.

We shall see.

Leave a Reply

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
22 queries. 0.451 seconds.