[Sender] Section

In the [Sender] section, settings of the Sender component (responsible for sending messages) are specified. This section is not included in Dr.Web distribution for operation with Communigate Pro mail transfer system.

UseSecureHash = {logical}

Instructs to add the X-DrWeb-Hash header ("mark") to messages that are sent back to the mail system.

The parameter value is used if Dr.Web MailD has to reject an original message after modifying it and then add the modified message to the queue of incoming email. In this case, a message with such header, after being received by Dr.Web MailD from the mail system, is transmitted for delivery without a repeated check; otherwise, a message without the header is checked. Repeated checks of messages can cause looping and result in failure to deliver.

The parameter must be used while interaction with the following mail systems: Postfix, Qmail, Sendmail, and Zmailer:

When Dr.Web MailD is interacting with the Postfix mail system, Yes must be specified only if the Milter protocol is used (interaction via the drweb-milter module). If so, drweb-milter processes all messages generated by drweb-sender.

Default value: No

When Dr.Web MailD is interacting with the Qmail or Sendmail system, Yes must be specified if messages are sent and received by the same mail system.

Default value: Yes

When Dr.Web MailD is interacting with the Zmailer system, Yes must be specified only if drweb-zmailer is used on the routing stage (e.g., started from process.cf). In this case, drweb-zmailer processes all messages generated by drweb-sender.

Default value: No

SecureHash = {string}

The parameter value determines content of the X-DrWeb-Hash header.

You can specify a free-form string as a value, recommended string length is not less than 10 characters.  For better security, it is strongly recommended to change the default parameter value.

In Dr.Web for UNIX mail servers solution for Zmailer MTA this parameter value must be the same as the value of the --hash parameter used on drweb-zmailer startup, when Zmailer is used at the routing stage.

Default value:

SecureHash = !!!---------___EDIT_THIS___!!!

StalledProcessingInterval = {time}

Timeout for processing of stalled messages.

Stalled message is a message that was received and processed but not transmitted to Sender for dispatch. This situation might occur due to network or power supply problems.

If a stalled message is found, it is queued for dispatch.

Also this parameter value is used for repeated requests to datasources from Lookups specified in the Router parameter (see below), if the used data sources are not accessible and therefore, a message cannot be delivered (as the destination address is unknown).

Default value:

StalledProcessingInterval = 10m

SendingIntervals = {time}

Time period between attempts to send stalled messages and notifications that were not sent on the first attempt.

When Dr.Web for UNIX mail servers is running in synchronous mode, Sender attempts to send processed messages regardless of the first interval specified in the parameter value. If the attempt is unsuccessful, Sender starts dispatching delayed messages after a time period specified in the SendingIntervals parameter value. If the first parameter value is 0, it is ignored as an attempt to send a message was already performed.

If Dr.Web for UNIX mail servers is running in asynchronous mode, Sender always attempts to send messages according to time intervals specified in the parameter value.

Please note that all generated notifications and DSN are always sent in asynchronous mode (regardless of Dr.Web MailD operation mode). Thus, dispatch of delayed messages and DSN starts according to the first time interval specified in the SendingIntervals list. So, it is recommended to set 0 as the first interval.

If the first value in the SendingIntervals list is not 0, in the asynchronous mode processed messages and notifications are sent with the delay equal to the first value in the list.

If the SendingIntervals list have only one value, equal to 0, Sender does not attempt to send stalled messages. These messages are immediately moved to /out/failed directory. See also the warning at the end of this section.

Default value:

SendingIntervals = 0s, 30s, 60s, 10m, 30m, 2h, 8h, 1d, 1d

Method = {SMTP | LMTP | PIPE}

Method used by Sender to deliver messages.

SMTP – messages are sent via SMTP protocol;

LMTP – messages are sent via LMTP protocol;

PIPE – messages are sent via PIPE to some external mail program.

Default value:

Depends on the distribution.

MailerName = {SMTP | Sendmail |
Postfix | CommuniGate | Qmail |
Exim | Zmailer | Courier}

Name of the MTA working with Dr.Web for UNIX mail servers.

This parameter is used when Method = pipe.

Default value:

Depends on the distribution.

Address = {address}

MTA address used by the Sender component to send messages.

