On 02/24/2011 09:09 PM, Andrea Brancatelli wrote: >> Auto-increment offsets will prevent key-collisions, but offsets >> will also break imap compliance because the UIDNEXT value may end >> up being lower than the next inserted UID, leading to missing >> messages in the MUA. > > That's an interesting point I never knew, since I never wrote an imap > server.... ;-) > > As a simple curiosity couldn't the I'd be generated with some kind of > time (and something else obviously if message comes in too quick) > dependent pattern?
http://www.dbmail.org/dokuwiki/doku.php/unique_id_guid This has been discussed before. I noticed the links in the wiki to previous threads regarding this topic are broken. September 2004 apparently. A working link: http://comments.gmane.org/gmane.mail.imap.dbmail.devel/1707 What it boils down to: message uids need to be both ascending and atomic. 1,2,3,4 ok 1,100,102,106 ok 1,100,102,101 oops Any violation will either result in key-collisions breaking replication - when keys generated on different write-masters end up being the same, or it will result in violating the ascendancy requirement thus breaking the imap rfc compliance. You could stop using a global sequence and start using a sequence per mailbox. In that case all you need to handle is concurrent insertion of messages into the *same* mailbox, which is easy to solve on the MTA side. Someone has a git branch off dbmail-2.2 with support for this: the denseuid branch on git://people.freedesktop.org/~cloos/dbmail.git Solving this for good would require some form of synchronization between the participating nodes. This was unfeasible back in 2004. These days, with proper motivation, it wouldn't be so hard. > Do you think a scenario where there's an external machine with mta, > lmtpd and imapd that is replicated to an internal one where there is > only imapd and pop3d would work reliably? IDs would be only generated > on the external one when the message comes in, i suppose...? Ok for POP3. > Or maybe when a client saves a new message like a sent message on the > "internal" imapd the same egg-and-auto increment problem would > appear? You said it. IMAP-APPEND will create messages. -- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl _______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
