5.5. Alternative methods of content filtering
5.5.1. Scanning email messages using AMaViS
AMaViS (A Mail Virus Scanner) is a tool that interfaces your MTA with several antivirus 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. Before explaining the AMaViS
configurations, the impact of the ESET Mail Security functionality method is described.
AMaViS does not allow modification of scanned email messages and denies ESETS access to
clean or delete infected email attachments. As a result, the ESETS footnote with log and status
dependent header fields will not be written into the email message. Also, AMaViS does not
provide mail sender/recipient information. Thus, user specific configurations are unavailable and
advanced mail handling features (accept, defer, discard, reject) are limited for esets_cli. Lastly,
AMaViS only scans files, it cannot use the ESETS anti-spam engine.
Taking into account these drawbacks, content filtering using AMaViS is recommended only if
the system administrator does not require the features discussed above.
5.5.1.1. amavis configuration
Configuration of amavis is performed during the amavis installation. After unpacking the
source amavis-0.x.y.tgz, create the file amavis/av/esets_cli with these contents:
#
# 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)");
}
}
The script above accepts the email message only when it is accepted in esets_cli's HOP
(Handle Object Policy). The email message is blocked in any other instance. If a virus is found, the
virus name is extracted from the output.
Next, if you are using the Linux RSR package, you must update your PATH environment
variable with this command:
export PATH="$PATH:/opt/eset/esets/bin"
To successfully install amavis, you may need to install additional software such as arc, unarj,
19
Need help?
Do you have a question about the MAIL SECURITY LINUX and is the answer not in the manual?
Questions and answers