23
4.3.2. Content ltering in MTA Sendmail
The nod32sm module is a third-party program with the purpose to serve as a content lter for MTA Sendmail.
Using Sendmail’s Milter interface the nod32sm accesses all e-mail messages being processed by MTA Sendmail. In
order to enable ltering, enter the following lines into the [sm] section of main NOD32 conguration le.
agent_enabled = yes
sm_sock_path=“/var/run/nod32sm.sock“
In the next step, modify the ’/etc/mail/sendmail.cf’ le by entering the following specication into the section MAIL
FILTER DEFINITIONS:
Xnod32sm,S=local:/var/run/nod32sm.sock,F=T,T=S:2m;R:2m;E:5m
With these settings the MTA Sendmail will communicate with the nod32sm module via unix socket ’/var/run/
nod32sm.sock’. Flag F=T will result in temporary fail connection if the lter is unavailable. Flag T=S:2m denes
timeout 2 minutes for sending information from MTA to lter. Flag T=R:2m denes timeout 2 minutes for reading reply
from the lter. Flag T=E:5m means overall timeout 5 minutes between sending end-of-message to lter and waiting
for the nal acknowledgment.
Note that in case the timeouts for the nod32sm lter are set too small, the Sendmail can temporarily reject the
message which will attempt to pass through at a later time. This will lead to the continuous rejection of one and the
same message later. In order to avoid the problem, the timeouts have to be set properly. Thus one has to get into
account ’confMAX_MESSAGE_SIZE’ parameter dened in a sendmail.mc le that will provide not accepting messages
bigger than the appropriate parameter value (given in bytes). Taking into account this value and the maximum time
for processing of this amount of data by MTA (this can be measured) one can evaluate the appropriate timeouts for
nod32sm lter.
Finally, uncomment and modify the following line in the ’/etc/mail/sendmail.cf’ le.
OInputMailFilters=nod32sm
To reread the newly created NOD32 conguration, enter the following command.
/etc/init.d/nod32d reload
To accomplish the whole procedure, one has to restart the MTA Sendmail.
4.3.3. Content ltering in MTA Exim 3
Let’s look inside the exim conguration le ’/etc/exim/exim.conf’ (resp. in older versions ’/etc/exim.conf’) to become
familiar with its content. It is typically compound from the so called TRANSPORTS CONFIGURATION section, DIRECTORS
CONFIGURATION section and ROUTERS CONFIGURATION section. In order to congure exim to use our anti-virus you have
to dene special DIRECTORS CONFIGURATION entry:
#DIRECTORSCONFIGURATION
nod32_director:
driver=smartuser
condition=“${ifeq{$received_protocol}{virus-scanned}{0}{1}}“
transport = nod32_transport
verify = false
chapter 4 / Integration with E-mail Messaging System