ConfigServer Services HelpDesk
Server Management Services from Way to The Web Ltd
ConfigServer Home Page

MailScanner is blocking files as "program files" when they are not program files, for example Office documents. How can I configure MS to allow these files?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Sometimes MailScanner will appear to mis-identify a legitimate file (often an Office document or spreadsheet) as a program file and block the attachment when you don’t want it blocked. 


It is not MailScanner that is classifying the file as a program, it is the Linux “file” command on your server. If you don’t want to configure MailScanner to allow all program files, there are a couple of other options.


1. You can allow program files only in archives, because that is what Office files are. Edit the file /usr/mailscanner/etc/archives.filetype.rules.conf and change the “deny” to “allow” for the type of file you wish to allow. (i.e. executable and/or ELF). This is safer than allowing these filetypes in all attachments.


2. You can investigate exactly what is being misidentified and try to determine if the MIME type is different so you can allow that instead of the main filetype.

To do this you will need to extract your Office document on the server (see note below) and examine the resulting files (at least the specific ones that are being reported by MailScanner) with both “file” and “file -i” commands. Example:

file myfile.dat
file -i myfile.dat

If the results are different when you run “file -i” instead of “file”, edit the archives.filetype.rules.conf file (and the filetype.rules.conf if you wish) and add a line for the MIME filetype (the result of “file -i”) like this, for example:

allow[tab]-[tab]MIME TYPE[tab]-[tab]-

Replace the [tab]s with actual tab characters, and MIME TYPE with the result of the “file -i” command.

________________________________________________________________
Note: You can extract your office document by changing the file extension to .zip and then running the command:

unzip filename.zip





Share via

Related Articles


Self-Hosted Help Desk Software by SupportPal
© ConfigServer Services