setup filetype and filename rules per domain

Stephen Swaney steve.swaney at fsl.com
Mon Aug 7 17:07:43 IST 2006


> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-
> bounces at lists.mailscanner.info] On Behalf Of Gordon Colyn
> Sent: Monday, August 07, 2006 11:41 AM
> To: mailscanner at lists.mailscanner.info
> Subject: setup filetype and filename rules per domain
> 
> ITNT Banner CampaignIs there a way to setup filetype and filename rules
> per
> domain or user?
> 
> I have some client domains and users that want to accept .mp3 and .wav
> files
> and others that don't
> 
> Thanks
> Gordon Colyn

You need to create a rule sets that uses different filename/filetype
configuration files for mail from different domains for attachment filename
and filetype checking. If you have a Red Hat, CentOS or SuSE system, the
following paths will be correct. They will vary on other systems but the
same principals will work.

First create two files:

/etc/MailScanner/filename.rules.xyz.conf
/etc/MailScanner/filetype.rules.xyz.conf

Copy these existing files to create the new files:

cp /etc/MailScanner/filename.rules.conf \
        /etc/MailScanner/filename.rules.xyz.conf

cp /etc/MailScanner/filenatype.rules.conf \
        /etc/MailScanner/filename.rules.xyz.conf

Then edit both the new files to allow or deny the files for xyz.domain

Then create the file /etc/MailScanner/rules/filename.rules. The contents of
this file should be:

# Allow certain filenames from xyz.com
From:    /\*@xyz\.com/      /etc/MailScanner/filename.rules.xyz.conf
# Default entry
FromOrTo:       default         /etc/MailScanner/filename.rules.conf

Then create the file /etc/MailScanner/rules/filetype.rules. The contents of
this file should be:

# Allow certain filetypes from xyz.com
From:    /\*@xyz\.com/      /etc/MailScanner/filetype.rules.xyz.conf
# Default entry
FromOrTo:       default         /etc/MailScanner/filename.rules.conf

Then edit /etc/MailScanner.conf to call the new rulesets. Change the setting
for Filename Rules to be:

Filename Rules = %rules-dir%/filename.rules

And change the setting for Filetype Rules to be:

Filetype Rules = %rules-dir%/filetype.rules

Then reload MailScanner. 

I hope this helps,

Steve	

Stephen Swaney
Fort Systems Ltd.
stephen.swaney at fsl.com
www.fsl.com



More information about the MailScanner mailing list