If Method = pipe, specify the full path to the MTA used to receive messages. If the Method parameter has another value, specify the address of the socket used for sending messages.

If Dr.Web for UNIX mail servers solution operates in SMTP/LMTP proxy mode, then in addition to standard address types, you can use mx:HOSTNAME, where HOSTNAME is the name of the host. When this type is used, the suite receives all MX records and sends a message according to them.

If only mx: prefix is specified, without a hostname, the software receives and uses MX records of the recipient's domain (from the TO filed in the message envelope).

This parameter can have multiple addresses, separated by commas, for sending messages.

Value of this parameter cannot be empty and must be specified even if routing is used (see description of the Router parameter).

Example:

Address = inet:25@10.4.0.90, inet:25@10.4.0.91, inet:25@10.4.0.92

In this example, if MTA with 10.4.0.90 address stops responding, Sender attempts to send an email message to 10.4.0.91. In case of unsuccessful transmission, the message is sent to 10.4.0.91.

When number of addresses is large, it is recommended to increase values of the MaxTimeoutForThreadActivity and IpcTimeout parameters (the [General] section) to at least 5 minutes, as to allow Sender to switch to the last address in case previous address the does not respond.

Default value:

Depends on the distribution.

PipeTimeout = {time}

Timeout to receive response using pipe.

Default value:

PipeTimeout = 2m

Options = {string}

Optional parameters for the external mail program, which is initialized when pipe method is used.

Default value:

Options =

InPoolOptions = {pool options}

Thread pool settings for processing messages in 'before-queue' mode.

Note that this parameter is deprecated and is not used anymore.

Default value:

InPoolOptions = auto

OutPoolOptions = {pool options}

Threads pool settings for processing messages in 'after-queue' mode.

Default value:

OutPoolOptions = auto

The following parameters are specified only in solutions for Exim and Postfix MTAs, and in SMTP/LMTP proxy mode.

HeloCmdTimeout = {time}

Timeout to execute HELO/EHLO commands.

Default value:

HeloCmdTimeout = 5m

MailFromCmdTimeout = {time}

Timeout to execute MAIL command.

Default value:

MailFromCmdTimeout = 5m

RcptToCmdTimeout = {time}

Timeout to execute RCPT command.

Default value:

RcptToCmdTimeout = 5m

DataCmdTimeout = {time}

Timeout to execute DATA/BDAT commands.

Default value:

DataCmdTimeout = 2m

DataBlockTimeout = {time}

Timeout to send a message.


Default value:

DataBlockTimeout = 3m

EndOfDataTimeout = {time}

Timeout to receive confirmation of message delivery.


Default value:

EndOfDataTimeout = 10m

OtherCmdsTimeout = {time}

Timeout to execute other commands via SMTP/LMTP.


Default value:

OtherCmdsTimeout = 2m

SendDSN = {logical}

Enables/disables sending of DSN reports if a message delivery problem occurs.

Please note that if Dr.Web MailD operates via Sender with MTA (Exim, Postfix, Zmailer) and sending of DSN is enabled, it is necessary to be aware of the following situation. In this mode, DNS can be generated by Dr.Web MailD (after all attempts to send a message failed), and by the integrated MTA (if timeout for message processing expired). Thus, the sender can receive two DNS about the problem (from Dr.Web MailD and from MTA).

DSN is transmitted to Sender for delivery if it cannot be transmitted directly to MTA (for example, when the domain name in the sender address is not full) and the return code cannot be transmitted to Receiver.


Default value:

SendDSN = No

Router = {Lookup}

Message routing rules depending on recipients when the suite operates in SMTP/LMTP proxy mode.

Messages addressed to different recipients can be sent via different routes. In this parameter, you can specify addresses for sending messages to different domains.

Parameter values are specified in DOMAIN ADDRESS format, where:

DOMAIN is a string that must be included in receiver envelopes. Envelope has <user@host> format. Case-insensitive partial match is searched.

For example, if "@localhost" substring is searched, <test@localhost> and <yy@localhost.localdomain> envelopes matches it, and if "@localhost>" substring is searched, only <test@localhost> envelope matches;

