From be90377ccde2e745396a73e6475c07730dce1039 Mon Sep 17 00:00:00 2001 From: "Jason E. Aten" Date: Wed, 26 Nov 2014 18:03:29 -0800 Subject: [PATCH] If unable to connect to a MX server, don't cache that result. --- flanker/addresslib/validate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/flanker/addresslib/validate.py b/flanker/addresslib/validate.py index a85e3cc5..116ad1f6 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