spf-discuss
[Top] [All Lists]

Re: SPF Validation Tools - Yet Another One

2005-07-07 17:03:46
Alex van den Bogaerdt wrote:
 
What is obvious to you is not obvious to me.

Sure, otherwise we wouldn't talk about it.  I'm not sure what
the definition of "best match" is, I know shortest and longest.

It's especially messy because you have no match at all, we're
apparently caught in the deserts of the smallest mismatch.

What you could do is something like Wayne's DNS query limit:

Find the longest plausible way in the ABNF before you are sure
that it won't work out.  And then say "bad <whatever>" for the
last considered <whatever>. because it ought to be near to the
real problem:

Way 1: term - directive - mechanism - TILT.
Way 2: term - modifier - unknown-modifier - name - TILT.

That would be "*all is no name" for the longest way, not very
convincing.  What I did was to say "all possibilites for term
don't work, *all is a bad term".

When you find another ABNF covering common errors better let's
see it, but the ABNF in the spec. is okay for valid input.

For a real ugly example see below, just for fun, peace, Frank

msg-id       =  "<" id-local "@" id-domain ">"

id-local     = dot-atom-text / ( DQUOTE id-quote DQUOTE )
id-quote     = ( "." [id-text] ) /
               ( [id-text] "." ) /
               ( [id-text] id-special [id-text] )

id-text      = 1*( atext / "." / id-special )
id-special   = "(" / ")" / "," /       ; all specials, minus ">",
               "[" / "]" / "@" /       ; minus DQUOTE, minus "\",
               ":" / ";" / "<" /       ; minus single ".", plus:
               ".." / "\\" / ( "\" DQUOTE )

id-domain    = dot-atom-text / ("[" id-literal "]")
id-literal   = 1*( %d33-61 /           ; printable ASCII minus
                   %d63-90 /           ; ">", "[", "\", "]"
                   %d94-126 /          ; plus "\[", "\\, "\]"
                   "\[" / "\\" / "\]" )