SV: How to make rules work

Anders Andersson, IT andersan at LTKALMAR.SE
Sun Nov 24 15:02:35 GMT 2002


> -----Ursprungligt meddelande-----
> Från: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
> Skickat: den 24 november 2002 15:01
> Till: MAILSCANNER at JISCMAIL.AC.UK
> Ämne: Re: How to make rules work
> 
> 
> 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
> >not
> >or some ppl are allowed to accept *.exe ie. technical workers.
Hmm, just a thought. Easier to maintain a separate file since this
will only apply to technical person at work?

Is it possible to use this kind of rule:
To:     /etc/MaiScanner/users.txt
/etc/MailScanner/allow.filenames.rules.conf

> 
> To:             sysadmin1 at lktalmar.se
> /etc/MailScanner/allowallfilename.rules.conf
> From:           friendlydomain.com
> /etc/MailScanner/allowallfilename.rules.conf
> FromOrTo:       default
> /etc/MailScanner/filename.rules.conf
> 
> 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
> match.
> 
> >Looking at mailscanner.conf lets me switch to rules instead 
> but how to write
> >
> >a rule to use different messages?
> >
> >regards
> >
> >/Anders
> >
> >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 mailing list