邮件无法发送至 Gmail

Ala*_*med 6 email-server centos

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

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

Final-Recipient: rfc822; alauddin088@gmail.com
Original-Recipient: rfc822;alauddin088@gmail.com
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
Run Code Online (Sandbox Code Playgroud)

但我的正向 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.
Run Code Online (Sandbox Code Playgroud)

谁能帮我解决可能出现的问题吗?

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

glt*_*lts 11

正如您从 Google\xe2\x80\x99s 诊断中看到的,您正在使用 IPv6 发送邮件。

\n

用于dig +short mail.myclearmargin.com. aaaa查找您的 AAAA 记录,我\xe2\x80\x99m 没有得到任何地址。这很可能就是问题所在。

\n

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

\n

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

\n
$ spftrace myclearmargin.com 2a02:c206:2061:6136::1\nmyclearmargin.com\n\xe2\x94\x82   "v=spf1 ip4:194.163.151.74 -all"\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 ip4:194.163.151.74 not-match\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 all match result=fail\nfail\n
Run Code Online (Sandbox Code Playgroud)\n

  • 我认为您可以通过搜索“为域设置 AAAA 记录”和“SPF 记录中的 ip6 机制”或类似短语轻松地在线找到答案。请注意,运行邮件服务器不应该轻易完成,您*必须*拥有扎实的管理技能才能做到这一点。 (7认同)