Centos

郵件無法通過 gmail

  • August 10, 2022

我在 VPS 上有一個自託管的郵件伺服器。通過應用程序發送郵件時,我的大部分郵件都被Google拒絕了。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

但是我的正向 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

從 Google 的診斷中可以看出,您正在使用 IPv6 發送郵件。

用於查找您的AAAAdig +short mail.myclearmargin.com. 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

引用自:https://serverfault.com/questions/1107787