diff options
Diffstat (limited to 'mail/mimedefang/patches/patch-ac')
-rw-r--r-- | mail/mimedefang/patches/patch-ac | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/mail/mimedefang/patches/patch-ac b/mail/mimedefang/patches/patch-ac index 6afd4776489..702383384b8 100644 --- a/mail/mimedefang/patches/patch-ac +++ b/mail/mimedefang/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.4 2006/11/08 09:42:05 markd Exp $ +$NetBSD: patch-ac,v 1.5 2007/03/14 11:21:33 markd Exp $ ---- mimedefang.pl.in.orig 2006-11-08 03:47:07.000000000 +1300 +--- mimedefang.pl.in.orig 2007-01-19 03:43:12.000000000 +1300 +++ mimedefang.pl.in @@ -121,26 +121,26 @@ $VirusScannerRoutinesInitialized = 0; $SALocalTestsOnly = 1; @@ -46,3 +46,57 @@ $NetBSD: patch-ac,v 1.4 2006/11/08 09:42:05 markd Exp $ $Features{'Path:SENDMAIL'} = '@SENDMAILPROG@'; $Features{'Path:QUARANTINEDIR'} = '@QDIR@'; +@@ -3669,7 +3669,7 @@ sub entity_contains_virus_clamav ($) { + + # 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 @@ sub message_contains_virus_clamav () { + + # 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 @@ sub entity_contains_virus_clamd ($;$) { + 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 @@ sub message_contains_virus_clamd (;$) { + 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); |