And I guess the interior of the files is the same? I.e. just the plain mail without any changes or quoting? Yes, but it's in dbox format so it contains also some extra metadata (not in the mail headers). Yeah of course... but the important point here is the "not in the mail
On Tue, 2012-10-30 at 00:05 +0200, Timo Sirainen wrote: headers" part :)
So I've added the following changes, please double check :)
http://master.wiki2.dovecot.org/MailboxFormat/dbox?action=diff&rev2=30&rev1=29
For sdbox, does that part with "loosing the indexes means game over" ;) , too? You'll lost message flags then. Both sdbox and mdbox keep dovecot.index.backup files and repairing tries very hard to preserve everything from the indexes it sees, so I don't think it's a big concern as long as the system behaves properly. Yeah... sounds not too bad... :)
Off topic:
Have you ever thought about adding a "real" DB backend? Nothing against dbox... :) ... and I have no performance comparison of dbox with what could be done with a DBMS... but the advantage of the later would be that you get all fancy features from database systems for free... like fast indexing, online replication, etc. p..
One might even reuse something like AOX for this.
Cheers, Chris.