我刚刚搬到了一台新服务器,其配置与旧服务器完全相同,除 SPF 外,一切运行正常。以下是我收到的错误消息:
Nov 3 10:49:05 ns3016726 postfix/spawn[16996]: warning: command /usr/bin/python exit status 1
Nov 3 10:49:05 ns3016726 postfix/smtpd[17991]: warning: premature end-of-input on private/policy while reading input attribute name
Nov 3 10:49:06 ns3016726 postfix/spawn[16998]: warning: command /usr/bin/python exit status 1
Nov 3 10:49:06 ns3016726 postfix/smtpd[17991]: warning: premature end-of-input on private/policy while reading input attribute name
Nov 3 10:49:06 ns3016726 postfix/smtpd[17991]: warning: problem talking to server private/policy: Connection reset by peer
以下是 master.cf 部分:
policy unix - n n - - spawn
user=nobody argv=/usr/bin/python /usr/bin/policyd-spf /etc/postfix-policyd-spf-python/policyd-spf.conf
main.cf 部分如下:
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination,
check_policy_service unix:private/policy,
permit
我也尝试使用策略,policyd-spf-perl
但它给出了几乎相同的错误:
Nov 3 11:42:19 ns3016726 postfix/spawn[25476]: warning: command /usr/bin/perl exit status 2
Nov 3 11:42:19 ns3016726 postfix/smtpd[25429]: warning: premature end-of-input on private/policy while reading input attribute name
Nov 3 11:42:20 ns3016726 postfix/spawn[25476]: warning: command /usr/bin/perl exit status 2
Nov 3 11:42:20 ns3016726 postfix/smtpd[25429]: warning: premature end-of-input on private/policy while reading input attribute name
Nov 3 11:42:20 ns3016726 postfix/smtpd[25429]: warning: problem talking to server private/policy: Connection reset by peer
我已尝试设置debugLevel
为/etc/postfix-policyd-spf-python/policyd-spf.conf
5 但没有获得更多详细信息mail.log
...
与我以前的服务器相比,主要的变化是我现在有 2 个接口(OVH Vrack)。ifconfig:
eth0 Link encap:Ethernet HWaddr 00:15:b2:a8:28:56
inet addr:192.168.1.1 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::215:b2ff:fea8:2856/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:353965 errors:0 dropped:0 overruns:0 frame:0
TX packets:503245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46523833 (44.3 MiB) TX bytes:347172834 (331.0 MiB)
Interrupt:20 Memory:df200000-df220000
eth1 Link encap:Ethernet HWaddr 00:15:b2:a8:28:57
inet addr:XXX.80.25.118 Bcast:XXX.80.25.255 Mask:255.255.255.0
inet6 addr: XXXX::215:b2ff:fea8:2857/64 Scope:Link
inet6 addr: XXXX:41d0:c:1076::/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1797021 errors:0 dropped:106 overruns:0 frame:0
TX packets:2341317 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:270131307 (257.6 MiB) TX bytes:2624682043 (2.4 GiB)
Memory:df100000-df17ffff
eth1:0 Link encap:Ethernet HWaddr 00:15:b2:a8:28:57
inet addr:XXX.121.39.211 Bcast:XXX.121.39.211 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Memory:df100000-df17ffff
eth1:1 Link encap:Ethernet HWaddr 00:15:b2:a8:28:57
inet addr:XXX.254.167.3 Bcast:XXX.254.167.3 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Memory:df100000-df17ffff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:30802000 errors:0 dropped:0 overruns:0 frame:0
TX packets:30802000 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18139282003 (16.8 GiB) TX bytes:18139282003 (16.8 GiB)
有人知道发生了什么事或如何调试它吗?
答案1
解决方案很简单,在中master.cf
,我只需添加替换:
/usr/bin/python /usr/bin/policyd-spf /etc/postfix-policyd-spf-python/policyd-spf.conf
经过
/usr/bin/policyd-spf /etc/postfix-policyd-spf-python/policyd-spf.conf