On Mon, 2005-06-06 at 15:47 -0600, Jesse Norell wrote: > Hello, > > I'm a bit behind on my email, including this thread, so disreguard this > if it's now irrelevant. > > > Unique identifiers are assigned in a strictly ascending fashion in the > > mailbox (See rfc2060). > > From reviewing the thread from last year, which starts here: > http://mailman.fastxs.net/pipermail/dbmail-dev/2004-September/004511.html > the UID needs to be ascending per mailbox, and SHOULD be maintainted > between imap sessions - is that the only requirements?
No. If it cannot be maintained between IMAP sessions then UIDVALIDITY must change and the client must "forget" everything it knows about the mailbox. That's not entirely true- clients could, in theory use Message-Id fields or other information to try and build an alternate (more permanent) mapping, but in practice, very few do, and they complain loudly when UIDVALIDITY _does_ change. > What if the UID > for a message is assigned the first time an imap server needs to give it > to a client (I'm not familiar with IMAP commands, so can't say exactly > how that's done); prior to that it's unneeded and unset, thereafter it's > saved in the message field and always available. The imap server would > simply have to make sure that it always incrementes from previous messages > in the mailbox, simple enough. That's not the problem. The problem is that if server A gives out UID 215 and server B assigned a message UID 214 then the client that saw UID 215 _MUST_ see UID 214 or they will never ask for it. If server A and server B both perform updates at the same time and can immediately see each others updates then the database itself is acting as the sequence-number generator. However, if the database servers lose the ability to communicate with each other NO database access is possible -- after all, the database server doesn't know that UIDs are the only things they need to synchronize. So you've traded one single point of failure to two single points of failure. Not good. The solution is to allow each dbmail-instance to have a private copy of the database and perform it's own synchronization of the only thing that needs to be synchronized- the UID. > Again not knowing IMAP, are there any ramifications for when a message > moves to another folder? I guess if it's a per-mailbox thing, you simply > reassign it the next UID for the new mailbox (?). UID is per-mailbox. -- Internet Connection High Quality Web Hosting http://www.internetconnection.net/