Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 42136
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: alex [...] thouky.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.086
Fixed in: (no value)



Subject: Mail::Box::IMAP4 requires authentication method to be specified
The following code snippet (with appropriate login credentials specified): use Mail::Box::IMAP4; my $folder= new Mail::Box::IMAP4(server_name => 'localhost', username => 'USER', password => 'PASS', folder => 'Inbox'); print $folder->nrMessages, " messages\n"; results in the following errors repeated periodically: Use of uninitialized value $auth in string ne at /usr/lib/perl5/site_perl/5.10.0/Mail/IMAPClient.pm line 330. Use of uninitialized value $scheme in concatenation (.) or string at /usr/lib/perl5/site_perl/5.10.0/Mail/IMAPClient.pm line 2506. I haven't traced how the authentication settings are supposed to be passed through all of the intervening modules, but adding the following to the "new Mail::Box::IMAP4(...)" arguments results in this code snippet working as expected: authenticate => 'LOGIN' There doesn't appear to be anything in the documentation suggesting that this should be necessary, so presumably it is a bug. This is with the following package versions: Mail-Box-2.086 Mail-IMAPClient-3.12 Perl version: 5.10.0 Operating system: SuSE Linux 9.0 kernel 2.4.21-303
Subject: Re: [rt.cpan.org #42136] Mail::Box::IMAP4 requires authentication method to be specified
Date: Sun, 4 Jan 2009 20:45:39 +0100
To: Alexander Thoukydides via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Alexander Thoukydides via RT (bug-Mail-Box@rt.cpan.org) [090104 18:10]: Show quoted text
> Sun Jan 04 13:10:01 2009: Request 42136 was acted upon. > Transaction: Ticket created by thouky > Queue: Mail-Box > Subject: Mail::Box::IMAP4 requires authentication method to be specified
The Mail::Box::IMAP4 has never been completed, although it has quite some users. Please help me by providing patches. In this case, the list of authentication methods that is attempted by MailBox is shorter than what is offered by Mail::IMAPClient. LOGIN is not attempted by default. I have extended the search list now. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
fixed in 2.087
On Tue Feb 03 06:45:47 2009, MARKOV wrote: Show quoted text
> fixed in 2.087
Unfortunately this release just moves the problem. The same test program (with appropriate login credentials substituted): use Mail::Box::IMAP4; my $folder= new Mail::Box::IMAP4(server_name => 'localhost', username => 'USER', password => 'PASS', folder => 'Inbox'); print $folder->nrMessages, " messages\n"; results in the following message repeated periodically: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.10.0/Mail/IMAPClient.pm line 2574. The warning is because $client->Proxy is undef. The authenticate() function is being reached because $client->Authmechanism is set to 'PLAIN'. Once again adding "authenticate => 'LOGIN'" to the "new Mail::Box::IMAP4(...)" arguments results in the code snippet working as expected. It isn't unreasonable for the various possible authentication algorithms to be tried in sequence when not explicitly specified, but I would expect them to fail silently and for the correct one to eventually succeed. This is with the following package versions: Mail-Box-2.087 Mail-IMAPClient-3.13 Perl version: 5.10.0 Operating system: SuSE Linux 9.0 kernel 2.4.21-303
Example does not match the code (anymore)