spf-discuss
[Top] [All Lists]

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

2004-04-12 21:06:16
--Roy Badami <roy(_at_)gnomon(_dot_)org(_dot_)uk> wrote:

"Meng" == Meng Weng Wong <mengwong(_at_)dumbo(_dot_)pobox(_dot_)com> writes:
    Meng> Excellent point.  Proposed new text:

    Meng>    Some nameservers may split the data in the TXT record
    Meng> into multiple strings due to length limitations.  If the
    Meng> single TXT record returned contains multiple strings, eg.
    Meng> TXT "v=spf1 .... first" "second string..."  then an SPF
    Meng> client MUST concatenate those strings without adding spaces:
    Meng> "v=spf1 .... firstsecond string..."  to form the SPF record.

    Meng> Does this make sense to people?

I don't really like this text, because it puts too much emphasis on
the (non-standard) behaviour of certain nameservers.  Its perfectly
valid to explicitly list multiple strings.  The nameserver behaviour
should be relegated to a footnote.

How about this:

    An SPF record MAY consist of a single TXT record with multiple
    strings. If such an TXT record is encountered, then an SPF client
    MUST concatenate those strings without adding spaces, eg
        TXT "v=spf1 .... first" "second string..."
    MUST be treated as equivalent to
        TXT "v=spf1 .... firstsecond string..."

    TXT records containing multiple strings are useful in order to
    construct more complex SPF records which would otherwise exceed
    the maximum length of a string within a TXT record.

    Note: Many nameserver implementations will silently split long
    strings in TXT records into several shorter strings.


I would also add a clarifying note that says "This does not apply to multiple TXT records but only to multiple sub-strings of the same record"


--
Greg Connor <gconnor(_at_)nekodojo(_dot_)org>