diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2019-01-08 15:25:41 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2019-01-08 15:25:41 +0900 |
commit | d8ee0235efb4052d0e489ba1dba0af812873df14 (patch) | |
tree | 021691a2f050722fba1b157affeb5730f270009d /Mailman/Handlers | |
parent | f63b5341247ff89ebad4ce6e13d8a90410e2bd12 (diff) | |
parent | 189515c4d3f1ed52b83d63577ebefec5c991b281 (diff) | |
download | mailman2-d8ee0235efb4052d0e489ba1dba0af812873df14.tar.gz mailman2-d8ee0235efb4052d0e489ba1dba0af812873df14.tar.xz mailman2-d8ee0235efb4052d0e489ba1dba0af812873df14.zip |
merge lp:mailman/2.1 up to rev 1805
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/Scrubber.py | 3 | ||||
-rw-r--r-- | Mailman/Handlers/SpamDetect.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 429312be..97e443b7 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -87,6 +87,9 @@ def guess_extension(ctype, ext): all = guess_all_extensions(ctype, strict=False) if ext in all: return ext + if ctype.lower == 'application/octet-stream': + # For this type, all[0] is '.obj'. '.bin' is better. + return '.bin' return all and all[0] diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 7e035184..cf41303f 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -109,7 +109,8 @@ def process(mlist, msg, msgdata): msgdata['from_is_list'] = 0 dn, addr = parseaddr(msg.get('from')) if addr and mlist.dmarc_moderation_action > 0: - if Utils.IsDMARCProhibited(mlist, addr): + if (mlist.GetPattern(addr, mlist.dmarc_moderation_addresses) or + Utils.IsDMARCProhibited(mlist, addr)): # Note that for dmarc_moderation_action, 0 = Accept, # 1 = Munge, 2 = Wrap, 3 = Reject, 4 = Discard if mlist.dmarc_moderation_action == 1: |