我有多个include:在DNS TXT条目的spf记录中

时间:2015-03-10 05:46:28

标签: dns spf

我需要知道spf的TXT记录的语法。我在我的域DNS条目中添加了spf记录,如下例所示,

  

v = spf1 a mx包括:abc.com包括:bcd.com~all,ttl:14400完成!

这里我用2包括:,它会不会产生任何问题。什么应该是ttl时间,这里我有14400,似乎不是一个完美的时间。

请建议我ttl时间和多少包括:我能否在单个spf1记录中使用。

提前致谢。

3 个答案:

答案 0 :(得分:2)

2 includes will not cause any problems. RFC 7208 - SPF - 4.6.4:

Some mechanisms and modifiers (collectively, "terms") cause DNS queries at the time of evaluation, and some do not. The following terms cause DNS queries: the "include", "a", "mx", "ptr", and "exists" mechanisms, and the "redirect" modifier. SPF implementations MUST limit the total number of those terms to 10 during SPF evaluation, to avoid unreasonable load on the DNS.

In your case, you could technically have 8 includes since you're already using a and mx terms.

The good TTL time will depend on your situation. You might want to lower it if you have migrations in the few next days and increase it otherwise. In your case, it's set to 4 hours, which is not that bad. Take a look at this question for more informations.

答案 1 :(得分:1)

查看http://tools.ietf.org/html/rfc7208,他们说DNS协议限制是512个八位字节。

至于语法,请参阅http://www.openspf.org/SPF_Record_Syntax并注意唯一的TTL是资源记录的一个(即SPF中没有ttl参数)。

答案 2 :(得分:0)

是的,你可以这不是问题。你也可以两个以上。使用您的域名在您的spf txt记录中写下这个。

 v=spf1 include:mail.first.net include:mail.second.com include:_spf.google.com ~all

您可以使用此tool检查此spf是否有效 在设置plesae use this之前,您还验证了自己的域名。