yum install perl-Mail-SPF
yum install perl-Sys-Hostname-Long
wget https://launchpad.net/postfix-policyd-spf-perl/trunk/release2.010/+download/postfix-policyd-spf-perl-2.010.tar.gz
tar -xf postfix-policyd-spf-perl-2.010.tar.gz
mkdir /usr/lib/postfix
cp postfix-policyd-spf-perl-2.010/postfix-policyd-spf-perl /usr/lib/postfix/
perl /usr/lib/postfix/postfix-policyd-spf-perl
vim /etc/postfix/main.cf
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination,check_policy_service unix:private/policy
policy_time_limit = 3600s
vim /etc/postfix/master.cf
policy unix – n n – 0 spawn user=nobody argv=/usr/bin/perl /usr/lib/postfix/postfix-policyd-spf-perl
service postfix restart