Oops, premature send.
I did grep through the whole mailman core code base for "del", and didn't come up with anything that looks like it would delete fields like Content-Type and Message-ID (assuming the default for anonymous_list_keep_headers, I wish I had thought to ask about that, but who changes it?) I assumed Content-Type is modified by direct assignment in handlers that delete parts or transform them to a different MIME type.
I wonder if his Python is old enough to not recognize negated regexps? That should be logged in errors. Or (as you guessed), the '(?!x-)' regexp (or the whole content of anonymous_list_keep_headers) has been removed?
Stephen J. Turnbull writes:
Mark Sapiro writes:
This apparently confuses the Python email package so that the get_payload() method returns a list of strings rather than a list of message objects.
Yes, I got that far too. I'm guessing that in the absence of a Content-Type, which then *should* default to text/plain, the email package goes ahead and detects the MIME headers anyway (although I don't think it should do that) and breaks the message into MIME parts. I would think we'd raise an Exception here.
If there's a reason for the email package to do that detection (*shrug*, it seems to work), then the dispatching in _handle_text should be done on the Python type rather than the MIME Content-Type.
I forget exactly how the code is structured, the relevant dispatching may be in _dispatch or in _dispatch_meth.
Steve
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/