Domain-Name-System

Port25.com SPF 測試失敗,gmail SPF 通過

  • September 15, 2014

port25.com當通過發送電子郵件到check-auth@verifier.port25.com使用漂亮的小工具測試我的 SPF 記錄時,

我得到以下 FAIL 結果:

==========================================================
Details:
==========================================================

HELO hostname:  avantgardeweb.co.uk
Source IP:      2002:2e20:e862::2e20:e862
mail-from:      user@greenshieldsarchitecture.co.uk

----------------------------------------------------------
SPF check details:
----------------------------------------------------------
Result:        fail (not permitted)
ID(s) verified: smtp.mailfrom=user@greenshieldsarchitecture.co.uk
DNS record(s):
   greenshieldsarchitecture.co.uk. SPF (no records)
   greenshieldsarchitecture.co.uk. 14400 IN TXT "v=spf1 mx a -all"
   greenshieldsarchitecture.co.uk. 14400 IN MX 10 mail.greenshieldsarchitecture.co.uk.
   mail.greenshieldsarchitecture.co.uk. AAAA (no records)
   greenshieldsarchitecture.co.uk. AAAA (no records)

但是,當我實際向 gmail 帳戶發送電子郵件時,它通過了:

Received-SPF: pass (google.com: domain of user@greenshieldsarchitecture.co.uk designates 46.32.232.98 as permitted sender) client-ip=46.32.232.98;
Authentication-Results: mx.google.com;
  spf=pass (google.com: domain of user@greenshieldsarchitecture.co.uk designates 46.32.232.98 as permitted sender) 

任何人都可以在這裡闡明一下嗎?

看來您發送到 port25.com 的測試電子郵件是通過 IPv6 連接(或 IPv6 源)到達的,因此 SPF 客戶端查找 DNS AAAA RR,而不是通常與 IPv4 源一起使用的 A RR。這就是 SPF 的工作方式(

$$ see RFC7208 Section 5.5 $$$$ 1 $$),但由於您的域缺少 AAAA 記錄,因此“mx”和“a”機制均不匹配,並且 SPF 評估以“-all”結束。在 gmail 的情況下,連接是從 IPv4 地址建立的,因此“mx”或“a”匹配。 如果您使用的是 IPv6,只需為 mail.greenshieldsarchitecture.co.uk 設置一個 AAAA 記錄,這應該可以解決問題。

$$ 1 $$: https://www.rfc-editor.org/rfc/rfc7208#section-5%20%22RFC7208%20Section%205.5)

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