file type mapping for Office documents [was: Re: ANNOUNCE: amavisd-new-2.11.0-rc1 release candidate is available]
thomas.jarosch at intra2net.com
Wed Apr 27 19:14:19 CEST 2016
On Monday, 21. March 2016 09:08:24 Thomas Jarosch wrote:
> In the previous amavisd version, all Office files types
> were mapped to 'doc' since file(1) reported just "Office document".
> Office 2007+ documents get properly distinguished by file(1).
> We could either do this (I run that locally):
> [qr/^Microsoft Office Document\b/i => 'doc'], # OLE2: doc, ppt,
> xls, ... + [qr/^Microsoft (Word|Excel|PowerPoint)\b/i => 'doc'], #
> Office 2007+: docx, docm, pptx, xlsx, ...
> for the sake of "compatibility"
> recognize each file type on it's own to give
> the users a better control about the content type.
> What do you think?
could you revisit this one for 2.11.1? :)
I've opted for this one on my installation:
[qr/^Microsoft Office Document\b/i => 'doc'], # OLE2: doc, ppt, xls,...
[qr/^Microsoft Word\b/i => 'doc'],
[qr/^Microsoft Excel\b/i => 'xls'],
[qr/^Microsoft PowerPoint\b/i => 'ppt'],
and also added this as fallback if file(1) is not 100% sure:
[qr/^Composite Document File\b/i => 'doc'], # OLE2 container
More information about the amavis-users