Bug#405530: libnet-server-mail-perl: Bad end-of-data detection

2007-04-07 Thread Xavier Guimard
Hello,

I'm now maintener of Net::Server::Mail and bug is closed at revision 0.14.

Regards,
Xavier


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#405530: libnet-server-mail-perl: Bad end-of-data detection

2007-01-08 Thread Xavier Guimard
[EMAIL PROTECTED] wrote :
 
 I've written upstream to see if he'll let me apply patches and make a 
 0.14 CPAN release.  Given we can't get anything uploaded into Debian at 
 the moment anyway (frozen for etch), I'd like to attempt integrating 
 this upstream first if at all possible.
 

Hello,

I've cleaned my proposed patch (in attachment).

Thanks,
Xavier
diff -aburN libnet-server-mail-perl-0.13/lib/Net/Server/Mail/SMTP.pm 
libnet-server-mail-perl-0.13-1/lib/Net/Server/Mail/SMTP.pm
--- libnet-server-mail-perl-0.13/lib/Net/Server/Mail/SMTP.pm2005-09-01 
11:10:18.0 +0200
+++ libnet-server-mail-perl-0.13-1/lib/Net/Server/Mail/SMTP.pm  2007-01-08 
21:33:27.0 +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,13 @@
 }
 
 # RFC 821 compliance.
-($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/^\.\r*\n$//m;
 $self-make_event
   (
name = 'DATA-PART',
@@ -610,6 +611,7 @@
success_reply = '', # don't send any reply !
   );
 
+$self-{last_chunk} = '_'.substr $data, -5;
 return;
 }
 


Bug#405530: libnet-server-mail-perl: Bad end-of-data detection

2007-01-04 Thread Xavier
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.0 +0200
+++ SMTP.pm 2006-12-29 17:37:01.0 +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-7Larry 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]



Bug#405530: libnet-server-mail-perl: Bad end-of-data detection

2007-01-04 Thread ivan-debian
On Thu, Jan 04, 2007 at 11:08:33AM +0100, Xavier wrote:
 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).

I've written upstream to see if he'll let me apply patches and make a 
0.14 CPAN release.  Given we can't get anything uploaded into Debian at 
the moment anyway (frozen for etch), I'd like to attempt integrating 
this upstream first if at all possible.

-- 
_ivan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]