How can I allow certain file attachments in emails sent to or from some domains but still block them for all other domains?

If you only want to allow certain attachments for one or two domains but still block them for all other domains, then you need to do the following.

Copy /usr/mailscanner/etc/filename.rules.conf and /usr/mailscanner/etc/filetype.rules.conf (and archives.filename.rules.conf and archives.filetype.rules.conf if appropriate) to create new conf files, for example filename.special.rules.conf and filetype.special.rules.conf. Edit the new conf files to allow the files you wish to permit through.

Then edit /usr/mailscanner/etc/rules/filename.rules.rules and filetype.rules.rules and modify the line for the domain(s) you wish to use the new ruleset, like this:

FromOrTo: domain.com /usr/mailscanner/etc/filename.special.rules.conf

and

FromOrTo: domain.com /usr/mailscanner/etc/filetype.special.rules.conf

(Each of the above lines should be all on one line in the rules files.)

Information about determining why an attachment has been blocked and modifying the filename and filetype configuration files can be found here:
http://www.configserver.com/techfaq/index.php?faqid=12

Restart MailScanner after you have made any changes to the rules files or filename/filetype configuration.

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

Powered by WHMCompleteSolution