I followed this guide (http://www.thenoccave.com/2013/05/08/centos-6-postfix-spf-checking/) but I'm getting the following errors in maillog
:
May 8 22:15:13 ip-172-31-15-65 postfix/smtpd[1999]: warning: premature end-of-input on private/policy while reading input attribute name
May 8 22:15:14 ip-172-31-15-65 postfix/spawn[2037]: warning: command /usr/bin/perl exit status 2
May 8 22:15:14 ip-172-31-15-65 postfix/smtpd[1999]: warning: premature end-of-input on private/policy while reading input attribute name
May 8 22:15:14 ip-172-31-15-65 postfix/smtpd[1999]: warning: problem talking to server private/policy: Connection reset by peer
Here is part of main.cf
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
permit_sasl_authenticated,
reject_unauth_destination,
permit_inet_interfaces,
check_policy_service unix:postgrey/socket,
check_policy_service unix:private/policy policy_time_limit = 3600s
Here is part of master.cf
policy unix - n n - - spawn user=nobody argv=/usr/bin/perl /usr/lib/postfix-policyd-spf-perl
I also tried
check_policy_service unix:postgrey/socket,
check_policy_service unix:private/policy,
policy_time_limit = 3600s
Here is the full master.cf.
postfix check
doesn't report any errors.
There was a similar question, but it was for Debian and Python.
CentOS 6.6, postfix-policyd-spf-perl 2.01.
I had the path to the Perl program wrong. I had SPF installed a long time ago and commented out, so when following the guide, I uncommented that line, but it pointed to the old location. I change the path of the command to
It could have at least mentioned 'file not found' in the logs.