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. > > Content-Disposition: inline > Content-Type: text/plain > MIME-Version: 1.0 > X-Mailer: MIME::Lite 3.031 (F2.85; T2.17; A2.21; B3.15; Q3.13)
In case the script doesn't get modified, here's a patch I plan to commit to Scrubber.py which should help. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
=== modified file 'Mailman/Handlers/Scrubber.py' --- Mailman/Handlers/Scrubber.py 2020-06-21 18:45:30 +0000 +++ Mailman/Handlers/Scrubber.py 2021-03-06 01:10:21 +0000 @@ -90,6 +90,9 @@ if ctype.lower == 'application/octet-stream': # For this type, all[0] is '.obj'. '.bin' is better. return '.bin' + if ctype.lower == 'text/plain': + # For this type, all[0] is '.ksh'. '.txt' is better. + return '.txt' return all and all[0] @@ -196,7 +199,10 @@ format = part.get_param('format') delsp = part.get_param('delsp') # TK: if part is attached then check charset and scrub if none - if part.get('content-disposition') and \ + # MAS: Content-Disposition is not a good test for 'attached'. + # RFC 2183 sec. 2.10 allows Content-Disposition on the main body. + # Make it specifically 'attachment'. + if part.get('content-disposition').lower() == 'attachment' and \ not part.get_content_charset(): omask = os.umask(002) try:
------------------------------------------------------ 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/