[Dovecot] /var/spool/mail directory size and subdirectories

seth vidal skvidal at linux.duke.edu
Wed Jul 19 17:54:42 EEST 2006


On Wed, 2006-07-19 at 15:49 +0100, David Lee wrote:
> (Complete newbie to dovecot.  I hope what follows isn't something I've
> missed in some FAQ somewhere...)
> 
> On a traditional UNIX filesystem with UW-IMAP several years ago, we
> encountered major performance problems when "/var/spool/mail/" got big (we
> would currently be ~20,000 entries).  This was due to the inefficiency of
> the UNIX filesystem when creating and deleting the lockfiles (etc.) in a
> directory of that size.
> 
> We worked around that (all those years ago) with a local source-code mod
> to UW-IMAP ("c-client") to use subdirectories "/var/spool/mail/00/" to
> "/var/spool/mail/99/" based on a trivially simply "uid mod 100" algorithm.
> (Our uids are random; our usernames are not.)  Thus we had 100 subdirs
> each of about 200 entires.  Efficiency and performance vastly improved,
> and we've been running like that ever since.
> 
> Now we are considering migrating to dovecot...
> 
> Does dovecot do file creation/deletion in this (or similar shared)
> directory?  (And so would it be liable to the same inefficiency problems?)
> 
> Is there some means in the "dovecot.conf" file to specify an INBOX pattern
> as "/var/spool/mail/%ZZZ%/%u" where "%ZZZ%" could be algorithmically
> specified as (say) "user-uid mod 100"?

look in variables.txt that comes in the tarball.

I think the %H will have some of what you're looking for - or segments
of the %u

-sv




More information about the dovecot mailing list