helo 消息设置为本地主机名

helo 消息设置为本地主机名

我在 DigitalOcean 上有一个 droplet,并决定使用 postfix 和 dovecot 在那里实现我自己的邮件服务器。一切正常,我能够通过邮件客户端(Mac 版 Airmail)发送和接收电子邮件。我的 droplet 是 debian,我按预期设置了所有 DNS 记录。

我设置了以下限制(在 postfix main.cf 上):

    smtpd_banner = $myhostname ESMTP
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_helo_hostname,  reject_invalid_helo_hostname, reject_unknown_helo_hostname, permit
    smtpd_recipient_restrictions = reject_unknown_client_hostname, reject_unknown_sender_domain,  reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated,     reject_unauth_destination, reject_invalid_hostname, reject_non_fqdn_sender

奇怪的是,我的电子邮件被拒绝,是因为我的本地计算机(而不是服务器)上的主机名设置方式。因此,如果我将计算机上的主机名设置为 example.local,则邮件 helo 消息会被拒绝,但如果我将其设置为 example.com,则邮件会被发送。

如果我没记错的话,我的计算机主机名应该不会对发送/接收的电子邮件产生影响。你知道为什么会发生这种情况吗?

答案1

您还应该permit_sasl_authenticated在 的开头添加smtpd_helo_restrictions,因为该部分在收件人限制之前进行评估,并且您的消息将被拒绝,因为example.localPostfix 不认为它是有效的主机名。

相关内容