Postfix阻止来自备份MX的邮件

我有两台configuration了Postfix的CentOS 6.6服务器来发送邮件。 我有一切工作很好,SPF条目,域名键和OpenDKIMconfiguration和工作,但我想完善我的备份邮件服务器。 目前,如果我closuresmx1并发送一封电子邮件,它会在mx2上排队等待。 一旦我在mx1上启动Postfix,邮件就会被发送出去,但是由于SPFfilter的原因,mx1会拒绝它。 我已经尽了一切努力来实现这个目标,但是这只是不按照预期的方式工作。

mx2被configuration为中继我发送给域的邮件。 我的main.cf中也有mynetwork中备份MX的IP地址

mx1 = bluemoon.domain.tld

mx2 = surly.domain.tld

日志:

MX2:

Apr 28 08:23:31 surly postfix/smtpd[13015]: 4B37B35E1092E: client=sender1.zohomail.com[74.201.84.162] Apr 28 08:23:31 surly postfix/cleanup[13020]: 4B37B35E1092E: message-id=<[email protected]> Apr 28 08:23:31 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: handlers_stderr: SKIP Apr 28 08:23:31 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: SKIP during call 'limit-out' handler Apr 28 08:23:31 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: handlers_stderr: SKIP Apr 28 08:23:31 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: SKIP during call 'check-quota' handler Apr 28 08:23:31 surly spf filter[13024]: Starting spf filter... Apr 28 08:23:32 surly spf filter[13024]: SPF result: pass Apr 28 08:23:32 surly spf filter[13024]: SPF status: PASS Apr 28 08:23:32 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: handlers_stderr: PASS Apr 28 08:23:32 surly /usr/lib64/plesk-9.0/psa-pc-remote[23410]: PASS during call 'spf' handler Apr 28 08:23:32 surly opendkim[680]: 4B37B35E1092E: sender1.zohomail.com [<IP ADDR>] not internal Apr 28 08:23:32 surly opendkim[680]: 4B37B35E1092E: not authenticated Apr 28 08:23:32 surly opendkim[680]: 4B37B35E1092E: no signature data Apr 28 08:23:32 surly postfix/qmgr[2080]: 4B37B35E1092E: from=<[email protected]>, size=3236, nrcpt=1 (queue active) Apr 28 08:23:32 surly postfix/smtp[13025]: connect to mx1.domain.tld[<IP ADDR>]:25: Connection refused Apr 28 08:23:32 surly postfix/smtpd[13015]: disconnect from sender1.zohomail.com[74.201.84.162] Apr 28 08:23:32 surly postfix/smtp[13025]: 4B37B35E1092E: to=<[email protected]>, relay=none, delay=1.4, delays=1.3/0.01/0.02/0, dsn=4.4.1, status=deferred (connect to mx1.domain.tld[<ip addr>]:25: Connection refused) Apr 28 08:24:21 surly postfix/qmgr[2080]: 4B37B35E1092E: from=<[email protected]>, size=3236, nrcpt=1 (queue active) Apr 28 08:24:21 surly postfix/smtp[13025]: 4B37B35E1092E: to=<[email protected]>, relay=mx1.domain.tld[<ip addr>]:25, delay=51, delays=50/0/0.04/0.6, dsn=5.7.1, status=bounced (host mx1.domain.tld[<ip adr>] said: 550 5.7.1 Command rejected (in reply to end of DATA command)) Apr 28 08:24:21 surly postfix/cleanup[13020]: D1B1C35E10940: message-id=<[email protected]> Apr 28 08:24:21 surly postfix/qmgr[2080]: D1B1C35E10940: from=<>, size=5422, nrcpt=1 (queue active) Apr 28 08:24:21 surly postfix/bounce[13050]: 4B37B35E1092E: sender non-delivery notification: D1B1C35E10940 Apr 28 08:24:21 surly postfix/qmgr[2080]: 4B37B35E1092E: removed 

MX1:

 Apr 28 08:24:21 s18267928 postfix/smtpd[27039]: connect from surly.domain.tld[<ip>] Apr 28 08:24:21 s18267928 postfix/smtpd[27039]: 3A2F9708C90E: client=surly.domain.tld[<Ip>] Apr 28 08:24:21 s18267928 postfix/cleanup[27044]: 3A2F9708C90E: message-id=<[email protected]> Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: handlers_stderr: SKIP Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: SKIP during call 'limit-out' handler Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: handlers_stderr: SKIP Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: SKIP during call 'check-quota' handler Apr 28 08:24:21 s18267928 spf filter[27047]: Starting spf filter... Apr 28 08:24:21 s18267928 spf filter[27047]: SPF result: softfail Apr 28 08:24:21 s18267928 spf filter[27047]: SPF status: REJECT Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: handlers_stderr: REJECT Apr 28 08:24:21 s18267928 /usr/lib64/plesk-9.0/psa-pc-remote[19488]: REJECT during call 'spf' handler Apr 28 08:24:21 s18267928 postfix/cleanup[27044]: 3A2F9708C90E: milter-reject: END-OF-MESSAGE from surly.<domain.tld>[<ip addr>]: 5.7.1 Command rejected; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<surly.domain.tld> 

基于这个日志

 Apr 28 08:24:21 s18267928 postfix/cleanup[27044]: 3A2F9708C90E: milter-reject: END-OF-MESSAGE from surly.<domain.tld>[<ip addr>]: 5.7.1 Command rejected; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<surly.domain.tld> 

显然是被Postfix调用的Plesk Milter拒绝的邮件。 所以我们在这里有两个select:

  1. 排除IP地址,所以后缀将不会提供电子邮件milter检查。

    不幸的是没有直接的参数来控制这个。 解决方法是在master.cf中设置新的smtpd服务并添加no_milters参数。 例如,请参阅此文档 。

  2. 告诉plesk将SPF支票的特定IP地址列入白名单。

根据这个线程: 任何方式closuresPlesk的特定IP的SPF检查? ,可以将SPF检查的特定IP地址列入白名单。 刚刚设置

 ip4:abcd 

SPF本地规则选项。