email - Identifying mails between an IMAP server and a client application -
the imap spec gives great hopes uid value may used this:
the unique identifier of message must not change during session, , should not change between sessions. change of unique identifiers between sessions must detectable using uidvalidity mechanism discussed below.
but alas, @ least microsoft exchange server, experience shows uid of message does occasionally/often change between sessions, though should not, , not detectable using uidvalidity (which stays same).
as example of may happen. server, got mail? , server says, sure, here are, ids 4, 5, 7, 8 , 11. (incrementing not necessesarily contiguous, far well.)
so, next time, say, got mail newer 11? , server says sure, , gives me 14, 15, 16 , 18, has happened has reassigned id of message known e.g. 5 e.g. 16! looks new mail, old mail new id!
this means 1) "should not" bears no value, 2) exchange following spec if interpret "should not" "it's you" , 3) may violating spec on uidvalidity part (not quite sure spec bit vague).
it means uid cannot trusted way identify messages on server. if download message 5, store information on in database, , server renames 16 without knowing, how can later find on server? , how can know 16 duplicate of have stored 5?
what reliable way of identifying mails on server knowing uid cannot used?
looking @ message-id header field best bet.
if exchange does, violates spec: it's permitted reassign uids, if absolutely must change uidvalidity. particular version/plugin this?
(edit: hear exchange increases uids when this, not spec violation. assigning new lower uid total no-no, long exchange increases uids it's not violating spec. find behaviour bit smelly though.)
Comments
Post a Comment