example database structure for rules and configs

Steve Freegard steve.freegard at fsl.com
Sat Oct 9 11:13:44 IST 2010


On 08/10/10 14:10, Lance Haig wrote:
> Hi Steve,
>
> does this apply to rules as well?
>
>

Rules are a bit different.

You need a database table 'rulesets' in the following format:

name
num
rule

In MailScanner.conf you need to set:

SQL Ruleset = SELECT num, rule FROM rulesets WHERE name=? ORDER BY num ASC

Then for any option in the 'config' table you want to use a database 
ruleset for you set the value to 'name.customize' (e.g. foo.customize). 
  This will cause the functions to lookup the ruleset using the name 'foo'.

Note that the number ordering is critical; you want to make sure that 
you don't have any duplicates for a given rule (read: use a unique key) 
and that you order them properly.

Regards,
Steve.


More information about the MailScanner mailing list