Hi,

the HB EDV Virus scanner can also return "3" as its return value
(from /usr/bin/antivir --help: 

list of return codes:
   0: Normal program termination, nothing found, no error
   1: Found concerning file or boot sector
   2: A signature was found in memory
   3: Suspicious file found

). Currently this ends mimedefang with "Problem running virus scanner"
for some types of virus (and the mails piling up at the secondary
MXes). 

The attached patch checks for all return-codes between 1 and 10 (it
seems that HB adds new error codes starting from 1).

Please apply.

        Best regards
                Henning



--- mimedefang-2.54/mimedefang.pl.in~	2005-10-28 16:05:27.000000000 +0200
+++ mimedefang-2.54/mimedefang.pl.in	2005-11-13 14:09:07.000000000 +0100
@@ -3532,7 +3532,7 @@
     return ($code, 'ok', 'ok') if ($code == 0);
 
     # Virus or virus in memory
-    if ($code == 1 or $code == 2) {
+    if ($code > 0 and $code < 10) {
 	$VirusName = $1 if ($CurrentVirusScannerMessage =~ m/ALERT: \[(\S+)/ or
 			    $CurrentVirusScannerMessage =~ /!Virus! \S+ (\S+)/ or
 			    $CurrentVirusScannerMessage =~ m/VIRUS: file contains code of the virus '(\S+)'/);
@@ -3541,6 +3541,7 @@
     }
 
     # All other codes should not happen
+    md_syslog('err', "Unknown HBEDV Virus scanner return code: $code");
     return ($code, 'swerr', 'tempfail');
 }
 
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to