Skip to content

Instantly share code, notes, and snippets.

@fduran
Created February 20, 2012 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fduran/1870498 to your computer and use it in GitHub Desktop.
Save fduran/1870498 to your computer and use it in GitHub Desktop.
Defending against Spam using Linux Postfix
Defending against Spam using Linux Postfix
www.fduran.com
0) Consider outsourcing mail service
1) Spamassassin: good in its time, it's past its useful life since there are better options and it's a CPU hog.
2) Use black list servers, like Spamhaus and Spamcop:
In Posfix configuration file /etc/postfix/main.cf append:
smtpd_recipient_restrictions = ... reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net
This stops most spam before it's processed further by server.
3) If blacklist wasn't enough then you can also use greylisting: http://rimuhosting.com/knowledgebase/linux/mail/greylisting%20with%20postgrey
---
Somehow related: to check if your mail server is blaclisted: http://www.mxtoolbox.com/Public/Tools/Blacklists.aspx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment