I'm making a mail client which work POP3 and IMAP. I'm programming the client in C++ with vmime api. My question is: What is the best way for synchronizing mail?
I think that identificator is good way but I don't know what is the best identificator for synchronize mail:
message-ID is the easiest to use but is it possible that there are two identical message-ID? Same question for UID (IMAP) and UIDL (UID)?
can you help me? Thank you in advance.
While Max is right in saying that a tuple of (FolderName, UIDVALIDITY, UID)
will never ever refer to any other message, there's unfortunately no guarantee that a given message will be always referred to only using that same tuple. Servers are allowed to bump the UIDVALIDITY
, and there's no standard way of providing unique identifiers which persist across message moves or identify duplicate messages.