电子邮件与 DMARC 策略不匹配,而 SPF 似乎匹配

Email did not match DMARC policy, while SPF seems to match

我为这样的域设置了 DMARC 策略,以打击电子邮件欺骗:

v=DMARC1;p=quarantine;rua=mailto:me@example.com;pct=100;ruf=mailto:me@example.com;fo=0:d:s;aspf=r;adkim=r;

今天我收到一封邮件被拒绝的报告,邮件内容如下:

This is an email abuse report for an email message received from IP 209.85.128.47 on Wed, 13 May 2020 11:49:50 +0200.
The message below did not meet the sending domain's DMARC policy.

据我了解,只有在不符合 SPF 政策和 DKIM 政策的情况下,电子邮件才会被拒绝。事实上,如果通过 fo=0:d:s 两个策略不匹配,我应该只收到失败报告。此域的 SPF 策略是:

v=spf1 a mx include:_spf.google.com include:amazonses.com ip4:12.34.56.78 include:servers.mcsv.net -all

当我查找 _spf.google.com 的 SPF 记录时,它显示:

v=spf1 include:_netblocks.google.com include:_netblocks2.google.com include:_netblocks3.google.com ~all

当我查找 _netblocks.google.com 时,它显示:

v=spf1 ip4:35.190.247.0/24 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all

被拒绝的ip是209.85.128.47,但是好像是209.85.128.0/17里面的。我是否错误地理解了 DMARC 政策,我是否忽略了什么,或者接收主机是否做了一些奇怪的事情?

SPF 始终被视为 From DomainHeader FromFrom Domain 是两个不同的东西。 Header From 是电子邮件地址中@之后的部分。在你的例子中是 example.com。但是发生的是它从 From Domain 检查 SPF。假设在这种情况下它是 us-west-2.amazonses.com。在 DMARC 中,它还会检查正在发送的邮件是否应该在 Header FromFrom Domain 中具有相同的域。在这种情况下这是不同的。这是它失败的主要原因。它在 DMARC 中称为 SPF 对齐。 DKIM 也同样如此。