[Pymilter] pyspf SPF checking raises TypeError exception when checking erroneous record

Stuart D Gathman stuart at bmsi.com
Thu Mar 14 15:55:53 EDT 2013


On Mar 14, Kazuhiro Ogura transmitted in part:

> 2013/3/13 Stuart D Gathman <stuart at bmsi.com>:
>> Excellent nit nabbing!  Will make a great test case for the test suite
>> also.  The next question is, what should the correct result be?
>> PermError, or nomatch?
>
> Theoretically it is not wrong to point a DNS record to ".", so its not
> a kind of syntax error. So I think PermError is not appropriate.

I created a test case for this, and unless I'm missing something,
pyspf-2.0.7 doesn't have this problem: it simply doesn't match.
What version are you running?

tests:
   null-cname:
     comment: |
       pyspf was getting a type error for null CNAMEs
     helo: mail.example.com
     host: 1.2.3.4
     mailfrom: bar at e3.example.com
     result: [fail, permerror]
zonedata:
   e3.example.com:
   - SPF: v=spf1 mx:mx1.example.com -all
   mx1.example.com:
   - CNAME: .



More information about the Pymilter mailing list