/[smeserver]/rpms/qpsmtpd/sme9/0002-added-ClamAV-version-to-the-X-Virus-Checked-header.patch
ViewVC logotype

Annotation of /rpms/qpsmtpd/sme9/0002-added-ClamAV-version-to-the-X-Virus-Checked-header.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Feb 2 00:59:44 2013 UTC (11 years, 9 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_84-14_el6_sme, qpsmtpd-0_84-16_el6_sme, qpsmtpd-0_84-12_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-2_el6_sme, qpsmtpd-0_84-13_el6_sme, qpsmtpd-0_84-6_el6_sme, qpsmtpd-0_84-18_el6_sme, qpsmtpd-0_84-9_el6_sme, qpsmtpd-0_84-4_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_84-15_el6_sme, qpsmtpd-0_96-4_el6_sme, qpsmtpd-0_96-3_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_84-17_el6_sme, qpsmtpd-0_84-7_el6_sme, qpsmtpd-0_96-5_el6_sme, qpsmtpd-0_84-10_el6_sme, qpsmtpd-0_84-8_el6_sme, qpsmtpd-0_96-1_el6_sme, qpsmtpd-0_84-5_el6_sme, qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_84-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
* Fri Feb 1 2013 Shad L. Lords <slords@mail.com> 0.84-4.sme
- Update spec so building on rhel6 works [SME: 7263]

1 slords 1.1 From 68ecedd1ac05ce6f26d6292b1a859020f5b6c62d Mon Sep 17 00:00:00 2001
2     From: Matt Simerson <matt@tnpi.net>
3     Date: Sun, 2 May 2010 01:48:05 -0400
4     Subject: added ClamAV version to the X-Virus-Checked header
5    
6     Signed-off-by: Robert <rspier@pobox.com>
7     ---
8     plugins/virus/clamdscan | 8 ++++++--
9     1 files changed, 6 insertions(+), 2 deletions(-)
10    
11     diff --git a/plugins/virus/clamdscan b/plugins/virus/clamdscan
12     index a7884e7..cf6c2a2 100644
13     --- a/plugins/virus/clamdscan
14     +++ b/plugins/virus/clamdscan
15     @@ -1,5 +1,4 @@
16     #!/usr/bin/perl -w
17     -# $Id$
18    
19     =head1 NAME
20    
21     @@ -111,6 +110,7 @@ use warnings;
22     sub register {
23     my ( $self, $qp, @args ) = @_;
24    
25     + $self->log(LOGERROR, "Bad parameters for the clamdscan plugin") if @_ % 2;
26     %{ $self->{"_clamd"} } = @args;
27    
28     # Set some sensible defaults
29     @@ -198,6 +198,9 @@ sub hook_data_post {
30     return DECLINED;
31     }
32    
33     + my @clamd_version = split(/\//, $clamd->version);
34     + $self->{"_clamd"}->{'version'} = $clamd_version[0] || 'ClamAV';
35     +
36     my ( $path, $found ) = eval { $clamd->scan_path( $filename ) };
37     if ($@) {
38     $self->log( LOGERROR, "Error scanning mail: $@" );
39     @@ -218,11 +221,12 @@ sub hook_data_post {
40     }
41     }
42     else {
43     + $transaction->header->add( 'X-Virus-Found', 'No' );
44     $self->log( LOGINFO, "ClamAV scan reports clean");
45     }
46    
47     $transaction->header->add( 'X-Virus-Checked',
48     - "Checked by ClamAV on " . $self->qp->config("me") );
49     + "Checked by $self->{'_clamd'}->{'version'} on " . $self->qp->config("me") );
50    
51     return (DECLINED);
52     }
53     --
54     1.7.2.2
55    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed