Here at ProgClub, as moderator for our mailing lists, I get a bunch of spam that I have to get rid of every day, to keep our lists sparkling and spam-free. I regularly get spam from senders from ofenews.co.uk, and I wanted to add their entire domain to a blacklist on our mail server… I hadn’t configured a Postfix blacklist before, so I did a little research and came up with this:
I created a file /etc/postfix/sender_access like this:
Then I created the access database:
# postmap /etc/postfix/sender_access
Then I added the sender restrictions into /etc/postfix/main.cf:
Then I restarted postfix and was done! Everything is easy when you know how.
For reference, here is the doco which I read to help me:
Today I figured out how to specify whitelist and blacklist email addresses in SpamAssassin.
At the end of /etc/spamassassin/local.cf I added two lines:
Then in the /etc/spamassassin/whitelist file I added some email specifications, e.g.:
jj5@sixsigma:~$ cat /etc/spamassassin/whitelist
# Allow email from system services, e.g. from
# firstname.lastname@example.org or email@example.com
# Similarly for blackbrick:
The /etc/spamassassin/blacklist file exists and is ready to go, but I haven’t blacklisted anything yet:
jj5@sixsigma:~$ cat /etc/spamassassin/blacklist
# No email addresses blacklisted yet.
There’s some more information on Whitelising a user.
At some point I hope to write a script that processes my users’ maildirs and whitelists everyone they’ve emailed.