How to make rules work
mailscanner at ecs.soton.ac.uk
Sun Nov 24 14:01:05 GMT 2002
At 13:28 24/11/2002, you wrote:
>I want all reports sent when mail come from local network and of course with
>my swedish translation.
>I allso want to send certain report to of site ppl if they come from *.se
>The rest I will just send to /dev/null
There are 2 parts to this:
1) What report should be sent to who
2) Who should get a report at all
1) Make each of the report files in MailScanner.conf a *.rules file
instead, containing something along these lines:
From: lktalmar.se /etc/MailScanner/reports/se/foobar.txt
From: *@*.se /etc/MailScanner/reports/se/other.txt
FromOrTo: default /dev/null
For each one, it will use the file found by the first matching rule.
2) To actually control whether the senders are warned at all, use a ruleset
for the "Warn Senders" switch, that contains something like
From: lktalmar.se yes
FromOrTo: *@*.se yes
FromOrTo: default no
>Same goes for filetypes, certain domains could send us files and the rest
>or some ppl are allowed to accept *.exe ie. technical workers.
To: sysadmin1 at lktalmar.se
then allowallfilename.rules.conf could just contain
allow $ - -
The filename.rules.conf files "add together" so the result used for 1
message is the filename.rules.conf files that result from all matching
rules, strung together.
The "default" filename.rules.conf file is only used when none of the rules
>Looking at mailscanner.conf lets me switch to rules instead but how to write
>a rule to use different messages?
>Thanks again to Julian and crew :)
Nick (the other bit of the crew) sends his gratitude :-)
Julian Field Teaching Systems Manager
jkf at ecs.soton.ac.uk Dept. of Electronics & Computer Science
Tel. 023 8059 2817 University of Southampton
Southampton SO17 1BJ
More information about the MailScanner