sdgathman / pyspf

Other
49 stars 26 forks source link

SPF with redirect problem #31

Open kelvin52901 opened 3 years ago

kelvin52901 commented 3 years ago

hi all,

when I test this SPF "v=spf1 v=spf1 redirect=spf.protection.outlook.com -all" with IP 40.92.1.1 in MXtool box, it return pass. However, when I do the same thing with this module, it returns Fail.

I did some extra test on this case, look like because it end with -all, so that the redirect part become useless.

sdgathman commented 3 years ago

See RFC7208 6.1.3:

If all mechanisms fail to match, and a "redirect" modifier is present, then processing proceeds as follows:

So MXtool box is broken. HOWEVER, I need to check that the test suite includes this. If they pass the test suite, then the test suite is broken also.

BTW - I'm assuming the duplicate v=spf1 is a typo. If not, the dup is an unknown modifier and doesn't change the result.