From bf7c66366220b16678a8498c493f0e00d8511922 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 19 Nov 2012 00:30:36 -0500 Subject: [PATCH] clamdscan: replace immunity check with naught test immunity check was disabled by default, as it wasn't a good policy. OTOH, a naughty check is a sensible default, as we can skip processing on messages we already decided to reject. --- plugins/virus/clamdscan | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/virus/clamdscan b/plugins/virus/clamdscan index 72e64ea..ab35ab0 100644 --- a/plugins/virus/clamdscan +++ b/plugins/virus/clamdscan @@ -140,7 +140,10 @@ sub data_post_handler { my $filename = $self->get_filename( $transaction ) or return DECLINED; - #return (DECLINED) if $self->is_immune(); + if ( $self->connection->notes('naughty') ) { + $self->log( LOGINFO, "skip, naughty" ); + return (DECLINED); + }; return (DECLINED) if $self->is_too_big( $transaction ); return (DECLINED) if $self->is_not_multipart( $transaction );