[Dovecot] The docs a re a bit weird on "Directory hashing"

Jan-Frode Myklebust janfrode at tanso.net
Thu Aug 8 10:29:54 EEST 2013


On Thu, Aug 08, 2013 at 01:42:43AM +0300, Eliezer Croitoru wrote:
> 
> And means a two layers cache of max 16 directories on the first layer
> and 256 directories on the second layer.
> The above allows millions of files storage and can benefit from all ext4
> lower kernel levels of compatibly rather then do stuff on the user-land..
> Since I am not 100% sure that the scheme I understood is indeed what I
> think I assume the above will need a small correction.

I use:

	mail_home = /srv/mailstore/%256LRHu/%Ld/%Ln

which gives me 256 buckets containing domainname/username/, and the
buckets are a hash of Lowercase Reverse usernames. To get the same
layout as squid, I would try:

	mail_home = /srv/mailstore/%16LRHu/%256LRHu/%Lu

Ref: http://wiki2.dovecot.org/Variables for variables and modifiers.

BTW: I'm lowercasing everything, because I once got bitten by a variable
not being lowercased in one version, and suddenly this changing in
another version. It's probably redundant here -- but it was painful to
fix when it happened..


  -jf


More information about the dovecot mailing list