Integration with External Applications

The emulation of the interface of the clamd anti-virus daemon included in the ClamAV anti-virus solution makes it possible to integrate Dr.Web ClamD with any external applications capable of connecting to the clamd anti-virus daemon.

The table below shows examples of applications that can use clamd for anti-virus scans:

Product

Integration

Email message services

Mail server
Postfix

Use of clamd

Scan transmitted email messages for viruses and other malware.

Integration requirements

Use an intermediate component: clamsmtpd, clamav-milter or amavisd-new.

Links to documentation

Postfix documentation: http://www.postfix.org/documentation.html.

Description and source code of amavisd-new: https://www.amavis.org/

Mail server
Exim

Use of clamd

Scan transmitted email messages for viruses and other malware.

Integration requirements

Add the following setting to the Exim configuration file:

av_scanner = clamd:<path_to_clamd_UNIX_socket>

where <path_to_clamd_UNIX_socket> corresponds to the socket of the endpoint configured in Dr.Web ClamD.

Links to documentation

Exim documentation: https://exim.org/docs.html

Mail server
CommuniGate Pro

Use of clamd

Scan transmitted email messages for viruses and other malware.

Integration requirements

Use cgpav as an intermediate component.

Links to documentation

CommuniGate Pro official site: https://www.communigate.ru/en/.

Description and source code of cgpav: http://program.farit.ru/index-rus.html

In the settings of the external software component that communicates directly with Dr.Web ClamD as with the clamd anti-virus daemon, specify a path to a UNIX socket or a TCP socket listened by Dr.Web ClamD at one of its endpoints set up in its configuration as an address for connecting to clamd.

Example of connecting CommuniGate Pro to Dr.Web ClamD:

1.Download and build cgpav (version 1.5):

$ wget http://program.farit.ru/antivir/cgpav-1.5.tar.gz
$ tar -xzvf cgpav-1.5.tar.gz
$ cd cgpav-1.5
$ ./configure
$ make
# make install

At the configure step, when answering the question Choose Anti-Virus daemon, indicate Clamav.

2.Dr.Web ClamD configuration:

[ClamD]
Start = yes

[ClamD.Endpoint.mail]
ClamdSocket = /var/run/drweb.clamd

3.CommuniGate Pro configuration:

1)in the CommuniGate Pro settings file (/var/CommuniGate/Settings/cgpav.conf), specify the path to the Dr.Web ClamD socket:

clamd_socket = /var/run/drweb.clamd

2)in the CommuniGate Pro management web interface:

go to Settings → General → Helpers;

set a new filter in the Content Filtering section:

toggle its state to Enabled,

specify a filter name (for example, drweb),

specify cgpav in the Program Path parameter;

save changes;

go to Settings → Mail → Rules;

specify a new rule name (for example, drweb_scan) and click Add Rule;

select the Highest rule priority and save changes;

click Edit to the right of the rule name;

select Message Size in the Data drop-down list,

select greater than in the Operation field,

select 1 in the Parameter field,

select ExternalFilter in the Action field,

select the name of the previously created filter (drweb in this case) in Parameter;

save changes.