[Dovecot] LDAP auth and multiple attributes to construct the mail path
Hello,
So I am trying to construct mail path for my LDAP user lookups, and i need to use two attributes instead of one.
For examle, my LDAP directory has two attributes: departmentAttr and userIDAttr, and I want the maildir to reside in /home/${departmentAttr}/${userIDAttr}
Unfortunately, I cannot seem to find a way to configure dovecot this way. Right now, I have something like
user_attrs = departmentAttr=mail=maildir:/home/%$/%u
But %u is the username (which in my environment can easily change, so I cannot use this for maildir location).
Any ideas on how to achieve that?
So far I have just one brute-force solution - to create an attribute MailDirAttr, and populate it with concatenation of departmentAttr+'/'+userIDAttr by means of a scheduled task. This sounds like unnecessary information duplication, which is usually a very bad practice.
So, again - any ideas?
Thank you, Anatoly.
On 31.8.2012, at 2.45, Anatoly Ivanov wrote:
So I am trying to construct mail path for my LDAP user lookups, and i need to use two attributes instead of one.
For examle, my LDAP directory has two attributes: departmentAttr and userIDAttr, and I want the maildir to reside in /home/${departmentAttr}/${userIDAttr}
With v2.1:
/home/%{ldap:departmentAttr}/%{ldap:userIDAttr}
With older versions: you can't.
participants (2)
-
Anatoly Ivanov
-
Timo Sirainen