maildrop whitelists and blacklists
SpamAssassin and greylisting are great tools for reducing the amount of spam thats cluttering our mailboxes, however theres always those false positives that in a business environment can become quite critical.
One of the ways to improve the delivery of important emails is to create whitelists, respectively blacklists, to make sure we are not missing anything vital.
Maildrop has some very nice filtering capabilities, but as with any complex software its easy to make mistakes.
It took me some time to play around, trying to create a whitelist, till I found the lookup function which seems the perfect fit for this.
Heres my new mailfilter config which now has a white/black - list.
SHELL=/bin/sh
SPAM="/path/to/spam/Maildir/"
MAILBOX="/path/to/user/Maildir/"
/^From:.*/
getaddr($MATCH) =~ /^.*/;
MATCH=tolower($MATCH)
if ( lookup($MATCH, "geek.ro-blacklist") )
to "$SPAM"
if( lookup($MATCH, "geek.ro-whitelist") )
to "$MAILBOX"
if (/^X-Spam-Status: *Yes*/)
to "$SPAM"
to "$MAILBOX"
the geek.ro-whitelist, geek.ro-blacklist files are just regexes to match against the sender’ email address, (e.g. .*@domain\.com), one per line.