diff options
author | Mark Sapiro <mark@msapiro.net> | 2021-02-14 19:36:36 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2021-02-14 19:36:36 -0800 |
commit | 7651d375b035cdfde969aaa4556b13f3caab8781 (patch) | |
tree | 9f88cb97bc3ed5cd1b4ba71c39afa436e7fa4e89 | |
parent | 66778c53a61f9c09fa5d1c7bb3d2e8866f8a246c (diff) | |
download | mailman2-7651d375b035cdfde969aaa4556b13f3caab8781.tar.gz mailman2-7651d375b035cdfde969aaa4556b13f3caab8781.tar.xz mailman2-7651d375b035cdfde969aaa4556b13f3caab8781.zip |
Fix missing Subject: in some Wrap Message wrappers.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/WrapMessage.py | 10 | ||||
-rw-r--r-- | NEWS | 7 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Mailman/Handlers/WrapMessage.py b/Mailman/Handlers/WrapMessage.py index 0ee08cb1..3aef64a2 100644 --- a/Mailman/Handlers/WrapMessage.py +++ b/Mailman/Handlers/WrapMessage.py @@ -63,13 +63,19 @@ def process(mlist, msg, msgdata): # make a copy of the msg, then delete almost everything and set/copy # what we want. omsg = copy.deepcopy(msg) + # If CookHeaders didn't change the Subject: we need to keep it too. + # Get a fresh list. + keepers = list(KEEPERS) + if 'subject' not in [key.lower() for key in + msgdata.get('add_header', {}).keys()]: + keepers.append('subject') for key in msg.keys(): - if key.lower() not in KEEPERS: + if key.lower() not in keepers: del msg[key] msg['MIME-Version'] = '1.0' msg['Message-ID'] = Utils.unique_message_id(mlist) # Add the headers from CookHeaders. - for k, v in msgdata['add_header'].items(): + for k, v in msgdata.get('add_header', {}).items(): msg[k] = v # Are we including dmarc_wrapped_message_text? I.e., do we have text and # are we wrapping because of dmarc_moderation_action? @@ -5,6 +5,13 @@ Copyright (C) 1998-2020 by the Free Software Foundation, Inc. Here is a history of user visible changes to Mailman. +2.1.35 (xx-xxx-xxxx) + + Bug Fixes and other patches + + - Fixed an issue where sometimes the wrapper message for DMARC mitigation + Wrap Message has no Subject:. (LP: #1915655) + 2.1.34 (26-Jun-2020) i18n |