
Sometimes people post messages with attachments. They get archived with the message “attachment was scrubbed...” and renamed simply “attachment” and if the mime type wasn’t recognized, also the file extension is changed.
Is there some way to completely disable scrubbing? Just allow the attachments to come through as-is? No renaming.
For my group, this feature is causing more harm than good. All the people who are allowed to subscribe or post are trusted not to send corrupt or malicious attachments.

Edward Harvey wrote:
Sometimes people post messages with attachments. They get archived with the message "attachment was scrubbed..." and renamed simply "attachment" and if the mime type wasnt recognized, also the file extension is changed.
Is there some way to completely disable scrubbing? Just allow the attachments to come through as-is? No renaming.
If you mean include an arbitrary binary attachment (say an executable file) displayed inline in the archived message rather that removed and replaced by a link, then no, there is no way to do that.
If you mean replace the attachment with a link that preserves the original attachment file name and extension, put the following in mm_cfg.py
SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True
See the documentation of these settings in Defaults.py for more info.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

If you mean include an arbitrary binary attachment (say an executable file) displayed inline in the archived message rather that removed and replaced by a link, then no, there is no way to do that.
If you mean replace the attachment with a link that preserves the original attachment file name and extension, put the following in mm_cfg.py
SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True
That is precisely what I was looking for, thank you very much.
The root cause of the problem was - People are starting to use docx and xlsx files by default now, and these mime types aren't recognized (at least in the version of mailman that I have.) So they get renamed "attachment.bin" and that's a problem for non-technical users.

Edward Harvey quoted me and wrote:
If you mean replace the attachment with a link that preserves the original attachment file name and extension, put the following in mm_cfg.py
SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True
That is precisely what I was looking for, thank you very much.
The root cause of the problem was - People are starting to use docx and xlsx files by default now, and these mime types aren't recognized (at least in the version of mailman that I have.) So they get renamed "attachment.bin" and that's a problem for non-technical users.
Actually, it's not mailman that doesn't recognize the MIME type. Mailman (Scrubber) calls the Python library mimetypes.guess_all_extensions() to 'guess' the extension for the MIME type. This in turn, at least with Python 2.3 and newer, looks in the following list of system files for mappings from MIME type to extension.
knownfiles = [ "/etc/mime.types", "/etc/httpd/mime.types", # Mac OS X "/etc/httpd/conf/mime.types", # Apache "/etc/apache/mime.types", # Apache 1 "/etc/apache2/mime.types", # Apache 2 "/usr/local/etc/httpd/conf/mime.types", "/usr/local/lib/netscape/mime.types", "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 "/usr/local/etc/mime.types", # Apache 1.3 ]
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Edward Harvey
-
Mark Sapiro