Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howtos:kolab:configuration:spam_fighters [2014/08/21 12:31] (current)
dmorlock Update external wiki for Kolab 3.2
Line 1: Line 1:
 +====== Spam Fighters ======
  
 +Mostly taken from http://​kolab.org/​blog/​tobru/​2013/​03/​19/​kolab-3-anti-spam.
 +===== Postgrey =====
 +  * Install ''​mail-filter/​postgrey'':​
 +<code bash>
 +$ emerge -av postgrey
 +</​code>​
 +  * Add to default runlevel and start:
 +<code bash>
 +$ rc-update add postgrey default
 +$ /​etc/​init.d/​postgrey restart
 +</​code>​
 +  * Change Postgrey listen type to ''​unix'':​
 +<file bash /​etc/​conf.d/​postgrey>​
 +# ...
 +POSTGREY_TYPE="​unix"​
 +# ...
 +</​file>​
 +  * Add Postgrey policy filter to Postfix by adding ''​check_policy_service unix:​private/​postgrey''​ to ''​smtpd_recipient_restrictions'':​
 +<file bash /​etc/​postfix/​main.cf>​
 +#​smtpd_recipient_restrictions = permit_mynetworks,​ reject_unauth_pipelining,​ reject_rbl_client zen.spamhaus.org,​ reject_non_fqdn_recipient,​ reject_invalid_helo_hostname,​ reject_unknown_recipient_domain,​ reject_unauth_destination,​ check_policy_service unix:​private/​recipient_policy_incoming,​ permit
 +smtpd_recipient_restrictions = permit_mynetworks,​ reject_unauth_pipelining,​ reject_rbl_client zen.spamhaus.org,​ reject_non_fqdn_recipient,​ reject_invalid_helo_hostname,​ reject_unknown_recipient_domain,​ reject_unauth_destination,​ check_policy_service unix:​private/​recipient_policy_incoming,​ check_policy_service unix:​private/​postgrey,​ permit
 +</​file>​
 +  * Restart Postfix.
 +<code bash>
 +$ /​etc/​init.d/​postfix restart
 +</​code>​
 +  * Check whether Postgrey is working. You should see some similar after receiving a mail:
 +<code bash>
 +$ grep postgrey /​var/​log/​mail.log ​
 +$ Aug 14 17:05:58 pepper postgrey[21683]:​ action=pass,​ reason=client whitelist, client_name=mail-we0-f181.google.com,​ client_address=74.125.82.181,​ sender=daniel.morlock@gmail.com,​ recipient=daniel.morlock@awesome-mail.de
 +</​code>​