local addresses and file name rules

Julian Field mailscanner at ecs.soton.ac.uk
Fri Feb 7 09:08:32 GMT 2003


At 21:13 06/02/2003, you wrote:
>Hello all,
>
>Is is possible to block attachments via filename rules EXCEPT if it
>comes from an specific domain headed for a specific name (ie FROM:
>user1 at abc123.com TO: user2 at abc123.com)?
>
>Basically I want to skip the file extension checking for internal only
>email. Can this be done?

Yes.

Create another filename rules file containing
allow   .       -       -
which will allow *everything*. Call it
/etc/MailScanner/filename.rules.allow.conf

Then in MailScanner.conf put this:
Filename Rules = /etc/MailScanner/rules/filename.rules.rules
(that filename needs to end in .rule or .rules or it can't work out what it
is).

In /etc/MailScanner/rules/filename.rules.rules put this
FromAndTo:      *@abc123.com
/etc/MailScanner/filename.rules.allow.conf
FromOrTo:       default                 /etc/MailScanner/filename.rules.conf

The first line matches all mail whose from *and* to addresses are in
abc123.com, and gives the "allow all" set of rules. The second line
provides the default set of rules, for everyone else.
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list