[Rule] Section

Parameter values that are frequently used in Message processing rules (SETTINGS part) can be organized into named groups. Each of the groups is present in the main Dr.Web MailD configuration file as a section:

[Rule: <group name>]

where <group name> – unique name of the setting group. The name is  case insensitive and can contain Latin characters, numbers and white spaces.

Parameter values in each section are specified as <Parameter> = <Value> pairs, one parameter per line (that is why it is not required to escape commas in parameter values). Section ends when another section of the configuration file starts (any section including one with settings of another named group) or when the configuration file ends.

Settings specified in a named group can be used for any mail processing Rule with the rule=<group name> directive (see Rules of message processing). In the current version of Dr.Web MailD, you can specify no more than 1 rule parameter. Number of user sections is not restricted.

warning

All sections that contain named setting groups must be specified before the [Rules] section in the configuration file.

Example:

These lines declare MySettings section which specifies two parameters (block MailD notifications and disable moving to Quarantine, see description below):

[Rule:MySettings]
quarantine = no
notify = block

The following two rules, specified in the configuration file, use the section to set values of the quarantine and notify parameters:

[Rules]
Rcpt:regex:example\.com cont rule=MySettings
Sender:lol@foo.com && block:vir1 cont notify.Skip=allow, notify.Virus=allow, rule=MySettings

After that, MailD notifications are blocked and messages sent to the example.com domain cannot be moved to Quarantine. If a message is sent from the lol@foo.com address and the vir1 blocking object is found, MailD notifications on detected viruses and skipped messages will be allowed (for all types of notification recipients). At that, other notifications and moving files to Quarantine are blocked; these settings are imported from the used MySettings group (specified in the [Rule:MySettings] section).

Section of default settings

Main configuration file always includes section with default settings for those parameters that are not specified in the file - their values can be set only in Rules. This setting group has strictly defined name default. Thus, the section which contains settings in this group has the following heading: [Rule: default], at that, default can be omitted and the section name can be as follows: [Rule]. To use default settings in a rule, specify rule=default directive.

warning

Do not confuse the [Rule] section and the [Rules] section: in the latter, Rules of message processing are specified!

The [Rule] section contains default values for all parameters that can be used in Rules. See description of these parameters in the chapter Parameters used in Rule SETTINGS.

Example:

[Rule]
notify         = block
notify.Virus   = allow(any)
notify.Cured   = allow(admin:sender)
notify.Skip    = block
notify.Archive = allow(admin)
notify.Error   = allow(admin)
notify.Rule    = allow(admin)
notify.License = allow(admin)
notify.Malware = allow(any)
html = yes

In the given example, default values for the notify and html parameters are set. They will be used for all email messages unless the values are redefined by a Rule.