Install Postgrey on CentOS

Activate dag repository

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1

install package

[email protected] ~ # yum install postgrey

edit startup script /etc/init.d/postgrey

#OPTIONS=”–unix=$SOCKET”
OPTIONS=”–whitelist-clients=/etc/postfix/postgrey_whitelist_clients –whitelist
   recipients=/etc/postfix/postgrey_whitelist_recipients –inet=10023 -d –unix=$SOCKET”

startup postgrey when system is bootup

 [email protected] ~ # chkconfig postgrey on

install filter to postfix /etc/postfix/main.cf

smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_policy_service inet:127.0.0.1:10023

edit white-list as you need /etc/postfix/postgrey_whitelist_clients

Check delay from maillog

cat /var/log/maillog | postgreyreport 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.