[Dovecot] IMAP - many folders?

Geo Carncross geocar-dovecot at internetconnection.net
Tue Nov 23 00:00:08 EET 2004


On Mon, 2004-11-22 at 11:49 +1100, Gregory Bond wrote:
> Piotr Krukowiecki wrote:
> 
> >So my question is "how hard would it be to change sources to make '/' to
> >be default delimiter"?
> >  
> >
> Very.
> 
> Maildir specifically uses .folder.folder names so that the IMAP server 
> can find _all_ the folders by reading a single top-level directory.  If 
> sub-folders were stored ../folder/folder, then the IMAP server would 
> have to scan the entire mail directory (in my case, several gigabytes) 
> every time it started up, so it could find the list of folders.

The overhead isn't fantastic.

Maildir/.foo.Baz/ {new,cur,tmp}

Means being unable to rename folders (and all children) atomically.

Maildir/.foo/.Baz/ {new,cur,tmp}

Means a few more opendir/closedir operations.

Because messages are still in cur/new/tmp, even if you have gigabytes of
email dovecot (nor your email client) doesn't have to scan any of it to
get your folder hierarchy.

Furthermore, if your IMAP client is smart (and won't send LSUB "" *)
then splitting them up could actually be faster, as you don't have to
load a list of ALL folders to find out what the children folders of
INBOX.Work.Office13 are.




More information about the dovecot mailing list