On 3/4/21 4:20 PM, Mark Dale via Mailman-Users wrote:
>>
>> Thanks Mark. I've copied the message from mbox file and pasted below.
>> (the client's info is marked as redacted).
>>
>> Something I did notice: in the original received email headers I see:


Original as received by the list or from the list?


>> Content-Disposition: inline
>> Content-Type: text/plain; charset="us-ascii"
>> Content-Transfer-Encoding: 7bit
>>
>> And in the mbox file below (of the same message), I see:
>>
>> Content-Disposition: inline
>> Content-Type: text/plain
>> Content-Transfer-Encoding: quoted-printable

OK, that's the issue. The message in the .mbox is after various list
manipulations, but before scrubbing for the pipermail archive, and
somehow the '; charset="us-ascii"' has been lost from the Content-Type:
header, which is why Scrubber  scrubs it.


...
> 
> FWIW, using Thunderbird I posted the contents of the original email to a
> test list (on the same server, with the same lists configs) and as
> expected the archived message displays correctly as a plaintext email.
> 
> The headers this time show as:
> 
> === FROM EMAIL HEADER
> MIME-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> 
> === FROM MBOX
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 7bit


This is what should happen. I'm not sure which handler changed the
charset to utf-8, but I don't think that's significant.

Clearly there is something different in either the two lists, or the
message that arrived at the lists, but My only guess is the message that
arrived at the original list was already missing the charset="us-ascii".

Here's something you can try.

Create a file somewhere and give the Mailman's group write permission on
it. Then apply the following patch to Mailman's scripts/post

> === modified file 'scripts/post'
> --- scripts/post      2018-06-17 23:47:34 +0000
> +++ scripts/post      2021-03-05 01:16:56 +0000
> @@ -58,8 +58,12 @@
>      # some MTAs have a hard limit to the time a filter prog can run.  Postfix
>      # is a good example; if the limit is hit, the proc is SIGKILL'd giving us
>      # no chance to save the message.
> +    content = sys.stdin.read()
> +    if listname == LISTNAME:
> +        with open('PATH_TO_FILE', 'a') as fp:
> +            fp.write(content)
>      inq = get_switchboard(mm_cfg.INQUEUE_DIR)
> -    inq.enqueue(sys.stdin.read(),
> +    inq.enqueue(content,
>                  listname=listname,
>                  tolist=1, _plaintext=1)
>  
> 


where LISTNAME is the problem list's name and PATH_TO_FILE is the path
to the file you created. This file will accumulate all the incoming
messages posted to the list, exactly as they are received by Mailman.

Then we can at least know for sure what that message looks like.

Of course, once you have captured one such message, you can revert the
patch.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to