On Thu, Mar 03, 2011 at 08:09:46AM +0100, Simon Matter wrote: > - improved_mboxlist_sort to 1 > I don't know about this one but it hurts reading we have to > "dump/convert/undump their mailboxes.db" :( This is the most important one - but I actually don't think it will be required to have an option. I'm more tempted to turn it off completely. You see, we have ourselves an "out" :) ctl_cyrusdb -r is REQUIRED to be run at startup. You may notice that's where I implemented the automatic database type conversion magic. It also always does a full pass of the mailboxes.db, looking for incomplete creates. All we really need to do is add something that checks if it's in strictly sorted order (by improved_mboxlist_sort and re-builds the mailbox if it's not). The tricky question is: berkeley or skiplist. I know how to do it with skiplist, but I have to make sure berkeley doesn't break if the database is created with the wrong options. Speaking of which: it bloody well should be stored in the header of the database - some sort of signature that confirms which algorithm is used to collate that table - so you can switch the default for new database and still have the old ones work. But that's an issue for a different day :) .... Everything else is open for negotiation, but improved_mboxlist_sort is unambiguously better. That said - an iterator that skipped over non-matching records in between until the leading prefix was changed would also be an option that doesn't mean you have to pass a weird comparison function to everything. The underlying problem is this: user.bob.abc user.bob.abc extra user.bob.abc.subfolder There's a few things like this, where a legal character in a folder name sorts BEFORE the heirarchy separator. So you can wind up "closing" user.bob.abc in your list code before finding subfolders later. A third alternative would be to fix all the code that deals with lists and stuff to just cope with what's actually returned by skipping the unwanted records. This would kind of hurt for something with millions of subfolders that had to be skipped though. Bron. ---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/