Skip Menu |

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

Report information
The Basics
Id: 1600
Status: resolved
Worked: 51 min
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Requestors: rlh [...] lonws54.lsil.com
Cc:
AdminCc:

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



Date: Thu, 3 Oct 2002 14:44:59 +0100 (BST)
From: Richard Hellier <rlh [...] lonws54.lsil.com>
To: bug-Mail-IMAPClient [...] rt.cpan.org
Subject: Possible bug in Mail::IMAPClient (vsn 2.2.4)
David, First of all thanks for putting together this module -- it has made a number of tedious tasks pretty straightforward. OK, I believe there is a bug in the way "Message-Id:" headers are handled (and possibly others but I'm interested in M/I). The behaviour I get is that on messages whose header is spelt: Message-Id: then calling: my $env = $imap->get_envelope($msg); my $msg_id = $env->messageid(); gives what I expect. However, on messages whose M/I header is spelt: Message-ID: I end up with NIL as the value of $msg_id. This spelling is emitted by Outlook Express and is valid, I think, judging by the wording in section 3.4.7 of RFC 822. My environment is: Sun Sparc + Solaris 8 Perl version 5.6.0 Mail::IMAPClient version 2.2.4 I hope I've given you enough info to see what is happening. Thanks again, Richard.
Hi, Richard. Thank you for the bug report. I can't find any debug output in this ticket, so I won't be able to give you a definite answer. However, I can tell give you a procedure that will tell you if there is a bug in the client or in the server. (That's assuming that "Message-ID" is an rfc822-compliant spelling. I'll probably check on that later, but for now it's not relevent.) The description of your problem sounds like it may actually be coming from the server. To find out, you should create a special folder, then drag one of the messages with the "Message-ID:" style header into that folder--or do the equivalent in perl with Mail::IMAPClient ;-) Then you can either run a script in debug mode mode, i.e. $imap=Mail::IMAPClient->new( Debug=>1 ,...); and attach the output to this ticket, or log in by hand and fetch the envelope as follows: 0 login userid password 1 select bugFolder 2 fetch 1 envelope 3 logout You should see the message id embedded in the output from FETCH ENVELOPE, which will consist mostly of parentheses and NIL's with the occasional datum thrown in here and there. Meanwhile I will eye-ball the code on Friday. If you need to work around this problem, you may want to read the documentation for the parse_headers method. The method returns a data structure that is a little clumsy, but it runs in my mind I specifically worked around a similar issue when I wrote this method. (The parse_headers method does not rely on FETCH ENVELOPE to obtain the header fields; it uses an alternate FETCH construction.) HTH, Dave Kernen Dave K.