Package: libnet-server-mail-perl Version: 0.13-1 Severity: normal Tags: patch
The function data_part of Net::Server::Mail::SMTP is called for each chunk of 4096 bytes. If a mail contains 4093 bytes, the sequence \r\n.\r\n is splitted in two pieces so end-of-data detection failed and the process continue to wait data. Many other problems are solved with the patch bellow. I'va tried to contact package maintenr, but nothing appends (see http://rt.cpan.org/Public/Bug/Display.html?id=24038). Here is the proposed patch: --- Net/Server/Mail/SMTP.pm 2005-09-01 11:10:18.000000000 +0200 +++ SMTP.pm 2006-12-29 17:37:01.000000000 +0100 @@ -560,6 +560,7 @@ return; } + $self->{_last_chunk} = ''; $self->make_event ( name => 'DATA-INIT', @@ -575,7 +576,7 @@ my($self, $data) = @_; # search for end of data indicator - if($data =~ /^\.\r?\n/m) + if("$self->{last_chunk}$data" =~ /^\.\r*\n/m ) { my $more_data = $'; if(length $more_data) @@ -590,13 +591,14 @@ } # RFC 821 compliance. - ($data = $`) =~ s/^\.//mg; + #($data = $`) =~ s/^\.//mg; + $data =~ s/^\.\r*\n$//m; $self->{_data} .= $data; return $self->data_finished($more_data); } # RFC 821 compliance. - $data =~ s/^\.//mg; + #$data =~ s/^\.//mg; $self->make_event ( name => 'DATA-PART', @@ -610,6 +612,7 @@ success_reply => '', # don't send any reply ! ); + $self->{last_chunk} = '_'.substr $data, -5; return; } -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-3-amd64 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages libnet-server-mail-perl depends on: ii perl 5.8.8-7 Larry Wall's Practical Extraction libnet-server-mail-perl recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]