Advertisement
fduran

SPAM - Linux Postfix

May 25th, 2011
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. Defending against Spam using Linux Postfix
  2. www.fduran.com
  3.  
  4. 0) Consider outsourcing mail service
  5.  
  6. 1) Spamassassin: good in it's time, it's past its useful life since there are better options and it's a CPU hog.
  7.  
  8. 2) Use black list servers, like Spamhaus and Spamcop:
  9.  
  10. In Posfix configuration file /etc/postfix/main.cf append:
  11.  
  12. smtpd_recipient_restrictions = ... reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net
  13.  
  14. This stops most spam before it's processed further by server.
  15.  
  16. 3) If blacklist wasn't enough then you can also use greylisting: http://rimuhosting.com/knowledgebase/linux/mail/greylisting%20with%20postgrey
  17.  
  18. 4) To drop email from domains (or addresses) that are just spamming:
  19.  
  20. Add them to /etc/postfix/access like:
  21. yahoo.cn DISCARD
  22.  
  23. Add in /etc/postfix/main.cf smtpd_recipient_restrictions = ... hash:/etc/postfix/access
  24.  
  25. Run postmap hash:/etc/postfix/access and restart postfix
  26. ---
  27.  
  28. Somehow related: to check if your mail server is blaclisted: http://www.mxtoolbox.com/Public/Tools/Blacklists.aspx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement