mail_location hashing & lowercasing?
Sven Hartge
sven at svenhartge.de
Sat Aug 30 10:41:46 UTC 2014
Ralf Hildebrandt <r at sys4.de> wrote:
> Currently, I'm using
> mail_location = mdbox:/var/spool/mail/%Ld/%Ln/mdbox
> Now I want to add a partitioning (so I don'T have all directories in
> one single directory), but can't find the right syntax:
> mail_location = mdbox:/var/spool/mail/%Ld/<HASHING HERE>/%Ln/mdbox
> It seems like I'd need to use
> %N (new hash) on %Ln and then take a substring of that.
> %2NLn
> 2 Characters of the %N hash of %Ln (the lowercase username)
> But this gives me a verbatim "Ln" on the path!
Hm.
I have home=/srv/mail/%2NLn/%2.16NLn/%Ln/ in my auth-ldap.conf.ext and
this gives me a path like this: /srv/mail/0/08/myusername
I use version 2.2.13 of dovecot.
Beware: %2NLn does not give you two characters, it just gives you the
values 0 and 1, because it means "mod(2,new_hash(lowercase(username)))"
If you want the first 2 characters, you need %256NLn, or better
%2.256NLn, see the section about modifiers in
http://wiki2.dovecot.org/Variables
Grüße,
Sven.
--
Sigmentation fault. Core dumped.
More information about the dovecot
mailing list