Subject: | IMAPClient fails to disconnect/expunge |
Date: | Thu, 3 Sep 2009 12:15:28 -0400 |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
From: | Gary Baluha <gumby3203 [...] gmail.com> |
Environment:
IMAPClient version 3.20
perl v5.8.8
Mandriva Linux 2007.0 (2.6.17 kernel)
Problem:
When logging out of the imap server, IMAPClient appears to crash. Messages
flagged as "Deleted" fail to get expunged.
From the debugging output:
Connecting via IO::Socket::INET to <HOST>:143 Timeout 600
Connected to <HOST> errno(Operation now in progress)
Read: * OK V3000 IMAP4rev1 v10.210 server ready
Sending: 257 LOGIN "1003" 1003
Sent 23 bytes
Read: 257 OK LOGIN completed
Sending: 258 STATUS INBOX (MESSAGES)
Sent 29 bytes
Read: * STATUS INBOX (MESSAGES 1)
Read: 258 OK STATUS completed
. . .
Sending: 263 LOGOUT
Sent 12 bytes
Read: * BYE V3000 IMAP4rev1 server terminating connection
ERROR: * BYE V3000 IMAP4rev1 server terminating connection at
/usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1343
Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x804c09c)',
263, 'undef') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm
line 1277
Mail::IMAPClient::_imap_command_do('Mail::IMAPClient=HASH(0x804c09c)',
'LOGOUT') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line
1183
Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x804c09c)',
'LOGOUT') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line
1758
Mail::IMAPClient::logout('Mail::IMAPClient=HASH(0x804c09c)') called
at /etc/vopt/vmailretr.pl line 233
ERROR: * BYE V3000 IMAP4rev1 server terminating connection at
/usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line 1228
Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x804c09c)',
'LOGOUT') called at /usr/lib/perl5/site_perl/5.8.8/Mail/IMAPClient.pm line
1758
Mail::IMAPClient::logout('Mail::IMAPClient=HASH(0x804c09c)') called
at /etc/vopt/vmailretr.pl line 233
Associated perl code:
my $Vmail_IMAP = Mail::IMAPClient->new(Uid=>FALSE, Debug=>$debug,
Keepalive=>TRUE);
if ($debug) {
$Vmail_IMAP->Debug_fh(IO::File->new(">$debug_path"));
}
. . .
$Vmail_IMAP->User($IMAPUser);
$Vmail_IMAP->Password($currRow->{Pass});
if (!$Vmail_IMAP->connect()) { exit; }
$msgCount = $Vmail_IMAP->message_count(MBOX);
. . .
$Vmail_IMAP->expunge();
$Vmail_IMAP->logout();