1 |
--- qpsmtpd-0.40/plugins/virus/clamav.clamav_fix 2007-06-14 11:57:23.000000000 -0600 |
diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.40/plugins/virus/clamav mezzanine_patched_qpsmtpd-0.40/plugins/virus/clamav |
2 |
+++ qpsmtpd-0.40/plugins/virus/clamav 2007-06-14 13:55:41.000000000 -0600 |
--- qpsmtpd-0.40/plugins/virus/clamav 2007-06-14 11:57:23.000000000 -0600 |
3 |
|
+++ mezzanine_patched_qpsmtpd-0.40/plugins/virus/clamav 2007-06-14 17:46:23.000000000 -0600 |
4 |
@@ -139,6 +139,9 @@ |
@@ -139,6 +139,9 @@ |
5 |
elsif (/back_compat/) { |
elsif (/back_compat/) { |
6 |
$self->{_back_compat} = '-i --max-recursion=50'; |
$self->{_back_compat} = '-i --max-recursion=50'; |
27 |
return (DECLINED); |
return (DECLINED); |
28 |
} |
} |
29 |
if ($result == 1) { |
if ($result == 1) { |
30 |
@@ -213,8 +218,13 @@ |
@@ -215,6 +220,11 @@ |
|
return (DENY, "Virus Found: $output"); |
|
|
} |
|
31 |
} |
} |
|
+ else { |
|
|
+ $transaction->header->add( 'X-Virus-Checked', |
|
|
+ "Checked by ClamAV on " . $self->qp->config("me") ); |
|
|
+ } |
|
32 |
elsif ($result) { |
elsif ($result) { |
33 |
$self->log(LOGERROR, "ClamAV error: $cmd: $result\n"); |
$self->log(LOGERROR, "ClamAV error: $cmd: $result\n"); |
34 |
+ return (DENYSOFT) if (!$self->{_declined_on_fail}); |
+ return (DENYSOFT) if (!$self->{_declined_on_fail}); |
35 |
|
+ } |
36 |
|
+ else { |
37 |
|
+ $transaction->header->add( 'X-Virus-Checked', |
38 |
|
+ "Checked by ClamAV on " . $self->qp->config("me") ); |
39 |
} |
} |
40 |
return (DECLINED); |
return (DECLINED); |
41 |
} |
} |