spf-discuss
[Top] [All Lists]

Re: Case Sensitivity

2004-07-31 23:20:19
In <1091328100(_dot_)16704(_dot_)18(_dot_)camel(_at_)code3> James Couzens 
<jcouzens(_at_)6o4(_dot_)ca> writes:

- Are all DNS-related issues supposed to be case-insensitive, so this
does not need to be in the spec, but certain implementations have
implemented it wrong?

This is a bug in "libspf-alt" AKA "libspf2".  This sort of behaviour is
common with immature and developing libraries.  Feel free to inform this
individual that they might wish to give one of the other implementations
a try.  

Since I am clearly biased as the author of libSPF, (although I would
recommend using it), I am left to advise that the individual in question
consult the spf.pobox.com website and select an alternative library
immediately to avoid further problems.  Given that age is often a good
gauge as to maturity one might look at the Mail::SPF:Query
implementation which has spent the longest time in the wild.

Calm down James.

Yes, I left out two tolower()'s in SPF_eval_id.c in libspf2. It is a
bug.  It can be fixed with the following patch:

601c603
<                                   && *pc-- == *ps-- )
---
                                  && tolower( *pc-- ) == tolower( *ps-- ) )


However, I'm not sure how the heck libspf even comes close to
implementing the algorithm specified by the SPF spec.  Libspf seems to
assume that that only the top two parts of the domain should be
compared and some other strange stuff (validating the domain in
ptr:domain.tld?)

libspf fails to correctly evaluate this check:

spfquery -ip 206.222.212.234 -sender 
cwjobs-e2-27265112(_at_)ptr1(_dot_)test(_dot_)midwestcs(_dot_)com -helo 
DAL1BS110.processrequest.com

(it should fail, but libspf passes it.)

I have no idea how big the patch would need to be to fix libspf, but
it appears to be close to a complete rewrite of the ptr: mechanism.


-wayne




<Prev in Thread] Current Thread [Next in Thread>