[Dovecot] Multiple use of the same LDAP attribute

Bernhard Schmidt berni at birkenwald.de
Wed Apr 8 21:09:28 EEST 2009


On Wed, Apr 08, 2009 at 12:41:17PM -0400, Timo Sirainen wrote:

> > So, it looks like there is an issue using the same LDAP attribute
> > (xxxMailbox in this case) twice in variable expansion.
> > Is this a known issue? 
> Yes. I was planning on rewriting LDAP configuration and getting it fixed
> at the same time, but looks like it didn't happen yet for v1.2.

Okay, thanks for the clarification.

> > Of course there are several viable workarounds
> > (base mail location on home directory, 
> This is what I would have suggested. Seems like a cleaner solution in
> any case.

Come to think of it, any hint how I can implement the existing scheme?

user_attrs =
        xxxMailbox=mail=maildir:/home/mailstore/%U$/Maildir:INDEX=/home/mailstore/indexes/%1U$/%U$,
	xxxMailbox=home=/home/mailstore/%U$

the maildir location is easy (mail=maildir:~/Maildir), but the index is
hard, as I don't have the userid in any variable.

The only thing I can come up with atm is

user_attrs = 
	xxxMailbox=home=/home/mailstore/%U$,
	xxxMailbox=mail=maildir:~/Maildir:INDEX=/home/mailstore/indexes/%16.1h/%16.99h

but I'm willing to bet that this is going to break at some point, the
latest point being when someone changes the mailstore path and forgets
to update the offset :-\

What happens when the width is larger than the length of the string
anyway?

Bernhard



More information about the dovecot mailing list