[PostgreSQL] Section

In the [PostgreSQL] section settings for interaction between Dr.Web MailD and PostgreSQL database are specified:

ConnectionsString = {string}

String with settings for connection to PostgreSQL database.

The string can be empty (in this case, default parameters are used) or it can contain one or more parameter settings separated by white space. Parameters are specified in the following format: keyword = value. Spaces around the equal sign are optional. To specify an empty value or a value containing spaces, enclose it in single quotes. If the string is empty, default parameters are used.

For details, refer to http://www.postgresql.org/docs/9.3/static/libpq-connect.html.

In addition is recommended to use the connect_timeout parameter that specifies wait time for a connection to be established.

Examples:

ConnectionString = host=localhost port=5432 user=ai password=qwerty dbname=drweb

ConnectionString = hostaddr=127.0.0.1 port=5432 dbname=mailddb user=mailddbuser password=Str0ngPaSSw0rd connect_timeout=5s

Default value:

ConnectionsString =

SizeLimit = {integer}

Maximum number of strings received in response to a single database request.

When the parameter value is set to 0, maximum number of received strings is not limited.

Default value:

SizeLimit = 10

Lib = {path to file}

Path to libpq.so library.

Default value:

Lib = /usr/lib/libpq.so

SkipDomains = {LookupLite}

List of domains for which request to database is not required.

This parameter often allows to improve total performance and considerably reduce server load.

Please note that the parameter value is LookupLite.

The parameter value can also be locally overridden in a Lookup.

Default value:

SkipDomains =

OnError = {ignore | exception}

Sets the mode of error handling (errors that occur in Lookup when connecting to the specified data source).

Allowed modes:

ignore – ignore the error and continue message processing (the error is only logged);

exception – generate an exception which is handled as a message processing error. The handling method corresponds to the ProcessingError parameter value set for the module in operation of which this error occurred.

The parameter value can also be locally overridden in a Lookup value.

Default value:

OnError = ignore

If the specified host or database are not accessible, connection is attempted to be established until timeout occurs (the timeout value is specified for the connect_timeout parameter in the connection string; in the example above the timeout is set to 5 seconds). After that, an error is fixed and handled according to the action set for the OnError parameter.