问题
I'm trying to receive and process mails by querying them with IMAP from a mail server. I need guaranteed at-most-once processing. Therefore, I need to be able to detect what mails I have already processed.
The IMAP Unique ID cannot serve that purpose because it's validity might change. If that happens I have no way of relating already processed UIDs to the new UIDs that I'm seeing after the change.
How can I uniquely identify messages and achieve at-most-once processing?
In fact, how are mail clients such as Outloook doing this? If the validity changes they must be able to relate the locally stored mails to the new UIDs.
来源:https://stackoverflow.com/questions/37767017/how-to-uniquely-identify-an-email-with-imap