Postfix:收件人地址被拒绝:无效的 HELO/EHLO

Postfix:收件人地址被拒绝:无效的 HELO/EHLO

问题似乎是 MS Outlook 2007 由于某些奇怪的原因没有向仅一个特定域发送 SMTP AUTH。

我为我的域和几十个客户端域运行 iRedMail 服务器(它使用现成的 debian 7/wheezy、postfix 2.9.6-2)。问题是我有一个客户端无法向我自己发送电子邮件(不仅是我的电子邮件,而是整个域) - 它被拒绝,reject_non_fqdn_helo_hostname但客户端正在使用 SMTP AUTH 并已正确设置,因此它应该绕过 FQDN 检查。看起来 MUA 并没有仅对我和我的 coleaques 电子邮件地址使用 SMTP AUTH。

有人见过这种情况吗?我该如何解决这个问题?任何建议都非常感谢!

是不是与 MUA 有关联?她使用的是 Outlook(不是 Express)?

请查看以下显示不同情况的日志片段。所有内容均在相同配置/相同 MUA/IP 中捕获,...:

1) 没问题:我的客户端使用 SMTP AUTH 向第三方服务器发送电子邮件

5 月 28 日 13:02:13 email2 postfix/smtpd[1191]: 从 <censored> 连接
5 月 28 日 13:02:13 email2 postfix/smtpd[1191]: 28A5D35E61DC: client=<censored>, sasl_method=LOGIN, sasl_username=<[电子邮件保护]>
5 月 28 日 13:02:26 email2 postfix/cleanup[1435]: 28A5D35E61DC: message-id=<006c01ce5b92$d33805e0$79a811a0$@cz>
5 月 28 日 13:02:44 email2 postfix/qmgr[376]: 28A5D35E61DC: from=<[电子邮件保护]>,size=4392922,nrcpt=7(队列活动)
5月28日 13:02:44 email2 postfix/smtp[1580]: 28A5D35E61DC: to=<[电子邮件保护]>,中继 = 127.0.0.1[127.0.0.1]:10024,延迟 = 32,延迟 = 31/0/0/0.88,dsn = 2.0.0,状态 = 已发送(250 2.0.0 来自 MTA(smtp:[127.0.0.1]:10025):250 2.0.0 Ok:排队为 B061435E61DE)
5 月 28 日 13:02:47 email2 postfix/qmgr[376]: 28A5D35E61DC: 已删除

2) 没问题:我的客户将电子邮件发送到本地帐户(她的 coleque);她正在使用 SMTP AUTH

5 月 28 日 13:06:18 email2 postfix/smtpd[2519]: 从 <censored> 连接
5 月 28 日 13:06:18 email2 postfix/smtpd[2519]: 49CE735E61D4: 客户端 = <审查>, sasl_method=LOGIN, sasl_username=<[电子邮件保护]>
5月28日 13:06:18 email2 postfix/cleanup[429]: 49CE735E61D4: message-id=<007201ce5b93$5df069c0$19d13d40$@cz>
5 月 28 日 13:06:19 email2 postfix/qmgr[376]: 49CE735E61D4: from=<[电子邮件保护]>,size=10875,nrcpt=1(队列活动)
5月28日 13:06:19 email2 postfix/smtp[2295]: 49CE735E61D4: to=<[电子邮件保护]>,中继=127.0.0.1[127.0.0.1]:10024,延迟=1.6,延迟=1.2/0/0/0.43,dsn=2.0.0,状态=已发送(250 2.0.0 来自 MTA(smtp:[127.0.0.1]:10025):250 2.0.0 Ok:排队为 CC61F35E61D7)
5 月 28 日 13:06:19 email2 postfix/qmgr[376]: 49CE735E61D4: 已删除

3)问题,发送到我的帐户的电子邮件(同一服务器,但不同的域),没有使用 SMTP AUTH???:

