spf-discuss
[Top] [All Lists]

Re: SPF Validation Tools - Yet Another One

2005-07-07 12:56:03
On Thu, Jul 07, 2005 at 10:29:48AM -0500, wayne wrote:

" evaluating v=spf1 a mx ptr *all ...
  Results - SPF Permanent Error: Unknown mechanism found: *all
"

should read "unknown qualifier found: *".  This seems to be an
omission in the current specification by the way.

In what way is the current spec unclear on what are correct
qualifiers?

I'm not saying "*" is a valid qualifier.  I'm saying it seems
to me "*all" should be parsed as "<qualifier><word>", from that
moment on we have an unknown qualifier "*" and a known mechanism
"all".

The current ABNF says:

   directive        = [ qualifier ] mechanism
   qualifier        = "+" / "-" / "?" / "~"

So, my reading of the spec says that "*" can not be a qualifier and
therefore "*all" must be a syntax error.

The current ABFN says:

   directive        = [ qualifier ] mechanism
   qualifier        = "+" / "-" / "?" / "~"
   mechanism        = ( all / include
                      / A / MX / PTR / IP4 / IP6 / exists )

So, we try to separate directive "*all" in: [ qualifier ] mechanism

Now match known mechanism "all" and prepend unknown qualifier "*".
This is no less valid than your explanation and IMHO more valid.

If you parse "*all" as the directive, you end up with one of these:

"" "*all"   where qualifier is empty and mechanism is error
"*" "all"   where qualifier is error and mechanism is known

Best match would be one invalid character "*" and three valid
chars "all".  Your way of thinking results in four invalid chars

If you can't see it my way, perhaps say:
  Results - SPF Permanent Error: Unknown directive found: *all

Alex