Subject: | Bug in smtp pipelining |
i have ran into this problem using latest , 0.08 version, built from cpan, on centos (rhel rebuild) 3.0.
rpm -qi perl-Net-Server-Mail
Name : perl-Net-Server-Mail Relocations: /usr
Version : 0.08 Vendor: Olivier Poitrey <rs-pause@rhapsodyk.net>
Release : 1 Build Date: Sat 11 Dec 2004 01:40:26 AM IST
Install Date: Sat 11 Dec 2004 01:41:52 AM IST Build Host: minint-p8fj8m
Group : Applications/CPAN Source RPM: perl-Net-Server-Mail-0.08-1.src.rpm
Size : 65057 License: Artistic
Signature : (none)
Packager : Arix International <cpan2rpm@arix.com>
perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
uname -a
Linux l2.incredimail.com 2.4.21-20.EL.c0smp #1 SMP Thu Sep 9 01:53:25 EDT 2004 i686 i686 i386 GNU/Linux
--------------
problem description
the problem is in pipelining - QUIT command following the data block immediatelly is not accepted, althought by the rfc it can be in the end of a block (http://rfc1854.x42.com/).
running a simple server with this code :
my $esmtp = new Net::Server::Mail::ESMTP error_sleep_time => 5, idle_timeout => 120;
# activate some extensions
$esmtp->register('Net::Server::Mail::ESMTP::8BITMIME');
$esmtp->register('Net::Server::Mail::ESMTP::PIPELINING');
# adding some handlers
$esmtp->set_callback(RCPT => \&validate_recipient);
$esmtp->set_callback(DATA => \&queue_message);
$esmtp->set_callback(RSET => \&restart_session);
$esmtp->process;
the data fed was
ehlo alex
Show quoted text
-------------pause--------------
mail from:<alex@test.com>
rcpt to:<incredimail@bounces.incredimail.com>
data
-------------pause--------------
sdfsdfsdf
sdfsdfsdf
.
quit
-------------pause--------------
the session transcript is
telnet localhost 26
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 l2.incredimail.com ESMTP Net::Server::Mail (Perl) Service ready
ehlo alex
250-l2.incredimail.com Service ready
250-8BITMIME
250 PIPELINING
mail from:<alex@test.com>
rcpt to:<incredimail@bounces.incredimail.com>
data
250 sender <alex@test.com> OK
250 recipient <incredimail@bounces.incredimail.com> OK
354 Start mail input; end with <CRLF>.<CRLF>
sdfsdfsdf
sdfsdfsdf
.
quit
453 Command received prior to completion of previous command sequence
the last quit should be accepted successfully. i have disabled pipelining extension and now the server works fine, but there were problems recieveing mail from alot of server till then.