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

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


On Wed, 19 Jul 2006, Johannes Berg wrote:

> On Wed, 2006-07-19 at 15:49 +0100, David Lee wrote:
>
> > 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"?
>
> If all your uids are a fixed number of digits you could do
> default_mail_env = /var/spool/mail/%3.2i/%u
> (if all uids are 5 digits long)

Close.  But not quite, I think.  Our significant uids range from about
1,000 to about 60,000.  So they are a mix of four- and five-digit, not a
fixed number of digits.

Both "2345" and "12345" need to map onto the same result: "45".  But I
gather (although I'm new to dovecot) that the "%3.2i" notation acts on the
uid as a string rather than as a number, therefore would yield different
values.

Background: This exercise is to do a minimally invasive black-box
replacement of UW-IMAP with Dovecot.  We are trying to avoid any major
reworking of our directory structure.  (The longer-term strategy at our
site is Exchange (don't ask!); this proposed UW->dovecot work on the
existing service is a temporary "get us by for the moment" fix.)


> The closest other scheme based on UIDs I can think of is %.2Ri, which
> gives you the last two digits of the UID (i.e. uid mod 100) but in
> reverse, so for uid 1234 it'd give you 43.



More information about the dovecot mailing list