$OpenBSD: patch-mimedefang_pl_in,v 1.3 2013/06/13 07:27:49 ajacoutot Exp $

Fix Avira/Antivir.

--- mimedefang.pl.in.orig	Sat May 25 17:30:50 2013
+++ mimedefang.pl.in	Thu Jun 13 09:24:32 2013
@@ -3497,7 +3497,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);
     }
@@ -3522,7 +3522,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);
 }
 
@@ -3536,7 +3536,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 "";
