On Fri, 2010-09-03 at 17:09 +0100, William Blunn wrote:
I think the only thing I had further questions on was how alternate storage works with mdbox.
In http://wiki2.dovecot.org/MailboxFormat/dbox it says we have
- dovecot.map.index* files contain the "map index"
- m.* files contain the mail data
I think I am not clear on the "dovecot.map.index* files". Is that really just one file "dovecot.map.index", and the globby asterisk just indicates that there may be may be old versions if the file has been updated by being re-written?
It's the same as dovecot.index files that you see for mailboxes. There are:
- dovecot.index updated once in a while (doesn't exist initially)
- dovecot.index.log always, updated always first
- dovecot.index.log.2 - the .log is rotated to this for a while
"dovecot.map.index*" is always stored in the primary storage?
Yes.
So if we are moving mail to alternate storage, we write them into a new "m.*" file in the alternate storage folder containing the messages we want to move.
Either a new m.* file or existing m.* file in there.
So that would mean it only really makes sense for any given numbered "m.*" file to exist in either the primary storage or the alternate storage but not both?
Right, it's a bug if it exists in both.
So when Dovecot is wanting to find the next unused "m.*" file number, it needs to consider files in both the primary storage and alternate storage?
Yes, but it looks up the next number from index file, not by scanning what files exist.