Message order in Gmail boxes
I wrote a simple script in python using imaplib to download gmail messages from a given box (or a label which behaves like a box). Since some boxes contain very large number of messages, my script allows to download only those numered within an interval like 100-200, so that I can resume downloading as some later time.
My question i开发者_运维技巧s whether it is guaranteed that the message order within the box as provided by IMAP is always the same (chronological order). My tests seem to support this conclusion by I would like to be sure.
-- tsf
The IMAP RFC states:
Unique identifiers are assigned in a strictly ascending fashion in the mailbox; as each message is added to the mailbox it is assigned a higher UID than the message(s) which were added previously.
精彩评论