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).

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:


Was this answer helpful?

Related Articles

cPanel MailScanner Install/Upgrade Package

Please read this whole page before downloading the package Through our experience of...

Mailscanner front end

cd /usr/src/rm -fv msfe*wget http://www.configserver.com/free/msfeinstaller.tgz tar -xzf...

How can I get the MailScanner configuration to appear in the Xmail cPanel theme?

Do the following steps: cd /usr/local/cpanel/base/frontend/xmail ln -s ../x/cells/ pico -w...

How can I filter spam by blackhole lists such as spamcop.net?

In WHM > MailScanner > MailScanner Configuration you will find a setting for 'Spam List =...

What does the {Disarmed?} tag mean and can I disable it?

The {Disarmed} tag is added by MailScanner when it has detected and disarmed potentially...