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,6 +58,16 @@ sub uvscan {
|
|||||||
return (DECLINED)
|
return (DECLINED)
|
||||||
if $transaction->body_size > 250_000;
|
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;
|
my $filename = $transaction->body_filename;
|
||||||
return (DECLINED) unless $filename;
|
return (DECLINED) unless $filename;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user