Date: | Tue, 21 Sep 2004 17:06:44 -0400 |
To: | bug-Mail-IMAPClient [...] rt.cpan.org |
Subject: | message_string() fails on some messages (Exchange 2003 server) |
From: | "Paul Smith" <psmith [...] nortelnetworks.com> |
Hi;
I have Perl 5.8.4 with Mail::IMAPClient 2.2.9 on a Debian GNU/Linux
"sarge" box. I'm using it to connect to an Exchange 2003 IMAP server
that reports itself like this:
Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
Most of the time this works fine, but every now and then a message
appears in my inbox that causes message_string() to fail. The code
looks like this:
my $msg = $imap->message_string($uid)
or die "Could not get message $uid: $@\n";
And when it fails the an error output looks like like this:
Mail::IMAPClient=HASH(0x8160ba4)::message_string: expected 3627 bytes but received 3152 at /home/psmith/bin/imapfetch line 327
Could not get message 13002: Mail::IMAPClient=HASH(0x8160ba4)::message_string: expected 3627 bytes but received 3152
Once a message like this appears it will cause Mail::IMAPClient to fail
every time. I have to go access my IMAP mailbox with some other
tool, like fetchmail or the web interface or Mozilla mail or something,
and delete that message. Then Mail::IMAPClient is happy again.
Unfortunately I didn't save a copy of the broken email but this seems to
happen a few times a week so maybe I'll get another one.
I suppose I could check the error message and ignore this one, but
message_string() doesn't return the message either; can I not download
it if it's malformed like this?
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@nortelnetworks.com> HASMAT: HA Software Mthds & Tools
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.