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

David Lee t.d.lee at durham.ac.uk
Wed Jul 19 17:49:17 EEST 2006


(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"?

-- 

:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:                                           Durham University     :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :


More information about the dovecot mailing list