I've made changes to the filetype.rules.conf file but MailScanner is still blocking the filetypes I want to allow (or allowing the filetypes I wanted to block). Print

  • 3

The filetype.rules.conf settings use the /usr/bin/file command, which looks inside the file attachment itself and uses definitions from the /usr/share/magic and /usr/share/magic.mime files to determine what type of file it is. Unless you know exactly what you are doing it is difficult to make modifications to this configuration file and get it right.

Simply adding a line with a file extension will _NOT_ work, such as:

allow       jpg        -         -

The file command probably does not know what jpg is and it will not match on those terms.

The easiest changes you can make are to comment out lines (with a # at the beginning of the line), change the "allow" to "deny" or change "deny" to "allow"; these modifications should always work.

You can get more information on the file command and the magic file by running "man file" and "man magic" on your server, or looking here:

http://linux.about.com/library/cmd/blcmdl5_magic.htm
http://www.cinq.com/linux/tips/file_command.html


Was this answer helpful?
Back