I am developing simple program that will download my emails from different mail boxes and store in database for backup.
I plan to use IMAP and most mailboxes are gmail.
I am wondering how do I avoid dupes?
I read that IMAP
's UID
is not reliable.
Message-ID
is not guaranteed to be unique.
Email's hash may change.
(Some mail servers may modify emails header)
What is common and practical pattern usually used?
I do not wish to get tons of dupes and I do not wish to loose emails.
Also it would be automated script used for backup. I do not wish to manually verify it daily.