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 <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9