On Thu, May 20, 2004 at 10:00:18AM -0700, Clint Sharp wrote:
Also the
Unique IDs are not consistent between sessions (they are usually just
the message number in the mailbox which will change with an expunge).
That's also untrue. From RFC 3501:
2.3.1.1. Unique Identifier (UID) Message Attribute
A 32-bit value assigned to each message, which when used with the
unique identifier validity value (see below) forms a 64-bit value
that MUST NOT refer to any other message in the mailbox or any
subsequent mailbox with the same name forever. Unique identifiers
are assigned in a strictly ascending fashion in the mailbox; as each
message is added to the mailbox it is assigned a higher UID than the
message(s) which were added previously. Unlike message sequence
numbers, unique identifiers are not necessarily contiguous.
The unique identifier of a message MUST NOT change during the
session, and SHOULD NOT change between sessions. Any change of
unique identifiers between sessions MUST be detectable using the
UIDVALIDITY mechanism discussed below. Persistent unique identifiers
are required for a client to resynchronize its state from a previous
session with the server (e.g., disconnected or offline access
clients); this is discussed further in [IMAP-DISC].
Translated: the UID never changes, unless the server for some reason loses
its state and has to renumber the messages from scratch. In that case, the
UIDVALIDITY changes to allow the client to detect that this renumbering has
taken place.
Brian.