On Tue, 3 Dec 2002, Andreas Aardal Hanssen wrote:
> If someone does a STATUS on a mailbox that the IMAP server has not seen
> before - what is expected output for UIDNEXT and UIDVALIDITY?

I don't understand this question.

The UIDVALIDITY is always the uidvalidity value assigned to the mailbox,
and the UIDNEXT is the expected value of the next UID that would be
assigned in the mailbox to a new message.  Commonly, the UIDNEXT is the
most recently assigned UID in the mailbox plus 1.

> Since the
> STATUS command can not change the mailbox in any way - I assume it's not
> allowed to index the messages either.

What do you mean by "index the messages"?

> Is it far off to say that UIDNEXT == # of messages + 1, or UIDVALIDITY = 1
> (obviously this is weird for servers that use time(NULL))?

Yes, it is very far off.

UIDVALIDITY = 1 can't be used unless the server remembers the last
assigned UID for long-deleted mailboxes to ensure that no newly-created
mailbox with the same name reuses that UID.  Remember that mailbox +
uidvalidity + UID uniquely identifies a message on that server into
eternity.

UIDNEXT would never be <# of messages> + 1.  It can be <most recently
assigned UID> + 1, which may or may not be the UID of the last message.

> What practical use does a client have for checking UIDNEXT status?

A change in UIDNEXT from its last recorded value tells a client that
messages have been delivered to the mailbox since that time, and it does
so even if all those messages were expunged.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

Reply via email to