[Mailman-Users] pdf-attachments in archives stored as attachment.obj
msapiro at value.net
Fri Sep 7 16:43:34 CEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
de ren0r wrote:
> All the files are stored with the file-extension as they are send to
> the list, except *.pdf-files. They are stored as attachment.obj
> instead of attachment.pdf. it seems that pipermail / scrubber or
> another candidate doenst get it's mime-type in the archiving-process.
> Any suggestions how to fix that? Maybe there is a relation from my
> /etc/mime.types to that problem?
There are a few possible of solutions.
1) you can set
SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True
in mm_cfg.py to use the extension of the attachment filename instead of
guessing the extension from the content-type.
2) you can try to make sure that all the clients that send pdf
attachments give them a content-type of application/pdf.
3) if SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION is False, scrubber
calls the Python library mimetypes.guess_all_extensions() function to
map the content-type to an extension. This module in turn supplements
its built in list by attempting to read several files (depending on
Python version) including /etc/mime.types so if the issue is due to some
content-type other than application/pdf, associating that content-type
with the pdf extension in /etc/mime.types may work.
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
-----END PGP SIGNATURE-----
More information about the Mailman-Users