On Tue, 17 Jun 2003, Vladimir A. Butenko wrote:
> > If UIDs do not persist in a mailbox, then STATUS should return a higher
> > UIDVALIDITY value than any previous UIDVALIDITY returned for that mailbox
> > (including a previous STATUS command).
> It's not that obvious. At least, not for my brain.

Well, this was a simple compliant implementation.  It's possible to comply
without doing this, but it's harder.  See below.

> The same STATUS could return UIDNEXT, which may change during the next
> STATUS poll, but still - why should we generate new UIDVALIDITY for each
> STATUS?

You don't have to; it's just easier.  You could keep track of STATUS vs.
SELECT, and only increase the UIDVALIDITY on SELECT.  Or (and this is
probably better) increase the UIDVALIDITY subsequent to the SELECT so that
STATUS will show the UIDVALIDITY of the next SELECT.

Speaking of non-obvious, my brain reels at the thought of implementing
code to get this right.  Easier just to stash the time in UIDVALIDITY and
call it good... :-)

> BTW, what should the STATUS UIDNEXT command return if the mailbox
> does not keep UIDs?

Anything plausible, I guess.  The change in UIDVALIDITY indicates that
the UIDNEXT value isn't particularly useful.

> Yes, assigning new UIDVALIDITY every time solves all those problems (i.e. it
> does not matter what STATUS returns for UIDNEXT), but believe me or not,
> there are too many clients that connect, check the mailbox status (some use
> STATUS, some even use SELECT), and disconnect - and do this VERY often
> (several times per second) :-(.

Sigh, yes.  A frequently asked question is how to modify UW imapd to
punish such behavior.

Unfortunately, punishing the user (e.g. account lockout) is not useful
because often the user doesn't know what insanity his or her client is
doing.

> But it's still better to specify that they are integer positive 32-bit
> values - right there.

Agreed.

> > Hence the suggestion of using a
> > 32-bit time value (unsigned), which won't expire until 2106 so none of us
> > will need to worry about fixing it.
> You never know :-)))

If I am still alive in 2106, I will be 150 years old.  Even the most
workaholic individual should retire before then!  :-)

-- Mark --

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

Reply via email to