From: Jason E. Aten Date: Thu, 27 Nov 2014 02:03:29 +0000 (-0800) Subject: If unable to connect to a MX server, don't cache that result. X-Git-Tag: v0.4.25^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=be90377ccde2e745396a73e6475c07730dce1039;p=flanker.git If unable to connect to a MX server, don't cache that result. --- diff --git a/flanker/addresslib/validate.py b/flanker/addresslib/validate.py index a85e3cc..116ad1f 100644 --- a/flanker/addresslib/validate.py +++ b/flanker/addresslib/validate.py @@ -138,7 +138,6 @@ def mail_exchanger_lookup(domain, metrics=False): mx_hosts = lookup_domain(domain) mtimes['dns_lookup'] += time.time() - bstart if mx_hosts is None: - mx_cache[domain] = False return None, mtimes # test connecting to the mx exchanger @@ -146,7 +145,6 @@ def mail_exchanger_lookup(domain, metrics=False): mail_exchanger = connect_to_mail_exchanger(mx_hosts) mtimes['mx_conn'] = time.time() - bstart if mail_exchanger is None: - mx_cache[domain] = False return None, mtimes # valid mx records, connected to mail exchanger, return True