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.
This commit is contained in:
Matt Simerson 2012-11-19 00:30:36 -05:00
parent 1081461d36
commit bf7c663662

View File

@ -140,7 +140,10 @@ sub data_post_handler {
my $filename = $self->get_filename( $transaction ) or return DECLINED; 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_too_big( $transaction );
return (DECLINED) if $self->is_not_multipart( $transaction ); return (DECLINED) if $self->is_not_multipart( $transaction );