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

POSTGREY_OPTS=”–inet= –delay=60″

step 3: add postgrey to postfix
vi /etc/postfix/

#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, reject_rbl_client, reject_rbl_client, check_sender_access hash:/etc/postfix/sender_access, check_policy_service inet:, 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


Comments are currently closed.