Integration with MTA as a filter |
![]() ![]() ![]() |
This method of integration assumes connection of Dr.Web MailD directly to the mail server as an external filter for email scanning. It is possible to connect to any mail server (for example, Exim, Sendmail, Postfix) that uses the following interfaces: Milter, Spamd, Rspamd. 1) Configuring Dr.Web MailD Parameters To integrate Dr.Web MailD with a mail server, you will need to review the current values of parameters in the Dr.Web MailD‘s settings section in the configuration file (the [MailD] section) and change them if necessary. 1.1) General operation parameters of Dr.Web MailD during email message scanning Using parameters TemplateContacts and ReportLanguages, determine parameters of email generation when repacking email messages with threats and/or spam. As the value of parameter RepackPassword, indicate method of generation of passwords for protected archives with threats that are going to be added to email messages once unpacked (value None, indicated by default, allows to abandon the protection of archives with a password, which is permissible but not recommended). 1.2) Integration parameters of Dr.Web MailD with MTA To start with, it is necessary to determine the used conjugation interface (Milter, Spamd or Rspamd), and indicate the parameters of the MTA connection and parameters of email scanning, received for scanning via the selected interface. All parameters of Dr.Web MailD, that control its conjugation with MTA via an interface, have a respective prefix in their names: •Milter*—for Milter interface. •Spamd*—for Spamd interface. •Rspamd*—for Rspamd interface. It is necessary to indicate values of the following parameters (where <interface> is a prefix in the parameter name that corresponds to the selected one for conjugation with the MTA interface): 1.<interface>Socket is a socket that will be used by Dr.Web MailD to obtain scanned email messages from MTA via the corresponding interface. Usage of the UNIX socket or network socket is allowed. 2.Email message scanning parameters (<interface>ScanTimeout, <interface>HeuristicAnalysis, <interface>PackerMaxLevel, <interface>ArchiveMaxLevel, <interface>MailMaxLevel, <interface>ContainerMaxLevel, <interface>MaxCompressionRatio), that limit the length and resource intensity of email message scanning. When a fine-grained configuration is not required, it is recommended that values for parameter data are kept in their default state. 3.<interface>BlockUnchecked—response of Dr.Web MailD to impossibility of scanning of the received email message (exceeding the set limits (see previous item), violation of email message structure, anti-virus engine error, availability of attached archives protected with a password, etc.). If this parameter is set to Yes, then in case of impossibility to scan an email message and/or its attachments, MTA will receive a setting to reject this email message. 4.To configure the filtering rules for emails in a more fine-grained way (on the basis of various conditions), you can also edit the scanning rules <interface>RuleSet. After all settings are adjusted, restart Dr.Web for UNIX Mail Servers (use the command drweb-ctl reload). You can also restart the configuration daemon Dr.Web ConfigD (use the service drweb-configd restart command).
2) Setting the Parameters of MTA To enable interaction between MTA and Dr.Web MailD, edit the configuration of the mail server to allow using Dr.Web for UNIX Mail Servers as an external filter that scans emails processed by MTA. 1.Indicate the interface used for interaction of MTA with Dr.Web MailD when scanning email messages (Milter, Spamd, Rspamd). 2.Indicate parameters for connection of MTA to Dr.Web MailD via the chosen interface (used socket must match with the one indicated in the parameter <interface>Socket for the corresponding interface in the settings of Dr.Web MailD). 3.Configure the MTA behavior in response to receipt of email scanning results via the interaction interface. After changing MTA‘s settings, restart it. 3) Examples of Settings for Some MTA Below are the example cases of settings for MTA Postfix, Sendmail and Exim for connection of Dr.Web MailD as an external filter of email messages via the following interfaces: Milter, Spamd and Rspamd.
1. Postfix •Milter: Add the following lines to the MTA setting file main.cf:
Note that the obligatory is only the parameter smtpd_milters. Other parameters can be skipped. 2. Sendmail •Milter: Add the following line to the MTA prototype setting file sendmail.mc:
After changing the file sendmail.mc, do not forget to modify it into the active configuration file sendmail.cf by executing any of the following commands:
Note that all the commands listed above presume that files of configuration Sendmail are located in the directory /etc/mail. 3. Exim •Spamd: Add the following lines to the MTA setting file exim.conf:
•Rspamd: Add the following lines to the MTA setting file exim.conf:
|