5 月 28 日 13:04:38 email2 postfix/smtpd[1433]: 从 <censored> 连接
5 月 28 日 13:04:38 email2 postfix/smtpd[1433]: NOQUEUE: 拒绝:RCPT 来自 <censored>: 554 5.7.1 <my_email>>: 收件人地址被拒绝:HELO/EHLO 无效;必须是 FQDN 或地址文字,而不是“xxx”;来自=<[电子邮件保护]> to=<我的地址> proto=ESMTP helo=
5 月 28 日 13:04:41 email2 postfix/smtpd[1433]: 断开与 <censored> 的连接

Postfix 部分配置:

smtpd_sender_restrictions = permit_mynetworks,
                            拒绝经过身份验证的发件人登录不匹配,
                            允许_sasl_已认证
smtpd_recipient_restrictions = 拒绝未知发件人域,
                               拒绝未知收件人域名,
                               拒绝非 FQDN 发送者,
                               拒绝非 FQDN 收件人,
                               拒绝未列出的收件人,
                               check_policy_service inet:127.0.0.1:7777,
                               check_policy_service inet:127.0.0.1:10031,
                               允许我的网络,
                               允许通过 SASL 进行身份验证,
                               拒绝未授权目的地
smtpd_helo_restrictions = permit_mynetworks,
                          允许通过 SASL 进行身份验证,
                          拒绝非fqdn_helo_主机名,
                          拒绝无效的 helo 主机名,
                          check_helo_access pcre:/etc/postfix/helo_access.pcre

查看输出后置配置猫主配置文件

答案1

HELO/EHLO 发生SMTP 身份验证。如果您的服务器配置了reject_non_fqdn_helo_hostname = yes,它将拒绝任何具有无效主机名的连接进入 SMTP AUTH 部分。

虽然保留此拒绝会减少一些垃圾邮件,但它也会阻止大量合法邮件。您应该仔细查看 Postfix 文档拒绝无效的 helo 主机名smtp_helo_restrictions弄清楚你想让它如何工作。

答案2

smtpd_recipient_restrictions假设所有客户端都表现良好,那么一切正常。但由于它们表现不佳(未发送正确的 HELO),您至少应该有类似

smtpd_recipient_restrictions = reject_unknown_sender_domain, 
                               reject_unknown_recipient_domain, 
                               permit_sasl_authenticated, 
                               reject_non_fqdn_sender, 
                               reject_non_fqdn_recipient, 
                               reject_unlisted_recipient, 
                               check_policy_service inet:127.0.0.1:7777, 
                               check_policy_service inet:127.0.0.1:10031, 
                               permit_mynetworks, 
                               reject_unauth_destination

甚至更好:

smtpd_recipient_restrictions =
    check_recipient_access hash:/etc/postfix/access-recipient-rfc,
    check_client_access cidr:/etc/postfix/access-client,
    check_helo_access hash:/etc/postfix/access-helo,
    check_sender_access hash:/etc/postfix/access-sender,
    check_recipient_access hash:/etc/postfix/access-recipient,
    permit_mynetworks,
    permit_sasl_authenticated, 
    reject_unknown_sender_domain,
    reject_non_fqdn_sender,
    reject_unknown_recipient_domain,
    reject_non_fqdn_recipient,
    reject_rbl_client zen.spamhaus.org,
    reject_rbl_client ix.dnsbl.manitu.net,
    # greylisting
    check_policy_service inet:127.0.0.1:10023,
    # policyd-weight
    check_policy_service inet:127.0.0.1:12525,
    reject_unauth_destination,
    reject_unverified_recipient,
    permit

此外,你应该积分中的所有限制smtpd_recipient_restrictions。因为HELO 先于 SASL 身份验证,允许 SASL 身份验证是没有用的smtpd_helo_restrictions

一般来说,使用是一种很好的做法smtpd_recipient_restrictions,因为您可以在那儿做所有事情,这样可以节省您重复的工作,并且在直升机之后终止的连接的网络开销也不大。

答案3

问题出在 policyd(cluebringer)中……乍一看,从日志中看不出来,拒绝不是来自后缀限制,而是来自 policyd。

背景

我在 cluebringers 组 internal_domains 中只有我的主域(安装后),并且所有新域都不存在...为了解决这个问题,我决定清空 internal_domains,现在一切都按预期工作。

谢谢你的帮助!

相关内容