I have updated the TXT
(SPF) records in my domain hosted DNS without the space.
I have tried to check the updated the TXT
record in the linux terminal using the dig
and host
commands, but I’m seeing extra white space in the updated record.
For example:
The updated record in the DNS:
"v=spf1 spf.protection.outlook.com 1.2.3.4 -all"
But the output getting in the terminal using the command "dig txt domain.com +short"
"v=spf1 spf.protection. outlook. com 1.2" "3.4 -all"
checked with all type of OS platform terminals (Linux-CentOS, Ubuntu,Windows-CMD, Mac OS terminal).
Note: I have tried to eliminate the space using the sed
command and it has worked.
I just want to confirm where the issue is, whether it is from the DNS provider or elsewhere.
2
Answers
DNS has a limit in the amount of text it will allow in a single string, however, you can work around this by breaking it up into multiple double-quoted, space-separated strings according to the standard defined by RFC4408 section 3.1.3:
It’s common to see this in large records, especially DKIM keys and long SPF records. It looks like your provider is possibly doing this automatically, and is nothing to worry about, so long as you’re not creating records that are nearing the 512-byte limit.
you can use one of online SPF record lookup tools to troubleshoot various issues with SPF record, e.g. this one -> https://easydmarc.com/tools/spf-lookup