-------- Original Message --------
From: Mark Sapiro [mailto:m...@msapiro.net]
Sent: Saturday, March 6, 2021, 01:19 UTC
To: mailman-users@python.org
Subject: [Mailman-Users] Re: Pipermail scrubbing ascii txt to ksh attachment

> On 3/5/21 2:56 PM, Mark Dale via Mailman-Users wrote:
>>
>>
>> I'll pass it on to the list owner to modify their script and see how we
>> get on.


> 
> 
> In case the script doesn't get modified, here's a patch I plan to commit
> to Scrubber.py which should help.
> 
> 
> ------------------------------------------------------


Thanks again Mark. The list owner has indicated they can modify their Perl 
script (not done as yet), so I'll put your patch in place regardless.

I ran a script (below) against the mbox file to remove "Content-Disposition: 
inline" and change "Content-Type: text/plain" to include the charset and that 
has the archived messages now displaying nicely as plain text.

If it turns out that the the owner is unable to modify their Perl script, 
setting this shell script to run once a day may not be a problem as their list 
is auto-posted to at a scheduled time every day. It's a kludge of a "fix" I 
know, but it will limp it home.


#!/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
LISTNAME=redacted
echo $LISTNAME archive rebuild started at $(date +%H:%M:%S)
sed -i '/Content-Disposition: inline/d' 
/var/lib/mailman/archives/private/$LISTNAME.mbox/$LISTNAME.mbox
sed -i 's/Content-Type: text\/plain/Content-Type: text\/plain; 
charset="us-ascii"/' 
/var/lib/mailman/archives/private/$LISTNAME.mbox/$LISTNAME.mbox
/usr/lib/mailman/bin/arch --wipe $LISTNAME
echo $LISTNAME archive rebuild completed at $(date +%H:%M:%S)
exit 0
------------------------------------------------------
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