Email-Server

反向 DNS PTR 記錄未正確解析

  • October 21, 2020

DKIMM、DMARC、SPF 記錄都在 mxtoolbox 和 mail-tester.com 上傳遞,但 PTR rDNS 失敗。我正在使用 cloudflare DNS

設置:

  • 伺服器主機名:mx.example.com
  • 記錄 mailer.example.com my.real.public.ip 僅 DNS,未代理
  • 僅記錄 mx.example.com my.real.public.ip DNS,未代理
  • MX 記錄 mailer.example.com 30
  • ptr 記錄 my.real.public.ip mx.example.com
  • ptr 記錄 my.real.public.ip mailer.example.com
  • txt 記錄 _dmarc.mailer 的正確內容
  • txt 用正確的內容記錄 dkim._domainkey.mailer
  • txt 記錄郵件內容:v=spf1 mx ~all

當我從 mail-tester.com 執行郵件測試時,出現錯誤:

Your IP address my.real.public.ip is associated with the domain 3(NXDOMAIN).
Nevertheless your message appears to be sent from mx.example.com.

You may want to change your pointer (PTR type) DNS record and the host name of your server to the same value.

Here are the tested values for this check:
IP: my.real.public.ip
HELO: mx.example.com
rDNS: 3(NXDOMAIN)

在 Linux CLI 上,我執行主機 <my.real.public.ip>

Host ip.public.real.my.in-addr.arpa. not found: 3(NXDOMAIN)

當我執行 dig -x my.real.public.ip 時:

; &lt;&lt;&gt;&gt; DiG 9.11.13-RedHat-9.11.13-6.el8_2.1 &lt;&lt;&gt;&gt; -x my.real.public.ip
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NXDOMAIN, id: 20183
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ip.public.real.my.in-addr.arpa.    IN      PTR

;; Query time: 0 msec
;; SERVER: 10.0.0.1#53(10.0.0.1)
;; WHEN: Wed Oct 21 09:31:55 MDT 2020
;; MSG SIZE  rcvd: 55

您需要讓您的 ISP 創建 PTR 記錄

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