checkdmarc icon indicating copy to clipboard operation
checkdmarc copied to clipboard

SPF Record verification fails for domains starting with "all"

Open ricco386 opened this issue 1 year ago • 1 comments

If a SPF record has string all in domain, the regular expresion fails with error:

The domain spf.all does not exist

For example domain: allianz.sk has a SPF record: "v=spf1 ip4:91.206.87.24 ip4:91.206.86.232 ip4:91.206.87.210 ip4:208.73.7.175 mx include:mcxplatform.de include:spf.allianz.com -all" which seems to be correct, but executing: spf = check_spf('allianz.sk') results with an error.

ricco386 avatar Aug 14 '24 19:08 ricco386

Problem seems to be a regex in spf.py on line 42:

AFTER_ALL_REGEX_STRING = r"\ball\s*[^\s]+"

ricco386 avatar Aug 14 '24 19:08 ricco386