User, Group, and Alias Management

User, Group, Alias concepts

User in Dr.Web for UNIX mail servers is an owner of one or more mailboxes whose mail correspondence must be processed according to special settings. If a user has more than one mailbox, their addresses are called aliases (at that, one of the addresses is treated as primary).

You can specify individual Rules of message processing for a user (similar to the way general Rules are specified in the [Rules] section of the configuration file). User address (or any alias) is considered to be the user identifier. All user addresses are treated as a unit, so the same settings are applied to them and their statistics is aggregated.

Users can be joined in user groups which can also have their own rules of messages processing. Each user can be included in any number of groups. You can set the following two flags for a user (or a group):

Activity flag (A) – determine if the user (group) is active. If yes, special settings are used when processing. Otherwise, the special settings are ignored.

Statistics flag (S) – enables or disables statistics gathering for the user (group). To enable gathering of statistics for an individual user, set level of general statistics gathering to high.

Parameter search algorithm

To determine a parameter value for a processed message, the following algorithm is used:

Parameter value is searched in Rules stored in the internal database and related to the message recipient (the recipient is specified by the sender in RCPT TO).

Parameter value is searched in Rules stored in the internal database and related to all groups of the recipient. Viewing of the rules is performed in reverse order: from rules of the last group in the list to the rules of the first one until the required value is found.

Parameter value is searched in the [Rules] section of the main configuration file.

Note the order of viewing Rules:

oAll Rules in the currently viewed group are checked in the order they are specified.

oFor each Rule, the CONDITION part is checked. If it is true, the required parameter value is searched in the SETTINGS part of the rule.

oIf the CONDITION is false, the parameter value is searched in the next Rule.

oIf the CONDITION is true and is followed by the cont directive, the parameter value is searched in the next Rule. If the stop directive is specified, viewing of Rules stops regardless whether the required value is found or not.

According to the results, the parameter value is determined in the following way:

If the searched parameter is found in one matching Rule, its value from the SETTINGS part is used (note that when several Rules match the same parameter, the resulting value depends on the parameter semantics. For details, see Message processing rules).

If no Rule is specified, no Rule is matching, or no matching Rule contains the required parameter value, it is retrieved from the corresponding section of the configuration file.

If the parameter is not specified in the configuration file, the default value is used.

Thus, order of specifying user groups is important because it determines options to be applied to the given address.

If a message is sent to more than one recipient and for different recipients different values of the same parameter are specified, one of the following is possible:

1.The message is cloned and for each copy the corresponding parameter value is applied.

2.If the parameter does not allow cloning, the value is taken from user settings, or global settings specified in the configuration file, or the settings specified by default.

Внимание!

When searching the value, all the rules (for a certain user or user group) are viewed as a single list (user rules are at the top of the list, group rules – at the end of it). Thus, when viewing the lists for different message recipients, a user setting for a recipient can match a group setting for another recipient. If so, the algorithm described above is used.

You can use the control socket interface as well as the web interface for work with users, user groups, and aliases.

Interactive control socket commands for viewing users and user groups

email-info

Show all information about users. As well as individual Rules of message processing, the internal database stores additional information on each user. The information can be output in the following format:

[client-id/]email A=0|1 S=0|1
name: username
aliases: alias1 alias2 ...
groups: group1 group2 ...
rules:
1: SETTINGS1
2: SETTINGS2
...
custom:
tag1: info1..
tag2: info2..
...

where:

client-id - an empty string;

A - flag indicating whether the user is active. If the user is inactive, all related Rules are ignored;

S - flag indicating whether gathering of individual statistics is enabled (at that, level of general statistics gathering must be set to high);

name: name1 - user name (used mainly in the web interface);

aliases:, groups:, rules:, custom: - lists of aliases, user groups, rules and other user settings.

groups-info

Show all information about user groups. Each group has the same set of options as that for a user: always empty client-id string, user group name, activity status, statistics flags, list of users and additional service information. Output format is as follows:

[client-id1/]group A=0|1 S=0|1
emails:
email1
email2
...
custom:
tag1: info1..
tag2: info2..
...

Interactive control socket commands for managing users and user groups

Managing of users, user groups, and aliases is performed with special commands in which the following concepts are used:

email - user mail address (according to RFC 5322). It can be enclosed in angle brackets (<>) or single quotation marks ('). Address length cannot exceed 1024 bytes.

client-email - pair of [client-id/]email values, where client-id for Dr.Web MailD is always an empty string.

emails-list - List of client-email pairs. Items are separated by whitespace.

group - Group name enclosed in single quotation marks ('). If a group name does not contain spaces, the quotation marks can be omitted. If a group name is enclosed in single quotation marks, ' symbol within the group name must be doubled, (for example: 'It's a group name' –> 'It''s a group name'). Length of a group name cannot exceed 1024 bytes.

client-group - pair [client-id/]group values, where client-id for Dr.Web MailD is always an empty string.

ext-client-group = [client-id/]group | client-id/ – similar to client-group, where client-id for Dr.Web MailD is always an empty string.

group-list - List of client-group. Items are separated by whitespace.

ext-group-list - List of ext-client-group. Items are separated by whitespace.

RULE - Message processing rule. If the value contains a comma and this symbol is not enclosed in quotation marks, the '\' symbol must be specified before the comma (only if the value is not a comma-separated list; otherwise specify three back slashes "\\\").

Examples:

true cont headersfilter/RejectCondition = FileName = \"\.e\\\,e\"\, FileName = \"\.com\", headersfilter/RejectPartCondition = FileName = \"\.e\\\,e\"\, FileName = \"\.com\"
true cont vaderetro/action = discard\, quarantine

tag - a string that contains symbols from the [a-zA-Z0-9_-] set. The string is used for search of information related to the user or user group. For the web interface, the value is set to web.

info - a string that contains information on the user or user group. Cannot contain line breaks and null symbols.

settings - set of settings specified for the user (user group). Specified as a list of parameter=value pairs separated by whitespace.

The following parameters are allowed in the current version:

oA (active) - can be set to 0 (not active) or 1 (active). If the user or user group is not active, the rules related to them are ignored when processing. By default (if the flag is not specified), users and user groups are active.

oS (stat) - configures gathering of statistics for the user or user group. The value can be set to 0 (disabled gathering) or to 1 (enabled gathering). Setting flag to 0 stops statistics gathering. If statistics is already saved to the internal database, the data is accessible and is not deleted. By default, statistics gathering is enabled.

oN (name) - extended user name (this parameter is ignored for groups). Can be enclosed in single quotation marks (similar to group). If not specified, the user name is empty. The name length cannot exceed 1000 bytes.

Examples:

S=1 A=0 N='Some user'
S=0

Please note that in order to support the sequence of groups for a certain client-email, management is performed for a group set for a client-email, but not for a set of client-emails for a group.