Zimbra Postgrey
Note: for Zimbra 8.6 and newer
yum -y install epel-release yum -y install postgrey
vim /etc/rc.d/init.d/postgrey
find
OPTIONS="--unix=$SOCKET"
replace with
OPTIONS="--inet=10023"
Centos 7
yum -y install epel-release yum -y install postgrey vim /etc/sysconfig/postgrey
replace the line
POSTGREY_OPTS=”–delay=60″
with
POSTGREY_OPTS=”–delay=300 –inet=10023″
If you are running Zimbra 8.6 or newer
vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
insert
check_policy_service inet:127.0.0.1:10023
before the lines that start with %%
save the file then execute
systemctl start postgrey.service systemctl enable postgrey.service su zimbra zmmtactl restart
Done!
Script to insert line into smtpd_recipient_restrictions.cf
#!/bin/bash egrep '\s*check_policy_service\s*inet:127\.0\.0\.1:10023\s*' /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf RETVAL=$? if [ $RETVAL -eq 0 ]; then exit fi sed -i "1i check_policy_service inet:127.0.0.1:10023" /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf su - zimbra -c "zmmtactl restart"
ref: http://wiki.zimbra.com/index.php?title=Improving_Anti-spam_system#Postgrey