spf-discuss
[Top] [All Lists]

Unrecognized Mechanisms and Modifiers

2004-10-14 08:41:03
I don't like supporting unrecognized mechanisms.  This will allow typos and
other error to be ignored.  I am not the first to say this.  But if someone
uses "ipv4", or "prt", these will be ignored.  I think an error should be
returned.

Thanks,
Guy

From the draft:

4.6  Record Evaluation

Implementations MAY choose to parse the entire record first and
   return "PermError" if the record is not syntactically well formed.
   Note: Unrecognized mechanisms are still syntactically well formed.
   See Section 7.1.

7.1  Unrecognized Mechanisms and Modifiers

   New mechanisms can only be introduced by new versions of this
   document.

   Unrecognized mechanisms cause processing to abort: If, during
   evaluation of a record, check_host() encounters a mechanism which it
   does not understand, it terminates processing and returns
   "PermError", without evaluating any further mechanisms.  Mechanisms
   listed before the unknown mechanism MUST, however, be evaluated.

   For example, consider the record:

      v=spf1 a mx ptr foo:_foo.%{d} -all

   If during the evaluation of check_host(), any of the "a", "mx", or
   "ptr" directives match, then check_host() would return a "Pass"
   result.  If none of those directives resulted in a match, then an
   implementation that did not recognize the "foo" mechanism would
   return "PermError".  An implementation that did recognize the "foo"
   mechanism would be able to perform an extended evaluation.