Using Dr.Web Mail Security Suite 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:

using a mail server (for example, Exim, Sendmail, Postfix) for the transit transmission of email messages via SMTP;

connecting Dr.Web MailD to this mail server as an external filter for scanning email messages;

connecting via the Milter, Spamd or Rspamd interface.

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 scanning accepted email messages via the Milter, Spamd or Rspamd interface are provided in the Integration with an MTA as a Filter section.

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 a mail server, edit settings in the [MailD] section of the configuration file. An example of such configuration can be found in the Integration with an MTA as a Filter section.

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 port 1234 on 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.
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 email messages for the domain example1.org
#will be transmitted after scanning to an MTA located
#at the host relay.example1.org (on the default port
#for SMTP)
example1.org    smtp:relay.example1.org
 
#All incoming and outgoing email messages for the domain example2.com
#will be transmitted after scanning to an MTA located
#at the host with IP address 2.2.2.2 on port 10025
example2.com    smtp:2.2.2.2:10025