Ruleset evaluation problem

Julian Field MailScanner at ecs.soton.ac.uk
Fri Sep 21 22:35:50 IST 2007


There are 3 classes of configuration options: "Simple", "First Match" 
and "All Matches".
"Simple" ones can only be simple values, no rulesets.
"First Match" matches on the first matching rule in the ruleset.
"All Matches" matches all the matching rules in the ruleset, except for 
the "default" or "*@*" rule (unless no other rules match).

"Use Watermarking" is an "All Matches" setting, so both you 
user at domain.com and *@domain.com rules match, and it applies the 
watermarking if any of the matches produce a "yes" result.

"Max Message Size" is a "First Match" setting, so just the 
user at domain.com rule is used.

I had to make a design decision for every configuration setting whether 
it made more sense for it to be a "First Match" or an "All Matches" 
type. If you want to change my design decision, edit 
/usr/lib/MailScanner/MailScanner/ConfigDefs.pl and move them between the 
"First" and "All" sections. Take a look through that file and you will 
soon understand the layout.

Remember that any changes you make to that file will be overwritten by 
the next upgrade, as ConfigDefs.pl is not considered to be a normally 
user-editable configuration file. So turn any change you make into a 
patch and re-apply the patch when you upgrade.

But there's nothing stopping you changing the file if you want to use a 
setting in a way I haven't provided for. That's the beauty of Open 
Source :-)

Hope that explains it reasonably well,
Jules.

Nexus Postmaster wrote:
> Hi, 
>
> I've been experimenting with the watermarking feature using rulesets. I want to be able to exclude some users but include all other users of a domain from watermark checks. (Explicitly defined users don't get checked, but 'catch-alls' do). 
>
> For example, 
>
> FromOrTo: john.doe at example.com no 
> FromOrTo: *@example.com        yes 
> FromOrTo: default              no 
>
>
> However, it seems that the wildcard rule always wins no matter the order of the rules. 
>
> The included max.message.size rules suggests that the first matching rule wins with this example: 
>
> From:     user at domain3.com   5M 
> From:     *@domain3.com     500K 
>
> However, that doesn't seem to be the case with watermarking. 
>
> Is there a way to achieve what I want or am I missing something? 
>
>   

Jules

-- 
Julian Field MEng CITP
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
For all your IT requirements visit www.transtec.co.uk


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
For all your IT requirements visit www.transtec.co.uk



More information about the MailScanner mailing list