我遵循了本指南(http://www.thenoccave.com/2013/05/08/centos-6-postfix-spf-checking/),但我遇到了以下错误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
以下是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
以下是master.cf
policy unix - n n - - spawn user=nobody argv=/usr/bin/perl /usr/lib/postfix-policyd-spf-perl
我也试过
check_policy_service unix:postgrey/socket,
check_policy_service unix:private/policy,
policy_time_limit = 3600s
以下是完整内容主配置文件。
postfix check
没有报告任何错误。
有一个类似的问题,但它是针对 Debian 和 Python 的。
CentOS 6.6,postfix-policyd-spf-perl 2.01。
答案1
我搞错了 Perl 程序的路径。我很久以前就安装了 SPF 并注释掉了,所以在按照指南操作时,我取消了该行的注释,但它指向了旧位置。我将命令的路径更改为
/usr/lib/postfix/postfix-policyd-spf-perl
它至少可以在日志中提到“未找到文件”。