使用谷歌应用正确配置SPF记录

34

我正在使用谷歌应用程序,谷歌正在处理我的电子邮件。

我已经按照谷歌帮助论坛中提到的创建了SPF记录,但是通过使用check-auth@verifier.port25.com和spf-test@openspf.org进行验证时,SPF记录未通过。

经过一番搜索,我发现谷歌中提到的SPF记录

v=spf1 include:aspmx.googlemail.com ~all

在咨询了一位资深程序员后,我们创建了一个SPF记录,以解决错误和漏洞问题。

v=spf1 a mx include:_netblocks.google.com include:aspmx.googlemail.com include:_spf.google.com ~all

使用上述两种方法,测试已经通过。但是当我发送电子邮件到a###l@ind###########cer.org时,显示投递失败,并显示以下消息。

Delivery to the following recipient failed permanently:

    a###l@ind##########cer.org

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 The sender did not meet Sender Policy Framework rules. Please see http://spf.pobox.com (state 18).

然而,如果我从雅虎或Gmail发送邮件,它会成功送达,有人能帮帮我吗?


好的,我明白了,我的 SPF 已经完美了,需要检查 DomainKeys。 - Subho Halder
2
我想在这里补充一点,一旦您的SPF正确无误,您应该将“~all”更改为“-all”。这会导致冒充您的其他人发送的电子邮件被拒收,这是SPF的主要目的。 - Ladadadada
@Ladadadada 但是谷歌的支持网站表示使用“-all”可能会“引起问题”。因此,看起来我们目前不能安全地充分利用SPF所能提供的优势。 - nextgentech
@nextgentech 把车开出车库也不安全,但如果你不开车就没有意义拥有一辆车。标记~all是测试模式,其中您的SPF记录不起作用。Google支持网站可能指的是如果您在SPF记录中忘记了一个IP,则会反弹合法电子邮件。 - Ladadadada
3个回答

63

以下的 TXT 记录适用于我:

v=spf1 include:_spf.google.com ~all

5
好的,这是正确的设置。 aspmx.googlemail.com 已被 _spf.google.com 替换。 - Devon
16
谷歌的支持网站验证了这个信息:http://www.google.com/support/a/bin/answer.py?answer=178723。 - maxsilver
1
Google居然没有通知客户这件事情? - toxaq
13
以下是适用于谷歌用户的记录,其中包括您域名的谷歌、MX 和 A 记录: v=spf1 a mx include:_spf.google.com ~all (注:该记录为 SPF 记录,表示只有通过谷歌和您指定的 MX 记录发送的电子邮件才被认为是合法的发件人,其他来源的邮件将被视为疑似垃圾邮件。) - David Carboni
2
不确定您是否想要mx,因为我认为谷歌使用的发送服务器与接收服务器不同。有人可以验证一下吗? - JeremyWeir
显示剩余3条评论

3
v=spf1 a mx include:aspmx.googlemail.com include:_spf.google.com ~all

1

v=spf1 include:_spf.google.com ~all 可能是 Google 告诉你要放入其中的内容,但他们的 Google Apps Toolbox MX checker 却无法通过它 :(


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接