Closed dark-arc closed 6 years ago
You're using legacy (pre-RFC) API from pyspf version 1. Use check2 instead:
print spf.check(i='1.1.1.1', s='test@pyspf.clancs.co.uk', h='pyspf.clancs.co.uk') ('unknown', 550, 'SPF Permanent Error: No valid SPF record for included domain: spf.example.com: include:spf.example.com') print spf.check2(i='1.1.1.1', s='test@pyspf.clancs.co.uk', h='pyspf.clancs.co.uk') ('permerror', 'SPF Permanent Error: No valid SPF record for included domain: spf.example.com: include:spf.example.com')
The docstrings for check and check2 should make this clear.
I'm using pyspf to validate a list of domains include our servers in their SPF and it gives
unknown
instead ofpermerror
for badly formed SPF recordsI've seen this in the following instances:
I would expect the above to return
permerror
, notunknown
... This doesn't make it unusable but is a confusing result as the RFC doesn't support an unknown result.