[Dovecot] Spliting Folders for Efficiency

Curtis Maloney cmaloney at cardgate.net
Fri Oct 12 03:48:35 EEST 2007


Daniel Watts wrote:
> Dear Timo,
> 
> Would there be any sense in giving Dovecot the option to split folders 
> into multiple subfolders when they reached a specified size (probably 
> message count) limit?

My understanding is this is partially covered in Timo's "dbox" format, which 
tries to take the best features of mbox and Maildir.

> .Folder.new
> .Folder.cur
> .Folder.tmp
> 
> could become:
> 
> .Folder__1.new
> .Folder__1.cur
> .Folder__1.tmp
> and
> .Folder__2.new
> .Folder__2.cur
> .Folder__2.tmp

You would only need to split "cur", unless you expect someone to get over 10,000 
new message waiting.  "tmp" is only used _whilst_ message are being delivered, 
so mail clients don't see a partially written message.

> This could be further extended so that Dovecot could be configured to 
> store 'old' message folders in a separate location. We could then have 
> slower+cheaper+larger storage mounted so that 'old mail' does not take 
> up the expensive local SCSI disks on the machine. Mail from 2 years ago 
> is much less likely to be accessed than mail from the last week.

Also, instead of __N, you could try a different path, so /foo/bar/User/ is for 
new mail, and /old/slow/disk/User is for older stuff.

> This would provide very neat behind-the-scenes archiving functionality.

There's really two ideas here... one is the mechanism of multi-directory 
folders, the other is the policy of separating by age.

-- 
Curtis Maloney
cmaloney at cardgate.net



More information about the dovecot mailing list