
On 2/13/21 10:44 PM, Sam Kuper wrote:
Most of the mail on that list comes through just fine.
DMARC email comes through with the Subject: field blank, though.
Is that expected?
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 ```
=== modified file 'Mailman/Handlers/WrapMessage.py' --- Mailman/Handlers/WrapMessage.py 2018-06-17 23:47:34 +0000 +++ Mailman/Handlers/WrapMessage.py 2021-02-14 18:20:24 +0000 @@ -63,13 +63,17 @@ # 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. + 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: 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?
Perhaps you can convince the admins of the Mailman site to apply the
patch or add a subject_prefix to the list, either of which will avoid
the issue.
--
Mark Sapiro <mark@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan