On Sat, Sep 01, 2007 at 11:48:51PM -0400, Ken Murchison wrote: > Bron Gondwana wrote: >> Sorted by UUID would help enormously for things like not blatting the >> \Seen state for expunged messages until they're expired, because you >> could then just do a double-iterator over the two "index format" files. > > Seen state gets goofed up on unexpunge because we don't keep the original > UID. I wanted to, but re-injecting a message in the middle of a mailbox > with a UID < UIDNEXT was either a violation of RFC3501 and/or seriously > screwed with clients.
Yeah, true. Actually, that's not the issue though. The issue is that seen state is stored as a range list, and the range list is rebuild by walking the cyrus.index file. If there's no record there, then it gets subsumed into the outer range, so seen state is actually lost before we try to unexpunge. An alternative (probably even dodgier for clients) is to just bump UIDVALIDITY. Tends to make you unpopular with people who have 2Gb in their mailbox though. Bron.