Chip Mefford writes:
Interesting. I can repro on a failed uid fetch. The complaint these folks have is that the leading and trailing spaces around the UID inside the parens are invalid. I haven't been able to determine if this is the case. Now, as to why this message fails to fetch, I've no idea. The message looks fine, but it does have an oddball flag ($NotJunk) and it's the only message in INBOX that has that flag. But that's not really what's at issue. It's my impression that courier-imap is behaving correctly, and their claim about the spaces inside the parens is bogus. Can you (or anyone) back their claim? Here's a trimmed down session: A00 OK LOGIN Ok. A01 SELECT INBOX * FLAGS ($MDNSent NonJunk $NotJunk $Forwarded \Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS ($MDNSent NonJunk $NotJunk $Forwarded \* \Draft \Answered \Flagged \Deleted \Seen)] Limited * 69 EXISTS * 4 RECENT * OK [UIDVALIDITY 1243510581] Ok * OK [MYRIGHTS "acdilrsw"] ACL A01 OK [READ-WRITE] Ok A02 FETCH 1:65 (FLAGS UID) (-SNIPPED FOR CLARITY-) * 8 FETCH (FLAGS ($NotJunk) UID 8) (-SNIPPED FOR CLARITY-) A02 OK FETCH completed. A03 UID FETCH 8 (BODY.PEEK[] UID INTERNALDATE) * 8 FETCH ( UID 8 ) * NO Cannot open message 8 A03 OK FETCH completed. A04 UID FETCH 8 BODY.PEEK[] * 8 FETCH (UID 8 ) * NO Cannot open message 8 A04 OK FETCH completed. A05 UID FETCH 8 UID * 8 FETCH (UID 8) A05 OK FETCH completed. A06 UID FETCH 8 INTERNALDATE * 8 FETCH (UID 8 ) * NO Cannot open message 8 A06 OK FETCH completed.
The clue is in the "* NO" response. The message file cannot be opened, for some reason.
Check if there's something wrong with the ownership or the permission of the message file in question.
I think I see what's going on -- something's wrong with the message file, an error path is taken which omits the output of the message in question completely. The entire FETCH item is missing. I can simulate this.
The underlying reason is a problem with the message file, however it's better return all the items that were requested, even if their contents are bogus.
I'm going to apply the following patch. It won't address what's really wrong with that particular message so that it cannot be opened, that's to be determined, however it would return dummy FETCH items in its place.
diff -U3 -r1.28 fetch.c
--- imap/fetch.c 26 Mar 2004 02:02:02 -0000 1.28
+++ imap/fetch.c 28 May 2009 22:53:10 -0000
@@ -1,5 +1,5 @@
/*
-** Copyright 1998 - 2002 Double Precision, Inc.
+** Copyright 1998 - 2009 Double Precision, Inc.
** See COPYING for distribution information.
*/
@@ -34,6 +34,12 @@
extern int smapflag;
#endif
+static const char unavailable[]=
+ "\
+From: System Administrator <r...@localhost>\n\
+Subject: message unavailable\n\n\
+This message is no longer available on the server.\n";
+
unsigned long header_count=0, body_count=0; /* Total transferred */
extern int current_mailbox_ro;
@@ -1543,7 +1549,17 @@
if (fd < 0 || (cached_fp=fdopen(fd, "r")) == 0)
{
if (fd >= 0) close(fd);
- return (0);
+
+ if ((cached_fp=tmpfile()) != 0)
+ {
+ fprintf(cached_fp, unavailable);
+ if (fseek(cached_fp, 0L, SEEK_SET) < 0 ||
+ ferror(cached_fp))
+ {
+ fclose(cached_fp);
+ cached_fp=0;
+ }
+ }
}
if ((cached_fp_filename=strdup(current_maildir_info.
pgphEx6iCWNzq.pgp
Description: PGP signature
------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________ Courier-imap mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
