I'm in the process of implementing an IMAP proxy to support a research project, and in so doing I think I may have found a bug in the way that Courier-IMAP implements the IMAP4rev1 protocol.
The bug can be demonstrated with a rather trivial example, which is actually explicitly noted in RFC 3501 on page 60. I include below a sample session that demonstrates the bug. This is easily reproducible. <login> 2 SELECT "Inbox" * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited * 68 EXISTS * 0 RECENT * OK [UIDVALIDITY 1137086796] Ok * OK [MYRIGHTS "acdilrsw"] ACL 2 OK [READ-WRITE] Ok 3 UID SEARCH ALL * SEARCH 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 62 64 66 68 70 72 74 75 76 77 3 OK SEARCH done. 4 UID SEARCH UID 100:* * SEARCH 4 OK SEARCH done. 5 UID FETCH 100:* (FLAGS) 5 OK FETCH completed. 6 UID SEARCH UID 7:5 * SEARCH 6 OK SEARCH done. (3 is to demonstrate the fact that this mailbox is not empty, although I guess 2 demonstrates that as well). Basically, 4 and 5 should return data for at least one message (the highest UID message). Instead, they return data for no messages. RFC 3501, page 60 (6.4.8 UID Command): "Also note that a UID range of 559:* always includes the UID of the last message in the mailbox, even if 559 is higher than any assigned UID value. This is because the contents of a range are independent of the order of the range endpoints. Thus, any UID range with * as one of the endpoints indicates at least one message (the message with the highest numbered UID), unless the mailbox is empty." Courier-IMAP does not seem to treat the range as being independent of the order of the range endpoints, nor does it include the UID of the last message in the mailbox. (Please reply to the list, not to me. This is a research account that is used for email testing, honeypots, and training spam filters, not my actual inbox. If you really want to email me, replace bobcups with "icf".) -Ian Fette ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Courier-imap mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap
