[Mimedefang] [PATCH] Cumulative ClamAV patch for MIMEDefang
David F. Skoll
dfs at roaringpenguin.com
Tue Feb 20 13:44:36 EST 2007
Hi,
Here's a patch that (I believe) includes everything that was posted
on the list. Please verify that this patch solves all the ClamAV
0.90 issues.
Regards,
David.
Index: mimedefang.pl.in
===================================================================
--- mimedefang.pl.in (.../tags/2.61) (revision 14103)
+++ mimedefang.pl.in (.../trunk) (revision 14103)
@@ -3669,7 +3669,7 @@
# Run clamscan
my($code, $category, $action) =
- run_virus_scanner($Features{'Virus:CLAMAV'} . " --mbox --stdout --disable-summary --infected $path 2>&1");
+ run_virus_scanner($Features{'Virus:CLAMAV'} . " --stdout --no-summary --infected $path 2>&1");
if ($action ne 'proceed') {
return (wantarray ? ($code, $category, $action) : $code);
}
@@ -3693,7 +3693,7 @@
# Run clamscan
my($code, $category, $action) =
- run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --mbox --stdout --disable-summary --infected ./Work 2>&1");
+ run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --stdout --no-summary --infected ./Work 2>&1");
if ($action ne 'proceed') {
return (wantarray ? ($code, $category, $action) : $code);
}
@@ -4506,14 +4506,14 @@
md_syslog('err', "$MsgID: Clamd returned error: $err_detail");
# If it's a zip module failure, try falling back on clamscan.
# This is despicable, but it might work
- if ($err_detail =~ /zip module failure/i &&
+ if ($err_detail =~ /(?:zip module failure|not supported data format)/i &&
$Features{'Virus:CLAMAV'}) {
my ($code, $category, $action) =
- run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --unzip --mbox --stdout --disable-summary --infected $CWD/Work 2>&1");
+ run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --unzip --unrar --stdout --no-summary --infected $CWD/Work 2>&1");
if ($action ne 'proceed') {
return (wantarray ? ($code, $category, $action) : $code);
}
- md_syslog('info', "$MsgID: Falling back on clamscan --unzip because of Zip module failure in clamd");
+ md_syslog('info', "$MsgID: Falling back on clamscan --unzip --unrar because of Zip module failure in clamd");
return (wantarray ? interpret_clamav_code($code) : $code);
}
return (wantarray ? (999, 'swerr', 'tempfail') : 1);
@@ -4603,14 +4603,14 @@
md_syslog('err', "$MsgID: Clamd returned error: $err_detail");
# If it's a zip module failure, try falling back on clamscan.
# This is despicable, but it might work
- if ($err_detail =~ /zip module failure/i &&
+ if ($err_detail =~ /(?:zip module failure|not supported data format)/i &&
$Features{'Virus:CLAMAV'}) {
my ($code, $category, $action) =
- run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --unzip --mbox --stdout --disable-summary --infected $CWD/Work 2>&1");
+ run_virus_scanner($Features{'Virus:CLAMAV'} . " -r --unzip --unrar --stdout --no-summary --infected $CWD/Work 2>&1");
if ($action ne 'proceed') {
return (wantarray ? ($code, $category, $action) : $code);
}
- md_syslog('info', "$MsgID: Falling back on clamscan --unzip because of Zip module failure in clamd");
+ md_syslog('info', "$MsgID: Falling back on clamscan --unzip --unrar because of Zip module failure in clamd");
return (wantarray ? interpret_clamav_code($code) : $code);
}
return (wantarray ? (999, 'swerr', 'tempfail') : 999);
More information about the MIMEDefang
mailing list