Skip Menu |

This queue is for tickets about the Net-SSLGlue CPAN distribution.

Report information
The Basics
Id: 87507
Status: resolved
Priority: 0/
Queue: Net-SSLGlue

People
Owner: Steffen_Ullrich [...] genua.de
Requestors: MICHIELB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.03
Fixed in: (no value)



Subject: get() does not work in POP3 module
Hi Steffen, I tried the module, and it works; I wrote a blog post about it. http://blogs.perl.org/users/mike_b/2013/05/pop3-with-tls-in-perl.html But I only tried logging in and I did not try 'REALLY' using it... until now. I found out that if I use an SSL or TLS connection using your module, I can do stuff like capa() and list() without problems, but if I do get() the code 'hangs' until timeout and gives back an empty result. If I use getfh() I can read all lines from the file handle until the last, where it again 'hangs' until the timeout. I'm not sure what causes this; could it have anything to do with this remark I found in Net::POP3 code? # We dont support sasl mechanisms that encrypt the socket traffic. # todo that we would really need to change the ISA hierarchy # so we dont inherit from IO::Socket, but instead hold it in an attribute (ref: https://github.com/gbarr/perl-libnet/blob/master/Net/POP3.pm#L487) -- Mike
And also, see this RT conversation: https://rt.cpan.org/Public/Bug/Display.html?id=40478
Show quoted text
> But I only tried logging in and I did not try 'REALLY' using it... > until now. I found out that if I use an SSL or TLS connection using > your module, I can do stuff like capa() and list() without problems, > but if I do get() the code 'hangs' until timeout and gives back an > empty result.
I can't reproduce your problem. The following works flawlessly for me: use strict; use warnings; use Net::SSLGlue::POP3; my $user = "..."; my $pass = "..."; my $pop = Net::POP3->new('pop.gmx.net', Debug => 1) or die "failed to connect: $!"; $pop->starttls( SSL_verify_mode => 0 ) or die "no TLS support?"; $pop->login($user,$pass) or die "login failed"; my $msgnum = $pop->list; for ( keys %$msgnum) { my $msg = $pop->get($_); print @$msg; }
Subject: Re: [rt.cpan.org #87507] get() does not work in POP3 module
Date: Thu, 1 Aug 2013 18:28:14 +0200
To: bug-Net-SSLGlue [...] rt.cpan.org
From: Michiel Beijen <michiel.beijen [...] gmail.com>
On Thu, Aug 1, 2013 at 4:09 PM, Steffen Ullrich via RT <bug-Net-SSLGlue@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87507 > > > I can't reproduce your problem. > The following works flawlessly for me: > > use strict; > use warnings; > use Net::SSLGlue::POP3; > > my $user = "..."; > my $pass = "..."; > my $pop = Net::POP3->new('pop.gmx.net', Debug => 1) > or die "failed to connect: $!"; > $pop->starttls( SSL_verify_mode => 0 ) or die "no TLS support?"; > $pop->login($user,$pass) or die "login failed"; > my $msgnum = $pop->list; > for ( keys %$msgnum) { > my $msg = $pop->get($_); > print @$msg; > } >
If I run your code, using a different mailhost; it just 'stops' after ''message follows' and times out. I tried to run @aol.com using STLS and also using the SSL => 1 in the constructor on a mail host that did POP3 over SSL. I tried using perl 5.14.1 on Debian, and also using perl 5.18.0. Net::POP3>>> Net::POP3(2.29) Net::POP3>>> Net::Cmd(2.29) Net::POP3>>> Exporter(5.64_03) Net::POP3>>> IO::Socket::INET(1.31) Net::POP3>>> IO::Socket(1.32) Net::POP3>>> IO::Handle(1.31) Net::POP3=GLOB(0x8d5debc)<<< +OK POP3 ready Net::POP3=GLOB(0x8d5debc)>>> STLS Net::POP3=GLOB(0x8d5debc)<<< +OK Net::POP3::_SSLified=GLOB(0x8d5debc)>>> USER otrsmichiel@aol.com Net::POP3::_SSLified=GLOB(0x8d5debc)<<< +OK Net::POP3::_SSLified=GLOB(0x8d5debc)>>> PASS .... Net::POP3::_SSLified=GLOB(0x8d5debc)<<< +OK server ready Net::POP3::_SSLified=GLOB(0x8d5debc)>>> STAT Net::POP3::_SSLified=GLOB(0x8d5debc)<<< +OK 3 14340 Net::POP3::_SSLified=GLOB(0x8d5debc)>>> LIST Net::POP3::_SSLified=GLOB(0x8d5debc)<<< +OK 3 messages Net::POP3::_SSLified=GLOB(0x8d5debc)>>> RETR 1 Net::POP3::_SSLified=GLOB(0x8d5debc)<<< +OK message follows
Subject: Re: [rt.cpan.org #87507] get() does not work in POP3 module
Date: Thu, 1 Aug 2013 22:49:54 +0200
To: bug-Net-SSLGlue [...] rt.cpan.org
From: Michiel Beijen <michiel.beijen [...] gmail.com>
This is really very strange. I signed up for a gmx account, and that actually works, both using SSL and using TLS. I'm really not very sure why AOL and my other mail account don't work using Net::SSLGlue::POP3. using the same credentials with Mail::POP3Client works fine, but of course that does not do certificate checking. -- Mike
Am Do 01. Aug 2013, 16:50:28, michiel.beijen@gmail.com schrieb: Show quoted text
> This is really very strange. I signed up for a gmx account, and that > actually works, both using SSL and using TLS. I'm really not very sure > why AOL and my other mail account don't work using Net::SSLGlue::POP3. > using the same credentials with Mail::POP3Client works fine, but of > course that does not do certificate checking.
After signining up for an aol.com account I could reproduce the problem. It looks like the problem is Net::Cmd::getline, which assumes, that on read problems waiting for a read-event with select is enough. This is true for IO::Socket, but not for SSL, where a renegotiation might happen anytime and so it might need to wait for a writable socket before it can read more data. Fixed in 1.04 - I've just replaced Net::Cmd::getline with IO::Socket::SSL::getline once the socket is sslified. Show quoted text
> -- > Mike