Subject: Developers of Sympa
List archive
- From: Luca Maranzano <address@concealed>
- To: address@concealed
- Cc: address@concealed
- Subject: Patch for Sophos antivirus support
- Date: Wed, 16 Jan 2002 14:09:26 +0100
Hello,
I've patched src/tools.pl to add the support for the Sophos antivirus
(http://www.sophos.com/). The patch is quite simple, and has been
written for Sympa 3.2.1, but IMHO you can manually apply it to the latest
tools.pl (add it after the last elsif in the virus_infected() function).
To use it in sympa.conf put the following:
antivirus_path /usr/local/bin/sweep
antivirus_args -nc -nb -ss -archive
Kind regards,
Luca
=====[snip snip]==================================================
## Sophos Antivirus... by address@concealed
elsif ("${Conf{'antivirus_path'}}" =~ /\/sweep$/) {
# impossible to look for viruses with no option set
return 0 unless ($Conf{'antivirus_args'});
#do_log('err',"Running: $Conf{'antivirus_path'}
$Conf{'antivirus_args'} $work_dir |") ;
open (ANTIVIR,"$Conf{'antivirus_path'} $Conf{'antivirus_args'}
$work_dir |") ;
#do_log('err', "Ok, entering virus_infected(), sweep part...
($work_dir) --liuk");
while (<ANTIVIR>) {
if (/Virus\s+(.*)/) {
$virusfound = $1;
}
}
close ANTIVIR;
my $status = $?/256 ;
## sweep status =3 (*256) => virus
if (( $status == 3) and not($virusfound)) {
$virusfound = "unknown";
}
}
- Patch for Sophos antivirus support, Luca Maranzano, 01/16/2002
Archive powered by MHonArc 2.6.19+.