Filename/Filetype Rules

Julian Field mailscanner at ecs.soton.ac.uk
Fri Oct 15 17:20:54 IST 2004


<x-flowed>
You can use a ruleset to point different users at different
filename.rules.conf (or filetype.rules.conf) files. You set one up with an
allow-jpeg-images line and one with a deny-jpeg-images line. Then create a
ruleset so that some users get one, and others get the other. You can even
put a filename in the rule instead of just a single address, and it will be
used for a whole bunch of people.

1. For example, set
Filetype Rules = %rules-dir%/filetype.rules
in MailScanner.conf.

2. Then in %rules-dir%/filetype.rules put a couple of lines like this:

To: /etc/MailScanner/people.who.want.jpegs
/etc/MailScanner/filetype.allow.jpegs.conf
To: /etc/MailScanner/people.who.dontwant.jpegs
/etc/MailScanner/filetype.deny.jpegs.conf

(Sorry if that gets wrapped, it is supposed to be just 2 lines)

3. In /etc/MailScanner/filetype.allow.jpegs.conf you make sure you have a
line that says
allow   JPEG    -       -
(with the 4 words separated by tabs).

4. In /etc/MailScanner/filetype.deny.jpegs.conf you make sure you have a
line that says
deny   JPEG    No JPEG images       No JPEG images allowed
(with the 4 phrases separated by tabs).

5. In /etc/MailScanner/people.who.want.jpegs you list (one per line) all
the email addresses and/or  domains of people who want jpeg images.

6. In /etc/MailScanner/people.who.dontwant.jpegs you list (one per line)
all the email addresses and/or  domains of people who dont want jpeg images.

And then you can just add people to either the people.who.want.jpegs file
or the people.who.dontwant.jpegs file as appropriate.

I admit this example is a bit deficient as you could just say that everyone
who isn't in one list is automatically in the other (using a default entry
in the filetype.rules file), but it's the principle I am trying to demonstrate.

That's nearly as complicated as ruleset systems can get, there's only 1
option I haven't used: you can say "To: user at example.com and From:
joe at company.com yes" and the rule will only fire if both the conditions
around the "and" are satisfied.

At 17:03 15/10/2004, you wrote:
>Kind of a quirky question here.
>
>I'm wondering if it's possible in the current version of MailScanner or
>perhaps a future one to add the ability to define per user
>filename/filetype rules instead of just system wide ones?  IE on a
>rather extreme example, user 1 wishes to receive jpg files and user 2
>does not.  Does or can there be an option available to define a user
>based filename list to allow/deny this for only one user?
>
>I've taken a quick look through the configuration/code/mailling list and
>I don't see any mention of a per user configuration, so thought I'd ask.
>
>Anyway just curious as it's one of the features my superiors would like
>to see.
>
>Thanks
>
>--
>Regards,
>
>Derek Buttineau
>Internet Systems Developer
>Compu-SOLVE Internet Services
>Compu-SOLVE Technologies Inc.
>
>705.725.1212 x255
>
>------------------------ MailScanner list ------------------------
>To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
>'leave mailscanner' in the body of the email.
>Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
>the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
Buy the MailScanner book at www.MailScanner.info/store

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
</x-flowed>



More information about the MailScanner mailing list