cisagov / trustymail

Scan domains and return data based on trustworthy email best practices
Creative Commons Zero v1.0 Universal
185 stars 31 forks source link

Gracefully handle MX records that do not resolve to an A record #117

Closed jsf9k closed 5 years ago

jsf9k commented 5 years ago

In some cases (epa.gov is one) a domain may have some MX records that do not resolve to any A record. The corresponding mail server is IPv6-only. Unfortunately our scanning apparatus is IPv4-only. This case was resulting in an unhandled exception being thrown.

With this change we now gracefully handle an MX record that does not resolve to an IPv4 address. Note that we are giving credit for STARTTLS for the mail server, since we cannot evaluate it.