Rules
Julian Field
mailscanner at ecs.soton.ac.uk
Thu Apr 15 09:08:37 IST 2004
At 23:19 14/04/2004, you wrote:
>Julian Field wrote:
>
>>
>>Currently the only thing you can do is replace the address-pattern with a
>>filename. That file then contains a whole list of address-patterns
>>that all
>>apply to the rule. Saves you having 1 rule repeated for 1000 users,
>>you can
>>just put the list of users in the address-pattern file and reference it
>>from your rules file.
>
>I didn't know you could do that. Let me make sure I understand
>correctly before running off and using it.
>
>In /etc/MailScanner/MailScanner.conf I have...
>
>Spam Actions = /etc/MailScanner/rules/spam.actions.rules
>
>Then, in /etc/MailScanner/rules/spam.actions.rules I could have...
>
>To: /etc/MailScanner/rules/those-users.dat deliver
>
>And finally, in /etc/MailScanner/rules/those-users.dat, I could have...
>
>joe at mail.someplace.net
>joe.smith at mail.alternate.net
>
>
>And that would all work?
Correct.
>I've got a situation coming up where I'm going to have about 900 people
>wanting special settings for Spam Actions and would like to just use a
>text file that I receive from the department with the userids listed in
>it. That way, they maintain the file, not me :).
>
>On a side note, are there any performance considerations with having
>huge rulesets? Thanks for your patience.
Yes there are. It has to work through each rule in turn to work out the
result. If you use some of the code in CustomConfig.pm, you can read in a
list of rules into an internal Perl array (actually a hash). You know that
all the entries in the rules are complete email addresses and therefore all
you actually want to do is directly lookup the address. You don't want to
be wading through every rule for every lookup as that is slow when there
are a lot of rules.
At some point I might see about writing an optimiser that spots this
situation and reworks it for you. That's not easy within the current
structure though, so don't hold your breath.
--
Julian Field
www.MailScanner.info
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
More information about the MailScanner
mailing list