Using Dr.Web for UNIX Mail Servers in SMTP Proxy Mode

In this section

Setting the Scanning Parameters of a Mail Server

Configuring Dr.Web MailD Settings

SMTP Proxy Configuration Example for Postfix

This method of integration implies the installation of a mail server (for example, Exim, Sendmail, Postfix) for the transit transmission of email messages via the SMTP protocol and the connection of Dr.Web MailD to this mail server as an external filter for email messages scanning. All mail servers supporting Milter, Spamd and Rspamd interfaces can be integrated.

Setting the Scanning Parameters of a Mail Server

For SMTP proxy realization, the mail server must be configured so as to receive email messages, to scan them via Dr.Web MailD connected as an external filter for email scanning via the interface Milter, Spamd or Rspamd, and then to send them on the final or next intermediate MTA in the email messages’ delivery chain according to the specified routing rules.

The MTA parameters necessary to connect Dr.Web MailD as an external filter for email scanning via the interface Milter, Spamd, or Rspamd are listed in the section “Integration with MTA as a filter”.

The routing configuration of receiving and transmitting email messages depends on the installed mail server. The example below shows such configuration for the Postfix mail server.

Configuring Dr.Web MailD Settings

To integrate Dr.Web MailD with the mail server, you should check and, if necessary, change the values for parameters that are located in the configuration file, in the section with the Dr.Web MailD settings (the section [MailD]). An example of such configuration can be found in the section “Integration with MTA as a filter”.

SMTP Proxy Configuration Example for Postfix

The following example assumes that:

Postfix receives mail messages sent to mailboxes from the domains example1.org and example2.com (the routing table of email messages is specified in the /etc/postfix/transport file);

the scanning of messages on nested threats and spam is performed via the Milter interface by Dr.Web MailD;

Dr.Web MailD listens the port 1234 on the host 10.20.30.40.

1.The contents of the main.cf setting file:

#Domains, for which the mail message scanning and transmission will be performed
#email messages.
relay_domains = example1.org, example2.com
 
#Settings for connecting to an external Milter filter that performs
#message scan for viruses and spam.
smtpd_milters = inet:10.20.30.40:1234
milter_protocol = 2
 
Transport table (mail routing settings).
transport_maps = hash:/etc/postfix/transport

2.The contents of the transport file:

#String format:
#<transfer domain> <connection type>:<MTA address>:<listening port number>

#All incoming and outgoing mail for the domain "example1.org"
#will be transmitted after scanning to MTA, located
#at the host "relay.example1.org" (on the default port for
#SMTP protocol)
example1.org    smtp:relay.example1.org
 
#All incoming and outgoing mail for the domain "example2.com"
#will be transmitted after scanning to MTA, located
#at the host with the IP address 2.2.2.2 to port 10025
example2.com    smtp:2.2.2.2:10025