spf-discuss
[Top] [All Lists]

Re: How to built an SPF record that is split in substrings?

2004-04-06 06:56:40
wayne wrote:

In <8036904(_at_)pamho(_dot_)net> "Roger Moser" 
<Roger(_dot_)Moser(_at_)pamho(_dot_)net> writes:

Look at the SPF record of tdlc.com:

tdlc.com. 3600 IN TXT (
 "v=spf1"
[snip]
 "-all"
 )

Is that valid or invalid? How show SPF concatenate the strings? Should it
insert spaces? Should it insert a space only if the length of string is not
255?

The SPF spec says how to concatenate the strings.  It should not
insert spaces.
Can you point me to that section? I didn't see that. Most resolving libraries that I've seen that concatenate segmented txt records do so with a space separating every item. Our SPF parser, for example, parses the above record as intended by the author. I'm not saying it is correct... But I didn't see in the SPF spec (section 2 is where I assumed it should be) any details concerning the concatenation technique to be used.

If it is ambigious, then I would suggest requiring that the resolver concatenate all TXT segments with a single space separator. If you use "dig" you will see that it does so (as well as quoting them). Obviously, the SPF spec wouldn ot require (or be accepting of) quoting the pieces, but the space seperation is quite intuitive and matches several prior implementations of DNS-related applications.

tdlc.com. 1H IN TXT "v=spf1" "a" "mx" "ptr" "a:smtp.meridiancg.com" "a:email.meridiancg.com" "a:smtp-high.meridiancg.com" "ip4:69.7.105.0/27" "208.20.231.0/24" "-all"

--
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth