$OpenBSD: patch-mimedefang_pl_in,v 1.4 2014/07/08 15:55:43 ajacoutot Exp $

Fix Avira/Antivir.

--- mimedefang.pl.in.orig	Wed May 21 15:50:26 2014
+++ mimedefang.pl.in	Tue Jul  8 17:51:19 2014
@@ -3498,7 +3498,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);
     }
@@ -3523,7 +3523,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);
 }
 
@@ -3537,7 +3537,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 "";
