baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

Setting up Greylisting on Debian GNU/Linux with postgrey for postfix

step 1: install postgrey:
apt-get install postgrey

step 2: adjust greylisting delay
vi /etc/default/postgrey

example:
POSTGREY_OPTS=”–inet=127.0.0.1:10023 –delay=60″

step 3: add postgrey to postfix
vi /etc/postfix/main.cf

#add it to the smtpd_recipient_restrictions list, e.g.:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unlisted_recipient, reject_unauth_destination, check_policy_service unix:private/policy-spf, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_pipelining, reject_invalid_hostname, reject_unverified_recipient, reject_rbl_client bl.spamcop.net, reject_rbl_client zen.spamhaus.org, reject_rbl_client cbl.abuseat.org, check_sender_access hash:/etc/postfix/sender_access, check_policy_service inet:127.0.0.1:10023, permit

step 4: adjust whitelist
vi /etc/postgrey/whitelist_recipients

step 5: reload configuration …

service postgrey reload (this might not work, in that case do a ps -ax |¬†grep postgrey and then kill -9 PID ; service postgrey start …)
service postfix reload

done!

Comments are currently closed.