spf-discuss
[Top] [All Lists]

Re: Are spaces allowed in mechanism?

2004-10-01 15:10:07

On Oct 1, 2004, at 1:55 PM, Stuart D. Gathman wrote:

I have been getting a lot of apparently invalid SPF records like this one:

fanjo.com IN TXT "v=spf1 a mx ip4:216.93.165.0 /26 -all"

My software treats the /26 as an unknown mechanism.  Is this in fact
a mangled record?  Or did I miss something in the draft, and my
software should glue the /26 to the previous mechanism?

Yes, this is a mangled record. Spaces are only allowed where explicitly mentioned in the ABNF section at the end of the draft... Now don't go and ask me which draft, that is another thread. But in all of them, spaces have never been allowed between the IP address and the CIDR-mask.

By the way, a similar mistake is for people to write records like this:

        cic-do.de text "v=spf1" "mx" "a:bastion2.wi-ag.de" "-all"

This doesn't work as the separate strings (things between quotes) in a DNS TXT RR record are concatenated *without spaces* before interpretation. So the above records is read like:

        cic-do.de text "v=spf1mxa:bastion2.wi-ag.de-all"

which is clearly gibberish.

        - Mark


<Prev in Thread] Current Thread [Next in Thread>