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
Copy /usr/mailscanner/etc/filename.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
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
Restart MailScanner after you have made any changes to the rules files or filename/filetype configuration.