邮件无法发送至 Gmail

邮件无法发送至 Gmail

我在 VPS 上有一个自托管邮件服务器。通过应用程序发送邮件时,我的大多数邮件都被 Google 拒绝。Google 给出了有关邮件的以下消息。

Reporting-MTA: dns; mail.myclearmargin.com
X-Postcow-Queue-ID: BAC4E881209
X-Postcow-Sender: rfc822; [email protected]
Arrival-Date: Mon,  8 Aug 2022 00:03:09 -0700 (PDT)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.25
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.25 [2a02:c206:2061:6136::1] The IP address
    sending this message does not 550-5.7.25 have a PTR record setup, or the
    corresponding forward DNS entry does 550-5.7.25 not point to the sending
    IP. As a policy, Gmail does not accept 550-5.7.25 messages from IPs with
    missing PTR records. Please visit 550-5.7.25
    https://support.google.com/mail/answer/81126#ip-practices for more 550
    5.7.25 information. z4-20020a05640240c400b0043d9832325fsi6139125edb.541 -
    gsmtp

但是我的正向 DNS 和反向 DNS 看起来都没问题。

host mail.myclearmargin.com
mail.myclearmargin.com has address 194.163.151.74

host 194.163.151.74                                   
74.151.163.194.in-addr.arpa domain name pointer mail.myclearmargin.com.

有人能帮我解决一下问题出在哪里吗?

注意:当使用此命令 host mail.myclearmargin.com 时,有时它也会返回 connection timed out; no servers could be reached

答案1

从 Google 的诊断中可以看出,您正在使用 IPv6 发送邮件。

查找dig +short mail.myclearmargin.com. aaaa您的 AAAA 记录时,我没有找到任何地址。这可能是问题所在。

设置必要的 AAAA 记录(IP 地址 2a02:c206:2061:6136::1)或将您的 MTA 配置为仅使用 IPv4。

另外:您的 SPF 记录也仅允许 IPv4 发件人:

$ spftrace myclearmargin.com 2a02:c206:2061:6136::1
myclearmargin.com
│   "v=spf1 ip4:194.163.151.74 -all"
├── ip4:194.163.151.74 not-match
└── all match result=fail
fail

相关内容