为什么这个 spf 包含的参考会失败?

为什么这个 spf 包含的参考会失败?

我们正在 GoDaddy 的托管 wordpress 产品上设置一个网站。要使邮件通过联系表单发送,我们必须使用中继服务器relay-hosting.secureserver.net。通过联系表单发送的邮件只会内部定向到我们自己的 Office365 托管邮箱。

为了防止 Office365 将邮件标记为垃圾邮件,我们必须正确更新我们的 spf 记录。发送到垃圾邮件时邮件的详细信息表明 IP 地址198.71.225.38需要包含在我们的 spf 中。当我们将其添加到我们的记录中时,它正确地允许 spf 通过并将邮件流到我们的收件箱。然而,邮件可能来自 GoDaddy 使用的各种 IP。

GoDaddy 提供了这个有用的页面,描述了要进行的 spf 更改。https://www.godaddy.com/help/do-i-need-spf-or-dkim-validation-to-send-campaigns-15863

当我进行此更改并添加include:spf.gem.godaddy.com到我们的记录中时,邮件会被 Office365 放入垃圾邮件中。信息再次显示 198.71.225.38 失败。

Received-SPF: Fail (protection.outlook.com: domain of ourdomain.com does not designate 198.71.225.38 as permitted sender)

如果我通过 dns 跟踪记录,我会得到以下结果

ourdomain.com
"v=spf1 ip4:xx.xxx.xxx.xxx/27 include:spf.gem.godaddy.com include:spf.protection.outlook.com -all"

spf.gem.godaddy.com
"v=spf1 include:spf.em.secureserver.net ~all"

spf.em.secureserver.net
"v=spf1 ip4:198.71.244.0/25 ip4:198.71.245.0/25 ip4:198.71.246.0/25 ip4:198.71.247.0/25 ip4:198.71.253.0/24 ip4:198.71.254.0/24 ip4:198.71.255.0/24 ~all"

最终记录中的 IP 块将包括 198.71.225.38,所以我不明白此链中的哪个位置 SPF 会失败。

答案1

简单来说:198.71.225.38不属于以下列出的任何 IP 块include:spf.em.secureserver.net

  • ip4:198.71.244.0/25
  • ip4:198.71.245.0/25
  • ip4:198.71.246.0/25
  • ip4:198.71.247.0/25
  • ip4:198.71.253.0/24
  • ip4:198.71.254.0/24
  • ip4:198.71.255.0/24- 看起来像最近,所以可能你刚才没有注意到255 != 225

您可以使用,因为它通过、和include:secureserver.net进行匹配,从而得到:+ip4:198.71.225.0/24include:spf-ss1.domaincontrol.cominclude:spf-ss2.domaincontrol.cominclude:spf-ss3.domaincontrol.com

Received-SPF: pass (secureserver.net: Sender is authorized to use '[email protected]' 
    in 'mfrom' identity (mechanism 'include:spf-ss1.domaincontrol.com' matched)) 
    receiver=web1.bacb.com.au; identity=mailfrom; envelope-from="[email protected]"; 
    helo=a2nlsmtp01-04.prod.iad2.secureserver.net; client-ip=198.71.225.38

它也完全符合编辑 GoDaddy SPF 记录的指南文档。

相关内容