Date: | Thu, 9 Dec 2004 17:54:46 -0800 (PST) |
From: | Manpreet Singh <junkblocker [...] yahoo.com> |
Subject: | Server returning * OK response instead of a + response |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Around this code (Line numbers might be slightly off)
------------------------
1427 $self->_debug("Sending literal string "
.
1428 "in two parts: $p1\n\tthen: $p2\n");
1429 $self->_send_line($p1) or return undef;
1430 $output = $self->_read_line or return
undef;
1431 foreach my $o (@$output) {
1432 # $o is already an array ref:
1433 $self->_record($self->Count,$o);
1434 ($code) =
$o->[DATA] =~ /(^\+|NO|BAD)/i;
1435 if ($o->[DATA]
=~ /^\*\s+BYE/) {
1436 $self->State(Unconnected);
1437 close $fh;
1438 return undef ;
1439 } elsif (
$o->[DATA]=~ /^\d+\s+(NO|BAD)/i ) {
1440 close $fh;
1441 return undef;
1442 }
1443 }
1444 if ( $code ) { $string = $p2; }
1445 else { return undef ; }
1446 }
1447
1448 }
------------------------
I have to change line 1434 to
1434 ($code) =
$o->[DATA] =~ /(^\+|\*NO|BAD)/i;
to make it work. Otherwise I see something like this
with my server in debug log
Using Mail::IMAPClient version 2.2.9 and perl version
5.6.1 (5.006001)
Sending literal string in two parts: 1 Login "usernam"
{8}
then: Passw0rd
Sending: 1 Login "XXXXXXXX" {8}
Sent 23 bytes
Read: * OK [CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA
LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY LANGUAGE
XSENDER X-NETSCAPE XSERVERINFO AUTH=PLAIN] Messaging
Multiplexor (Sun Java(tm) System Messaging Server 6.1
Patch 0.02 (built Aug 25 2004))
Error sending '1 Login "usernam" {8}
Passw0rd
' to IMAP: at
/export/usernam/mail/imapfilter/mailfilter line 980
--------
...
Sometime later a select statement jumps in and I see
this
...
--------
Sending: 2 SELECT INBOX
Sent 16 bytes
Read: + go ahead
Read: 1 BAD Wrong number of arguments given
------------
The above change I made makes this all work properly.
I haven't tried to look at the IMAP protocol document
to see if it is the server behaving badly or if it is
a bug in Mail::IMAPClient implementation but thought I
better report this.
Thanks
Manpreet
Show quoted text
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250