Operating Principles

The component is designed to request data from text files, relational database, network storages and directory services (like Active Directory) that support the LDAP protocol. The received data (for example, users’ identifiers and rights) is transferred to Dr.Web for UNIX Mail Servers components to be used in different rules for scans (for example, to allow a user to access a requested URL and so on).

This manual does not describe the operating principles of relational databases, the Redis storage, directory services and the LDAP protocol. If necessary, refer to the corresponding reference materials.

The Dr.Web LookupD component is launched automatically by the Dr.Web ConfigD configuration daemon when required (i.e. upon receiving a request for data).

Once the request on data reception from a certain component arrives, Dr.Web ConfigD configuration daemon launches the Dr.Web LookupD (if not launched), then the component performs the request from the requested data source and returs the response. Depending on the request, the reply consists of a list of strings that satisfy a certain search criteria, retrieved from the data source according to a given search criteria, or a logical value (true or false) that indicates whether the search results contain strings that match the given condition.

In Dr.Web LookupD settings you can specify an unlimited number of data sources. When forming a request for data retrieval, the client component must specify the source for data. Once Dr.Web LookupD is started, it will operate for some time waiting for new requests. If there are no more requests, after a waiting period Dr.Web LookupD shuts down automatically.

The basic way in which other components of Dr.Web for UNIX Mail Servers use Dr.Web LookupD is for retrieving some data needed to check the validity of some conditions specified in the operation rules for these components. When checking the applicability of rules and the validity of conditions, data requests to Dr.Web LookupD are performed automatically.

Text files processing peculiarities

1.When processing text files, leading and trailing spaces in strings are discarded. Blank strings and lines that have the '#' character as the first non-whitespace character, are ignored.

2.Text files are considered immutable data sources and their content is fully cached in memory. In addition, the results of requests to these files for validation are also cached. Thus, in case if the source file has been modified, it is needed to make Dr.Web LookupD re-read the configuration by sending HUP signal to Dr.Web ConfigD component, using, for example,  reload command of drweb-ctl.

MySQL connection aspects

Before the MySQL connection, the parameters from the [client] section of the MySQL file settings are read by default (the file search is done in the following paths: /etc/my.cnf, /etc/mysql/my.cnf, and /etc/alternatives/my.cnf).