diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2017-10-27 14:56:53 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2017-10-27 14:56:53 +0900 |
commit | af70c2e38f4df2ea8be1cc3e50b6a43686fb2888 (patch) | |
tree | 236035ba79bf8979426e316078c2f93f0bc5319d /Mailman/Utils.py | |
parent | 170bba3f35048cdbb95713fd1d45dd43b301d005 (diff) | |
parent | bc77a098657cbc0db309de8fb9e63d079f43f955 (diff) | |
download | mailman2-af70c2e38f4df2ea8be1cc3e50b6a43686fb2888.tar.gz mailman2-af70c2e38f4df2ea8be1cc3e50b6a43686fb2888.tar.xz mailman2-af70c2e38f4df2ea8be1cc3e50b6a43686fb2888.zip |
merge lp:mailman/2.1 2.1.25 release (rev 1726)
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r-- | Mailman/Utils.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 75481563..9dbd0b55 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -1267,11 +1267,23 @@ def _DMARCProhibited(mlist, email, dmarc_domain, org=False): txt_recs = resolver.query(dmarc_domain, dns.rdatatype.TXT) except (dns.resolver.NXDOMAIN, dns.resolver.NoAnswer): return 'continue' + except (dns.resolver.NoNameservers): + syslog('error', + 'DNSException: No Nameservers available for %s (%s)', + email, dmarc_domain) + # Typically this means a dnssec validation error. Clients that don't + # perform validation *may* successfully see a _dmarc RR whereas a + # validating mailman server won't see the _dmarc RR. We should + # mitigate this email to be safe. + return True except DNSException, e: syslog('error', 'DNSException: Unable to query DMARC policy for %s (%s). %s', - email, dmarc_domain, e.__doc__) - return 'continue' + email, dmarc_domain, e.__doc__) + # While we can't be sure what caused the error, there is potentially + # a DMARC policy record that we missed and that a receiver of the mail + # might see. Thus, we should err on the side of caution and mitigate. + return True else: # Be as robust as possible in parsing the result. results_by_name = {} |