Sorry to clog with one more e-mail on this thread, but I realized after some thought that the solution below doesn't really offer any advantages over random numbers, and thought I'd update this issue for the purpose of the list archives.

I've implemented a timestamping solution that makes sure the same uid isn't used twice, which should do the trick.

-Travis



Travis Vachon wrote:


It's probably a largely theoretical issue, since people don't typically delete & recreate mailboxes at a given path very frequently, but won't hash(UUID()) repeat values at some point? IMAP's uniqueness requirement (for clients to be able to sync a given mailbox without re-downloading the entire message list every time) is that the triple of (mailbox path, mailbox UID validity, message UID) uniquely identifies a given mailbox.

Right. I just took my solution (a random number from a pretty large range) from the twisted network programming essentials book. As a point of comparison, Courier-IMAP uses a time stamp. Unless there are any objections, I think I'll combine the two (timestamp + random number). If you think it would be worthwhile, I could try throwing the hash(UUID()) in there too.

-Travis

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to