Skip Menu |

This queue is for tickets about the IMAP-Client CPAN distribution.

Report information
The Basics
Id: 23210
Status: open
Priority: 0/
Queue: IMAP-Client

People
Owner: conteb [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: $self->{server} trashed although connection succeeded
Trying out IMAP::Client for the first time... In the debugger I can see that the conncetion succeeds but when we reach line 1082 in Client.pm, $server has lost its value for some reason. Maybe a later connection method did NOT succeed? Anyway, I changed line 1082 from $self->{'server'} = $server; to $self->{'server'} ||= $server; and am now happily seeing a successful login. Does this help somehow?
The default connection algorithms are SSL and TLS. Unsecure plaintext access is not enabled by default, and must be manually enabled. What you are probably seeing is the TLS connection attempt, which starts with successfull plaintext connection, but then a failed TLS negotiation (because the server does not support STARTTLS), thus the connection is still 'failed', thus $server is discarded. If you want to enable plaintext connections in addition to the current list, the connect with something like this: $imap->connect(PeerAddr => $server, ConnectMethod => 'SSL STARTTLS PLAIN', ) That will resort to plaintext connections if all else fails.
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #23210] $self->{server} trashed although connection succeeded
Date: Wed, 15 Nov 2006 22:30:38 +0100
To: bug-IMAP-Client [...] rt.cpan.org
From: andreas.koenig.gmwojprw [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Wed, 15 Nov 2006 09:17:04 -0500, " via RT" <bug-IMAP-Client@rt.cpan.org> said:
Show quoted text
Show quoted text
> The default connection algorithms are SSL and TLS. Unsecure plaintext > access is not enabled by default, and must be manually enabled. What > you are probably seeing is the TLS connection attempt, which starts with > successfull plaintext connection, but then a failed TLS negotiation > (because the server does not support STARTTLS), thus the connection is > still 'failed', thus $server is discarded.
Show quoted text
> If you want to enable plaintext connections in addition to the current > list, the connect with something like this: > $imap->connect(PeerAddr => $server, > ConnectMethod => 'SSL STARTTLS PLAIN', > )
Show quoted text
> That will resort to plaintext connections if all else fails.
Sorry, no, please give me a chance to demonstrate the problem I'm seeing before rejecting. I do not have my own code at hand right now but I remember it was succeeding on SSL and failing either on STARTTLS or PLAIN. If this happens, the the code forgets that it suceeded on SSL and trashes the $server variable and thus the $self->{server} attribute. I can provide more evidence tomorrow if you're interested??? -- andreas