We need to keep in our db, the unique id for each message. I read on your site the story about the Unique ID in IMAP protocol but is not clear for me.
Do you suggest strategies to get key based for example from information in the header email (for fast retrieve information).