[tpop3d-discuss]Corrupted TOP response with PIPELINING and tpop3d 1.5.3

Martin Blapp mb at imp.ch
Thu, 3 Feb 2005 01:52:59 +0100 (CET)


> What I'm doing wrong in the perlscript ?

Ok, fixed the bug ... (missing ^ in regex). I still dunno why
my webmail application does not work yet.

The problem I see now is the speed, as suspected. Qpopper does need
10 seconds to send 1000 headers, while tpop3d needs 30 seconds. If
the webserver timeout is too low, we are running into a timeout.

I'll look if I can replace the send routines with the qpopper ones
which seem to be a lot faster.

Thanks Chris for the fast fix !
Martin

-------------------------------------------
use IO::Socket;
$num = 100;

$s = new IO::Socket::INET("localhost:110");
$s->print("user USER\r\n");
$s->getline();
$s->print("pass PASS\r\n");
$s->getline();
$s->print("LIST\r\n");
for ($i = 1; $i < 100; ++$i) {
        $j=1 + $i;
        $s->print("top $j 0\r\n");
}

for ($y=1; $y <= 100; $y++) {
        print "Prozessed $y\n";
        $usebreak = 0;
        while($usebreak == 0) {
                $_ = $s->getline();
                print $_;
                if ($_ =~ /^\.\r\n/ || $_ =~ /^+OK/) {
                        $usebreak = 1;
                }
        }
}

$s->print("quit\r\n");
print $s->getline();
-------------------------------------------