大网数据广告活动
服务器运维问答

SPF record longer than 255 characters in AWS Route53

· 52CE 我爱测

I saw that there's been a couple questions on here that ask the same thing. However, personally, I don't grasp the hint provided. Yes, I've seen https://kb.isc.org/docs/aa-00356 and it only made things worst for me. I use AWS Rou…

问题原文

原帖链接 · Matthew Morcaldi · CC BY-SA 4.0

I saw that there's been a couple questions on here that ask the same thing. However, personally, I don't grasp the hint provided. Yes, I've seen https://kb.isc.org/docs/aa-00356 and it only made things worst for me. I use AWS Route53 for our DNS/TXT records. Please help me understand how I can add include:spf.mandrillapp.com to my TXT record using "include:" examples rather than IP addresses. Thanks in advanced sorry I'm new to DNS.

"v=spf1 ip4:206.190.89.129/27 ip4:54.86.80.254/32 ip4:13.111.0.56/32" include:mail.zendesk.com include:stspg-customer.com include:_spf.google.com include:et._spf.pardot.com include:sendgrid.net include:spf.mandrillapp.com include:mailsenders.netsuite.com ~all"

已采纳解答

原帖链接 · sysadmin1138 · CC BY-SA 4.0

This is typically handled by creating multiple TXT records. You can see _spf.google.com do it.

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

In your case you would create new TXT records similar to...

spf1.example.com  300  IN  TXT  "v=spf1 include:mail.zendesk.com include:stspg-customer.com include:_spf.google.com ~all"
spf2.example.com  300  IN  TXT  "v=spf1 include:et._spf.pardot.com include:sendgrid.net include:spf.mandrillapp.com include:mailsenders.netsuite.com ~all"

And set your SPF record to something like...

"v=spf1 ip4:206.190.89.129/27 ip4:54.86.80.254/32 ip4:13.111.0.56/32 include:spf1.example.com include:spf2.example.com ~all"

The danger to records this large is that the SPF RFC 7208 says in section 4.6.4 that only 10 modifiers that require DNS lookups will be honored by systems doing SPF checks. The google SPF record I quoted includes huge lists of netblocks specifically to avoid hitting this limit, and the rest of your includes all point to netblocks. The SPF record you quoted is at 7 all by itself, and the google include adds 3 more (they have a lot of netblocks).

You're at 10 already. Unfortunately, using the method I mention here will add two more and put you into the zone where mail receivers may not fully query all of your authorized netblocks. You're fast approaching the area where SPF stops being a viable method of control and you'll need to do something like dmarc in order to get the non-repudiation you need. In that case you'd use an SPF record with "v=spf1 +all" which tells mailers that you don't actually care who sends your email and you're using something else. When paired with dkim and DMARC, you get the nonrepudation features you're looking for.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-05-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。