ADDRESS is an address where a message is sent to, if DOMAIN substring is found in the envelope. ADDRESS format is similar to the one of the Address parameter in this configuration file. It is possible to specify several email addresses delimited by the "|" symbol, in this case, the message is delivered to the first address connection to which was established.

Note that the order in which addresses are specified is of importance because the first match is searched.

If the matching DOMAIN string cannot be found for a message in the list, the address specified in the Address parameter is used for the message dispatch. Thus, the value of this parametr must not be empty (see a not below, in the Router usage subsection).

Note that if data sources used in Lookup are inaccessible and the message cannot be delivered (as the destination address is unknown), this message is "lost" and Sender repeats an attempt to send the message at time interval specified in StalledProcessingInterval

Example:

Router = @main.server.com> mx:main.server.com|inet:25@backup.server.com

In this case messages addressed to recipients from main.server.com domain are sent to addresses indicated in MX record for main.server.com. If delivery fails, system tries to deliver the message to backup.server.com on port 25.

Please note that the parameter value is Lookup.


Default value:

Router =

Router usage

Router parameter allows using Lookups (except for regex, wildcards and rfile types).

Example:

Router = "mysql:select address from senders where user='$u'"

This query searches for a local part of the recipients address. The search is performed in user column of senders table in MySQL database. If the local part is found, the message is sent to the address specified in the matching row of the address column.

Example:

Router = "ldap:///description?sub?(cn='$d')", domain1.com inet:25@example.com | inet:1025@example.com | inet:2025@example.com, mail.com mx: | inet:25@mail.backup, domain2.com mx:mail.ru | inet:25@mail.backup, "file:/path/to/routers.list"

In this example, messages are transmitted for delivery the following way:

1)Recipient's domain name is searched using LDAP (cn attribute is used). If the domain name is found, redirection settings are taken from the description field.

2)Messages addressed to recipients from domain1.com are sent to example.com on port 25. If delivery fails, system tries to deliver the message to the same address on port 1025 and then on port 2025.

3)Messages addressed to mail.com are sent to addresses corresponding to MX record of mail.com.

4)Messages addressed to domain2.com are redirected to addresses specified for MX record of mail.com or to the port 25 of mail.backup server.

5)If address of the recipient does not match any of the previously described addresses, matching is checked in the /path/to/routers.list file.

Please note that only one address is assigned to one domain, therefore expressions of this type are not allowed:

Router = domain, domain2 25@host

Before using Lookup as a value of the Router parameter, check correctness of the Lookup (use drweb-lookup utility) and accessibility of the used data source. If the Router parameter value is Lookup with OnError=exception error handling mode (this mode can be set in data source settings as well as locally overridden in Lookup value expression), then if Sender cannot receive required route from the used data source, this situation must be handled as an error in Sender. An error message is logged. In this case:

in the synchronous mode, Receiver returns 451 SMTP error code to the message sender (Requested action aborted: local error in processing), and the processed email message is removed from all queues of Dr.Web MailD.

in the asynchronous mode, the message is marked as 'stalled' and Sender tries to send it at intervals specified in the StalledProcessingInterval parameter.

If an email message cannot be sent to any of the matching addresses, the following actions are performed (depending on the return code sent by the last MTA):

Sender starts sending delayed messages after an interval specified in the SendingIntervals parameter. This process is configured by the rules specified in the Router parameter. If sending of delayed messages fails, Notifier generates a DSN (if allowed in the SendDSN parameter). If special routes are not specified for the domain of the undelivered message sender (the routes are specified in the Router parameter or in message processing rules), this DSN is sent to the address specified in the Address parameter.

if last MTA returns 5** SMTP code, DSN is generated immediately and the message is deleted from out-queues. Scheme of DSN sending is similar to the one described above. If DSN cannot be delivered, it is deleted after the interval specified in the SendingIntervals parameter.

When different routes are specified in the Router parameter and in message processing rules for the same domain, routes specified in the Rules have higher priority.

warning

Please note that even if you configure routing of all mail messages with the Router parameter, the Address parameter value must not be empty; otherwise Sender fails to start. Address specified in the Address parameter value is used if the match in the routing table or in message processing rules cannot be found for the recipient.

If all attempts of Sender to dispatch a message are failed, the stalled message remains in the /out/failed directory until it is sent with drweb-inject utility or deleted manually (with the use of a system utility).