How to configure a custom command line anti-virus scanner with MailEnable

SUMMARY

MailEnable
Professional and Enterprise Editions integrate with a variety of
third party antivirus solutions in order to scan and remove viruses on
messages as they are processed. While MailEnable comes with presets
for some of the popular anti-virus applications it is possible to configure your own command line scanner.

DETAIL

Configure antivirus scanning as
follows:1. From the MailEnable
Administration program select MailEnable|MailEnable
Management|Servers|localhost|Filters|MailEnable Message Filter by clicking on
it. 2. In the right hand panel, right click on MailEnable Antivirus Filter
and select Properties. 3. Ensure that the Enable anti-virus support check
box is checked. 4. Scroll down through the list
to locate the antivirus application to use, and enable it.

If antivirus support
is enabled, messages are unpacked and scanned as they pass through the Mail
Transfer Agent. The MTA moves mail messages internally within MailEnable. When
the MTA picks up a message from a connector's queue, it unpacks it into a
scratch directory and uses the command line specified in the administration
program to scan each unpacked file. In most cases, command line virus checkers
have the ability to automatically delete files. If one of the scanned
attachments of the message is deleted, the anti-virus filter assumes that it has
a virus and when the message is reconstructed, it replaces the offending content
with a note indicating that offending content was removed. MailEnable can also
check the return code from a command line scanner in order to determine whether
the item it processed is infected.

For example, a sample argument line for a command line
scanner is:

"[AGENT]"
"[FILENAME]" -remove -s -nb -nc

This can be seen by opening the
registry and accessing HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail
Enable\Agents\MTA\Filters\[Virus Scanner Short Name].

Note that the [AGENT] and
[FILENAME] tokens in this registry setting are replaced by the path to the A/V
Command Line Scanner and the attachment name (which is generated by the system).
The "-remove -s -nb -nc" part of this registry value is the part that will vary
depending on the scanner application being used.

Ensuring that the antivirus application supports auto deletion is a little limiting.
As a result there are registry setting that allow the use of the scanners DOS
error level or exit code.

Copy this into
Notepad, save as a .reg file and import it using the registry editor. Once
imported into the registry, the settings can be edited to those required by the
anti-virus command line application.

MORE INFORMATION

Which anti-virus solutions can
be used with MailEnable?: Article ME020144

How to tune MailEnable's
antivirus Plug-in and the MTA: Article ME020147

How to debug anti-virus
support and the Mail Transfer Agent: Article ME020121