From 7e459e691de1e0e97bd99ff550a7a7904a54f61c Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sat, 10 Nov 2018 10:57:54 -0800 Subject: Use .bin extension for scrubbed application/octet-stream files. --- Mailman/Handlers/Scrubber.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Mailman/Handlers') 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] -- cgit v1.2.3 From a6a9e9960a6e300630ee46b04831850d0bfec50d Mon Sep 17 00:00:00 2001 From: Jim Popovitch Date: Fri, 30 Nov 2018 22:53:02 +0000 Subject: Patch for dmarc_moderation_addresses to automatically apply dmarc_moderation_action against a regexp of addresess --- Mailman/Handlers/SpamDetect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 7e035184..73fc758f 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -109,7 +109,7 @@ 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, at_list='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: -- cgit v1.2.3 From 3242707ec3214cb0ca9c639b99617f69f94f0d05 Mon Sep 17 00:00:00 2001 From: Jim Popovitch Date: Sat, 1 Dec 2018 04:13:12 +0000 Subject: Updated SpamDetect.py and VARHELP based on feedback from Mark S. --- Mailman/Handlers/SpamDetect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 73fc758f..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 mlist.GetPattern(addr, mlist.dmarc_moderation_addresses, at_list='dmarc_moderation_addresses') or 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: -- cgit v1.2.3