Using filenames rules

Julian Field mailscanner at ecs.soton.ac.uk
Fri Feb 14 20:36:17 GMT 2003


At 16:08 10/02/2003, you wrote:
>Hello all,
>
>We want to block attachments via filename rules for ALL of our users,
>except for staff.
>
>Is it possible to do this without writing N lines in "filename.rules" like: ?
>
>From:   user1@* <rule_staff>
>From:   user2@* <rule_staff>
>...
>From:   userN@* <rule_staff>
>FromOrTo:       default         <rule_default>

Not quite. But what you can do is make a ruleset produce the name of the
filename.rules.conf file. So create:
/etc/MailScanner/filename.rules.staff.conf containing
allow   .       -       -
and /etc/MailScanner/rules/filename.rules.rules containing
From:   user1@* /etc/MailScanner/filename.rules.staff.conf
From:   user2@* /etc/MailScanner/filename.rules.staff.conf
...
FromOrTo:       default /etc/MailScanner/filename.rules.conf

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list