Re: mail_location hashing & lowercasing?

2014-08-31 Thread Andreas Kasenides

On 31-08-2014 16:12, Sven Hartge wrote:

Ralf Hildebrandt  wrote:

* Sven Hartge :


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.



I'm on 2.1.17 :(


%N could be a 2.2 feature. Someone with besser memory of version 
changes

will have to clarify this.

S°


%N requires a 2.2.3+ Dovecot.

But %H will do the trick for previous versions.
BUT %H will give a bad distribution if your %n ends in the same 
characters
ex. username@your.domain. This can be rectified by reversing the string 
using %R.


Have not tried this but could %2.256HRLu do the trick?
Have fun

Andreas


Re: mail_location hashing & lowercasing?

2014-08-31 Thread Sven Hartge
Ralf Hildebrandt  wrote:
> * Sven Hartge :

>> 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.

> I'm on 2.1.17 :(

%N could be a 2.2 feature. Someone with besser memory of version changes
will have to clarify this.

S°

-- 
Sigmentation fault. Core dumped.


Re: mail_location hashing & lowercasing?

2014-08-31 Thread Ralf Hildebrandt
* Sven Hartge :

> 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.

I'm on 2.1.17 :(

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: mail_location hashing & lowercasing?

2014-08-30 Thread Sven Hartge
Ralf Hildebrandt  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//%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.


mail_location hashing & lowercasing?

2014-08-30 Thread Ralf Hildebrandt
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//%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!

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein