Date: | Tue, 04 Jan 2005 13:05:52 -0800 |
From: | John Helmuth <helmuthj [...] microdental.com> |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | possible Mail::IMAPClient bug? in separator function |
Mail::IMAPClient version: 2.2.9
Client OS: Win2k
Perl Version: (from perl -V)
Summary of my perl5 (revision 5 version 8 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
This is from an ActiveState Perl package.
IMAP Server: dovecot 0.99.10 running on Mandrake 9.2
Test script:
-------------------------------------------------------------------------------------------------------------
#!e:\perl\bin\perl.exe
use Mail::IMAPClient;
my $imap = Mail::IMAPClient->new(
Server => "mail.domain.com",
User => "test",
Password => "xxxx",
Uid => 1,
Debug => 1,
)
or die "Couldn't connect or login to server: $@";
$imap->select("INBOX")
or die "Couldn't select INBOX: $@";
print "imap->separator()=" . $imap->separator("INBOX") . "\n";
$imap->close
or die "Couldn't close INBOX: $@";
$imap->disconnect
or warn "Couldn't disconnect: $@\n";
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
Script output:
-------------------------------------------------------------------------------------------------------------
Using Mail::IMAPClient version 2.2.9 and perl version 5.8.0 (5.008)
Mail::IMAPClient not using Fast_IO; not available on this platform at
imaptest.p
l line 5
Read: * OK dovecot ready.
Connect: Received this from readline: 0/OUTPUT/* OK dovecot ready.
Sending literal string in two parts: 1 Login "test" {13}
then: xxxx
Sending: 1 Login "XXXXXXXXXXXXX" {13}
Sent 26 bytes
Read: + OK
Sending: xxxx
Sent 15 bytes
Read: 1 OK Logged in.
Sending: 2 SELECT INBOX
Sent 16 bytes
Read: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permit
ted.
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1101778388] UIDs valid
* OK [UIDNEXT 43] Predicted next UID
2 OK [READ-WRITE] Select completed.
Sending: 3 LIST "" INBOX
Sent 17 bytes
Read: * LIST (\UnMarked) "." "INBOX"
3 OK List completed.
imap->separator()=
Sending: 4 close
Sent 9 bytes
Read: 4 OK Close completed.
Sending: 5 LOGOUT
Sent 10 bytes
Read: * BYE Logging out
5 OK Logout completed.
-------------------------------------------------------------------------------------------------------------
Username and password obscured.
FIX?:
The following change to IMAPClient.pm seems to work in my situation:
339c339
< my $list =
(grep(/^\*\s+LIST\s+/,($self->list(undef,$target)||("NO")) ))[0] ||
---
Show quoted text
> my $list =
(grep(/^\*\s+LIST\s+/,($self->list(undef,$target),("NO")) ))[0] ||
Thanks for writing a great module!
John Helmuth
Microdental Laboratories
helmuthj@microdental.com