
On 2/14/21 10:34 AM, Mark Sapiro wrote:
Thank you for reporting this. It is a bug. It turns out that the logic for determining the headers in the wrapper does not include Subject: in the case where the list has no subject_prefix.
This is now reported at <https://bugs.launchpad.net/mailman/+bug/1915655>
Although I know you don't control the list, here's the patch I will commit after testing
Just for the record, that patch had issues. Here's the patch that will be committed: ```
=== modified file 'Mailman/Handlers/WrapMessage.py' --- Mailman/Handlers/WrapMessage.py 2018-06-17 23:47:34 +0000 +++ Mailman/Handlers/WrapMessage.py 2021-02-14 19:51:07 +0000 @@ -63,13 +63,19 @@ # 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?
``` -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan