[Mailman-Users] scrubbed attachments naming pattern: is it configurable?

Mark Sapiro mark at msapiro.net
Tue Jan 3 15:38:20 EST 2017


On 01/02/2017 08:38 AM, karrageorgiou.giannis--- via Mailman-Users wrote:
> 
> I have enabled attachment scrubbing, so mail footers
> look like this:
> 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 2016_SON_COSMO-DE.tar.gz
> Type: application/x-gzip
> Size: 4535 bytes
> Desc: 2016_SON_COSMO-DE.tar.gz
> URL: <http://[mydomain].org/pipermail/wg5/attachments
> /20170102/1066e69c/attachment-0002.bin>
> 
> Ok, I understand that mailman cannot have psychic
> abilities and rename a application/x-gzip MIME blob
> to the full tar.gz or doc.gz or whatever, but what 
> about the alien-looking "attachment-NNNN.bin" part? 
> 
> Can optionally the Name part be used? even with the 
> inevitable(?) auto-increment indexing, it still will be 
> more user friendly. Then, even the user-confusing *.bin 
> part could be avoided, since the name does indicate the 
> encoding and it would be clearer for the downloaders?


The information is all there, just not in the URL. There are config
controls on the name in the URL. From Mailman/Defaults.py

> # Control parameter whether Mailman.Handlers.Scrubber should use message
> # attachment's filename as is indicated by the filename parameter or use
> # 'attachement-xxx' instead.  The default is set True because the applications
> # on PC and Mac begin to use longer non-ascii filenames.  Historically, it
> # was set False in 2.1.6 for backward compatiblity but it was reset to True
> # for safer operation in mailman-2.1.7.
> SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = True
> 
> # Use of attachment filename extension per se is may be dangerous because
> # virus fakes it. You can set this True if you filter the attachment by
> # filename extension
> SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = False

So you can set

SCRUBBER_DONT_USE_ATTACHMENT_FILENAME = False
SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True

in Mailman/mm_cfg.py, but be sure you understand what those comments
about those settings are saying before you do.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Users mailing list