Explicitely ignore non-multipart messages for virus scanning
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@370 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
bb36c60b6a
commit
9da2fc7343
@ -58,9 +58,19 @@ sub uvscan {
|
||||
return (DECLINED)
|
||||
if $transaction->body_size > 250_000;
|
||||
|
||||
# Ignore non-multipart emails
|
||||
my $content_type = $transaction->header->get('Content-Type');
|
||||
$content_type =~ s/\s/ /g if defined $content_type;
|
||||
unless ( $content_type
|
||||
&& $content_type =~ m!\bmultipart/.*\bboundary="?([^"]+)!i )
|
||||
{
|
||||
$self->log( LOGERROR, "non-multipart mail - skipping" );
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
my $filename = $transaction->body_filename;
|
||||
return (DECLINED) unless $filename;
|
||||
|
||||
|
||||
# Now do the actual scanning!
|
||||
my @cmd =($self->{"_uvscan"}->{"uvscan_location"},
|
||||
'--mime', '--unzip', '--secure', '--noboot',
|
||||
|
Loading…
Reference in New Issue
Block a user