[Pymilter] pyspf SPF checking raises TypeError exception when checking erroneous record
Stuart D Gathman
stuart at bmsi.com
Mon Mar 25 19:03:08 EDT 2013
On Mar 25, Stuart D Gathman transmitted in part:
> On Mar 18, Kazuhiro Ogura transmitted in part:
>
>> Can you try it with a zonedata like this?
>>
>> zonedata:
>> e3.example.com:
>> - SPF: v=spf1 a:mx1.example.com mx:mx1.example.com -all
>> mx1.example.com:
>> - CNAME: .
>
> That does indeed break it with real DNS, but not as a test case.
> The reason is that the mock DNSLookup doesn't include supplementary
> data in addition to answers like a real DNS server does. This
> supplementary data gets added to a short lived (only for one mail
> connection) cache, and having the empty CNAME in the cache is what
> breaks it.
>
> I am working on improving the mock DNSLookup.
Nothing wrong with mock DNSLookup. The problem was the test zonedata
should be:
zonedata:
e3.example.com:
- SPF: v=spf1 a:mx1.example.com mx:mx1.example.com -all
mx1.example.com:
- CNAME: ''
Test case (and fix) committed. Thanks Kazuhiro !
More information about the Pymilter
mailing list