diff options
author | Yasuhito FUTATSUKI <futatuki@poem.co.jp> | 2020-06-01 15:50:14 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI <futatuki@poem.co.jp> | 2020-06-01 15:50:14 +0900 |
commit | 6a23f43f94e1cbfbbd413d83f713584815938178 (patch) | |
tree | f0f2fb5fcb4fbb121915eddb949f7536bc22d037 /Mailman/Utils.py | |
parent | e2bfc83935b64208b56194d82d04c61c25f8406d (diff) | |
parent | bc7fdf4c5fb688ae62e48e614bc285bdcd805ffc (diff) | |
download | mailman2-6a23f43f94e1cbfbbd413d83f713584815938178.tar.gz mailman2-6a23f43f94e1cbfbbd413d83f713584815938178.tar.xz mailman2-6a23f43f94e1cbfbbd413d83f713584815938178.zip |
sync with lp:mailman/2.1 (just same)
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r-- | Mailman/Utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 36fbd1f9..6e39c532 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -1343,12 +1343,14 @@ def _DMARCProhibited(mlist, email, dmarc_domain, org=False): cnames = {} want_names = set([dmarc_domain + '.']) for txt_rec in txt_recs.response.answer: + # Don't be fooled by an answer with uppercase in the name. + name = txt_rec.name.to_text().lower() if txt_rec.rdtype == dns.rdatatype.CNAME: - cnames[txt_rec.name.to_text()] = ( + cnames[name] = ( txt_rec.items[0].target.to_text()) if txt_rec.rdtype != dns.rdatatype.TXT: continue - results_by_name.setdefault(txt_rec.name.to_text(), []).append( + results_by_name.setdefault(name, []).append( "".join(txt_rec.items[0].strings)) expands = list(want_names) seen = set(expands) |