Mika56 / PHP-SPF-Check

Simple library to check an IP address against a domain's SPF record
MIT License
44 stars 25 forks source link

Check fails on invalid recordPart #16

Closed ms0ft closed 7 years ago

ms0ft commented 7 years ago

Hi Mika,

I just did a check on a SPF record like this: "v=spf1 a mx include:_spf.external.nl ~all"

The IP is allowed by the external spf and therefore I expected an allow, however the check returned Temp Error.

Turned out that the domain did not have MX records configured, and the doCheck routine catched this as an DNSLookupException and bailed out.

I don't know how this is in the specifications, but I would expect that such a thing would be ignored and the check continue with the next part.

Regards, Michael

ms0ft commented 7 years ago

Oh dear ... looks like I was using an old version. Downloaded the latest found here and it works as expected.

Sorry !!