5.5. Alternative methods of content ltering
5.5.1. Scanning e-mail messages using AMaViS
AMaViS - A Mail Virus Scanner is a tool that interfaces your MTA and several anti-virus scanners.
It supports various MTAs and comes in three branches: amavis, amavisd and amavisd-new.
Amavis cooperates with ESET Mail Security by using esets_cli. Yet before we go into detailed
explanation of the Amavis congurations, we would like to discuss the impact of the method on
the ESET Mail Security functionality.
First, note that Amavis does not allow modication of the scanned e-mail messages. So no
infected e-mail attachments can be cleaned nor deleted by ESETS. Second consequence is that
no ESETS footnote with log and status dependent header elds will be written into the e-mail.
Next, amavis doesn’t provide mail sender/recipient, so no user specic congurations can be
used, too. Advanced mail handling (accept, defer, discard, reject) is also limited for esets_cli.
Lastly, it scans les and thus cannot use ESETS anti-spam engine.
Taking into account these drawbacks, this conguration is usable if only the above discussed
features of the product are not necessary for the user.
5.5.1.1. amavis
Conguration of Amavis is performed during the Amavis installation. After unpacking the
sourceamavis-0.x.y.tgz,createtheleamavis/av/esets_cliwiththiscontents:
#
# ESET Software ESETS Command Line Interface
#
if ($esets_cli) {
do_log(2,”Using $esets_cli”);
chop($output = `$esets_cli --subdir $TEMPDIR/parts`);
$errval = retcode($?);
do_log(2,$output);
if ($errval == 0) {
$scanner_errors = 0;
} elsif ($errval == 1 || $errval == 2 || $errval == 3) {
$scanner_errors = 0;
@virusname = ($output =~ /virus=”([^”]+)”/g);
do_virus();
} else {
do_log(0,”Virus scanner failure: $esets_cli (error code: $errval)”);
}
}
Note that the above script accepts the email only in case it is accepted in esets_cli’s Handle
Object Policy. In any other case, the mail is blocked. If it a virus was found, it’s name is extracted
from the output.
Next, if you are using the Linux RSR package, you have to update your PATH environment
variable with this command:
export PATH=”$PATH:/opt/eset/esets/bin”
For successful installation you may need to install additional software like arc, unarj, unrar,