Best way to earmark messages in an IMAP folder?
The UID is guaranteed to be unique. Store each one locally.
I am working on an application that is supposed to connect to IMAP account, read through emails and pick out emails sent by lets say "Mark", then it is supposed to respond to mark
with an automatic response such as "Got it mate" and then do the same tomorrow, with the only difference that tomorrow it should not respond to the same email. 
I am not sure how to achieve this the best way, I have thought of storing the processed IDs in a table, or record last check date. But I feel these are not the best CS solutions.