All UIDs must be unique


IMAP UIDs consist of the mailbox name, a 32-bit integer which is constant for
the mailbox, and a 32-bit integer which is per-message. Generally, most
people think of the IMAP UID as the per-message 32-bit integer. This value
must be strictly ascending in the mailbox, a very useful property which makes
it possible to avoid downloading the entire UID map.


The per-mailbox 32-bit integer (called the "UID validity") should remain
constant, but if it ever changes, the new value must be larger. Since the
uniqueness is the combination of the UID validity and per-message UID, it is
permitted to renumber the per-message UIDs. This is what happens if something
happens to corrupts the UIDs, or if a mailbox is deleted then recreated.


To preserve the qualities of uniqueness and strict ascendency, UID validity
and the "last assigned UID" must be stored with the mailbox. That is the
primary function of the pseudo-message. It also holds such things as IMAP
keywords.

BTW

Do this mean I have to remove the X-UID header when moving mail between mailfolders?

What bad things will happen otherwise?

Is it better or worse that *all* X-UID headers are removed (also for mail that return to the original folder)?

Right now, mail is moved to other folders with the X-UID header, and while resorting - new mail without any X-UID header can be inserted betwin messages with X-UID header. Scary stuff...

Thanks /LaH


Reply via email to