diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.32/plugins/virus/clamav mezzanine_patched_qpsmtpd-0.32/plugins/virus/clamav --- qpsmtpd-0.32/plugins/virus/clamav 2007-04-09 11:25:42.000000000 -0600 +++ mezzanine_patched_qpsmtpd-0.32/plugins/virus/clamav 2007-04-09 11:25:09.000000000 -0600 @@ -129,6 +129,9 @@ elsif (/back_compat/) { $self->{_back_compat} = '-i --max-recursion=50'; } + elsif (/declined_on_fail/) { + $self->{_declined_on_fail} = 1; + } else { $self->log(LOGERROR, "Unrecognized argument '$_' to clamav plugin"); return undef; @@ -138,6 +141,7 @@ $self->{_max_size} ||= 512 * 1024; $self->{_spool_dir} ||= $self->spool_dir(); $self->{_back_compat} ||= ''; # make sure something is set + $self->{_declined_on_fail} ||= 0; # decline the message on clamdscan failure unless ($self->{_spool_dir}) { $self->log(LOGERROR, "No spool dir configuration found"); @@ -189,6 +193,7 @@ if ($signal) { $self->log(LOGINFO, "clamscan exited with signal: $signal"); + return (DENYSOFT) if (!$self->{_declined_on_fail}); return (DECLINED); } if ($result == 1) { @@ -202,6 +207,7 @@ } elsif ($result) { $self->log(LOGERROR, "ClamAV error: $cmd: $result\n"); + return (DENYSOFT) if (!$self->{_declined_on_fail}); } else { $transaction->header->add( 'X-Virus-Checked',