Re: InterPC.SPF and Test Suite

"Frank Ellermann" <[email protected]> Sat, 28 Jun 2008 16:35:30 +0200
Newsgroups gmane.mail.spam.spf.devel
Organization <URL:http://purl.net/xyzzy>
Message-ID <[email protected]>
Eddy Minet wrote:

> the 4 following tests will fail :
> - a-colon-domain
> - a-colon-domain-ip4mapped
> - mx-colon-domain
> - mx-colon-domain-ip4mapped

Okay, all using e11.example.com: 
| SPF: v=spf1 mx:foo:bar/baz.example.com

> Since InterPC.SPF is using Windows native api for
> Dns lookup, the win api function returns 
> DNS_ERROR_INVALID_NAME_CHAR Winerror because of
> the ':' and '/' chars.

You could wrap it to get the required escaping if
that works:  foo\:bar\/baz.example.com

In theory DNS can do any octet, down to "embedded"
dots or NULs.  SPF directly only supports VCHAR 
minus % (the test suite claims) plus space (with
the macro %_).  

Checking  the spec., no, the test suite comment is
wrong, SPF also supports % with the macro %%.  That
is a missing test case, %% and %_ are supposed to
work (same ides as in e11.example).

> So in real dns lookup, this 4 tests would return
> PermError.

That might be not what you want, normally PermError
means "something with your policy needs to be fixed",
not "my DNS API does not support DNS"... ;-)

Admittedly an obscure case, why on earth do they use
these characters ?  But drawing the line at arbitrary
places (any SPF implementation as it sees fit) would
be worse, e.g., at least "_" must work.

That stuff is also important for %[l}, the local part
macro, unless you decide that you don't support this
at all, period.  Roughly SPF allows to treat local
parts as one or more dot separated domain labels.

And it got the "embedded dot" case wrong, or rather
the spec. is unclear what to do with "embedded dots":

Listed erratum, not yet in sync with the test suite,
http://www.openspf.org/RFC_4408/Errata#permerror-invalid-domains

This erratum is *apparently* also about your problem
with colon and slash, and states "whatever you do, it
is no TempError" (=> either 'no match' or PermError).

But actually this is only about *impossible* queries, 
with an empty label as in "do..ts.example".

> I join the whole test results in XML readable format.

Thanks, do you just want it on public record, or should
it be copied to the Openspf site with a link from the
test suite page ?

 Frank