esets added

none
This commit is contained in:
Jerry.Benton 2016-08-13 12:35:35 -04:00
parent 9a16991688
commit c7697bb683
8 changed files with 99 additions and 3 deletions

View file

@ -6,6 +6,7 @@ and restarts
- updated Message.pm to correctly prepend phishing notices in email
subject
- added avast virus scanner support
- added esets virus scanner support
05/23/2016 Changes in v5.0.2-1
==================================

View file

@ -639,6 +639,7 @@ Virus Scanning = yes
# sophos from www.sophos.com
# sophossavi (also from www.sophos.com, using the SAVI perl module)
# bitdefender from www.bitdefender.com
# esets from www.eset.com
# f-secure from www.f-secure.com
# clamav from www.clamav.net
# clamavmodule (also from www.clamav.net using the ClamAV perl module)

View file

@ -22,6 +22,7 @@ bitdefender /usr/lib/MailScanner/wrapper/bitdefender-wrapper /opt/BitDefender
clamav /usr/lib/MailScanner/wrapper/clamav-wrapper /usr
clamd /bin/false /usr
clamavmodule /bin/false /usr/share/perl5/ClamAV
esets /usr/lib/MailScanner/wrapper/esets-wrapper /opt/eset/esets/sbin
f-secure /usr/lib/MailScanner/wrapper/f-secure-wrapper /opt/f-secure/fsav
generic /usr/lib/MailScanner/wrapper/generic-wrapper /dev/null
sophos /usr/lib/MailScanner/wrapper/sophos-wrapper /opt/sophos-av

View file

@ -0,0 +1,38 @@
#!/bin/sh
# esets-wrapper -- invoke esets for use with mailscanner
#
# MailScanner - SMTP Email Processor
# Copyright (C) 2001 Julian Field
#
# written by: Jerry Benton <mailscanner@mailborder.com>
#
# $Id: esets-wrapper 5004 2010-02-12 12:41:47Z sysjkf $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# https://www.mailscanner.info
#
#
PackageDir=$1
shift
Prog=esets_scan
if [ "x$1" = "x-IsItInstalled" ]; then
[ -x ${PackageDir}/$Prog ] && exit 0
exit 1
fi
exec ${PackageDir}/$Prog "$@"

View file

@ -193,6 +193,17 @@ my %Scanners = (
SupportScanning => $S_SUPPORTED,
SupportDisinfect => $S_SUPPORTED,
},
"esets" => {
Name => 'esets',
Lock => 'esetsBusy.lock',
CommonOptions => '',
DisinfectOptions => '',
ScanOptions => '',
InitParser => \&InitEsetsParser,
ProcessOutput => \&ProcessEsetsOutput,
SupportScanning => $S_SUPPORTED,
SupportDisinfect => $S_SUPPORTED,
},
);
# Initialise the Sophos SAVI library if we are using it.
@ -279,7 +290,6 @@ sub InitialiseClam {
# unless MailScanner::Config::IsSimpleValue('allowpasszips');
}
sub InitialiseSAVI {
# Initialise Sophos SAVI library
MailScanner::Log::DieLog("SAVI Perl module not found, did you install it?")
@ -431,8 +441,6 @@ sub ClamUpgraded {
return 0;
}
# Constructor.
sub new {
my $type = shift;
@ -1130,6 +1138,11 @@ sub InitAvastParser {
;
}
# Initialise any state variables the esets output parser uses
sub InitEsetsParser {
;
}
# These functions must be called with, in order:
# * The line of output from the scanner
# * The MessageBatch object the reports are written to
@ -1753,6 +1766,32 @@ sub ProcessAvastOutput {
}
sub ProcessEsetsOutput {
use File::Basename;
my($line, $infections, $types, $BaseDir, $Name) = @_;
my($logout, $keyword, $virusname, $filename, $path);
my($id, $part, @rest, $report);
chomp $line;
# informational [OK]
return 0 if $line =~ m/\[OK\]/i;
# password protected
return 0 if $line =~ m/password protected/i;
$logout = $line;
($path, $virusname) = split(/\s/, $line, 2);
$filename = basename($path);
MailScanner::Log::InfoLog("Avast::INFECTED::$virusname");
$report = $Name . ': ' if $Name;
$infections->{"$filename"}{""} .= "$report $filename was infected by $virusname\n";
$types->{"$filename"}{""} .= "v"; # it's a real virus
return 1;
}
# Generate a list of all the virus scanners that are installed. It may
# include extras that are not installed in the case where there are
# scanners whose name includes a version number and we could not tell

View file

@ -58,6 +58,10 @@ if id -u mail >/dev/null 2>&1; then
usermod -a -G mtagroup mail >/dev/null 2>&1
fi
if id -u avast >/dev/null 2>&1; then
usermod -a -G mtagroup avast >/dev/null 2>&1
fi
if [ ! -d '/var/spool/MailScanner/archive' ]; then
mkdir -p /var/spool/MailScanner/archive
fi

View file

@ -232,6 +232,7 @@ bitdefender-wrapper
bitdefender-autoupdate
clamav-autoupdate
clamav-wrapper
esets-wrapper
f-secure-wrapper
f-secure-autoupdate
generic-autoupdate
@ -359,6 +360,10 @@ if id -u mail >/dev/null 2>&1; then
usermod -a -G mtagroup mail >/dev/null 2>&1
fi
if id -u avast >/dev/null 2>&1; then
usermod -a -G mtagroup avast >/dev/null 2>&1
fi
if [ ! -d '/var/spool/MailScanner/archive' ]; then
mkdir -p /var/spool/MailScanner/archive
fi
@ -569,6 +574,7 @@ exit 0
%attr(755,root,root) /usr/lib/MailScanner/wrapper/bitdefender-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/clamav-autoupdate
%attr(755,root,root) /usr/lib/MailScanner/wrapper/clamav-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/esets-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/f-secure-autoupdate
%attr(755,root,root) /usr/lib/MailScanner/wrapper/f-secure-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/generic-autoupdate

View file

@ -232,6 +232,7 @@ bitdefender-wrapper
bitdefender-autoupdate
clamav-autoupdate
clamav-wrapper
esets-wrapper
f-secure-wrapper
f-secure-autoupdate
generic-autoupdate
@ -372,6 +373,10 @@ if id -u mail >/dev/null 2>&1; then
usermod -a -G mtagroup mail >/dev/null 2>&1
fi
if id -u avast >/dev/null 2>&1; then
usermod -a -G mtagroup avast >/dev/null 2>&1
fi
if [ ! -d '/var/spool/MailScanner/archive' ]; then
mkdir -p /var/spool/MailScanner/archive
fi
@ -584,6 +589,7 @@ exit 0
%attr(755,root,root) /usr/lib/MailScanner/wrapper/bitdefender-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/clamav-autoupdate
%attr(755,root,root) /usr/lib/MailScanner/wrapper/clamav-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/esets-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/f-secure-autoupdate
%attr(755,root,root) /usr/lib/MailScanner/wrapper/f-secure-wrapper
%attr(755,root,root) /usr/lib/MailScanner/wrapper/generic-autoupdate