openbsd-ports/mail/mimedefang/patches/patch-mimedefang_pl_in
ajacoutot 7212f555d6 Correctly log $VirusName with Avira.
ok okan@ (maintainer)
2012-06-21 05:57:43 +00:00

34 lines
1.6 KiB
Plaintext

$OpenBSD: patch-mimedefang_pl_in,v 1.2 2012/06/21 05:57:43 ajacoutot Exp $
Fix Avira/Antivir.
--- mimedefang.pl.in.orig Wed Dec 21 19:43:21 2011
+++ mimedefang.pl.in Wed Jun 20 17:26:26 2012
@@ -3472,7 +3472,7 @@ sub entity_contains_virus_hbedv ($) {
# Run antivir
my($code, $category, $action) =
- run_virus_scanner($Features{'Virus:HBEDV'} . " --allfiles -z -rs $path 2>&1", "!Virus!|>>>|VIRUS:|ALERT:");
+ run_virus_scanner($Features{'Virus:HBEDV'} . " --alert-action=none --scan-mode=all --scan-in-archive=yes --scan-in-mbox=yes --batch -s $path 2>&1", "!Virus!|>>>|VIRUS:|ALERT:");
if ($action ne 'proceed') {
return (wantarray ? ($code, $category, $action) : $code);
}
@@ -3497,7 +3497,7 @@ sub message_contains_virus_hbedv () {
# Run antivir
my($code, $category, $action) =
- run_virus_scanner($Features{'Virus:HBEDV'} . " --allfiles -z -rs ./Work 2>&1", "!Virus!|>>>|VIRUS:|ALERT:");
+ run_virus_scanner($Features{'Virus:HBEDV'} . " --alert-action=none --scan-mode=all --scan-in-archive=yes --scan-in-mbox=yes --batch -s ./Work 2>&1", "!Virus!|>>>|VIRUS:|ALERT:");
return (wantarray ? interpret_hbedv_code($code) : $code);
}
@@ -3511,7 +3511,7 @@ sub interpret_hbedv_code ($) {
# Virus or virus in memory
if ($code == 1 || $code == 2 || $code == 3) {
- $VirusName = $1 if ($CurrentVirusScannerMessage =~ m/ALERT: \[(\S+)/ or
+ $VirusName = $1 if ($CurrentVirusScannerMessage =~ m/ALERT: (\S+)/ or
$CurrentVirusScannerMessage =~ /!Virus! \S+ (\S+)/ or
$CurrentVirusScannerMessage =~ m/VIRUS: file contains code of the virus '(\S+)'/);
$VirusName = "unknown-HBEDV-virus" if $VirusName eq "";