[Dovecot] Variables in LDAP userdb
Hi Timo,
Is it OK to have dovecot variables in entries in an LDAP userdb? Say I wanted to set the mail userdb parameter to override mail_location, would it work by having an entry in LDAP (eg for mailMessageStore attrib) like:
mdbox:/home/email/%d/%n:INDEX=/home/indexes/%d/%1n/%n:ALT=/home/email_archive/%d/%1n/%n
and those % variables will still be expanded by dovecot? Or would I be required to replace them in the LDAP directory with their actual values?
Cheers
Alex
-- This message is intended only for the addressee and may contain confidential information. Unless you are that person, you may not disclose its contents or use it in any way and are requested to delete the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc Domain House, 5-7 Singer Street, London EC2A 4BQ Tel: (020) 7608 4900 Fax: (020) 7608 5300 (Registered office: as above; Registered in England and Wales under number: 3727592) Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
On 20.8.2012, at 18.21, Alex Crow wrote:
Is it OK to have dovecot variables in entries in an LDAP userdb? Say I wanted to set the mail userdb parameter to override mail_location, would it work by having an entry in LDAP (eg for mailMessageStore attrib) like:
mdbox:/home/email/%d/%n:INDEX=/home/indexes/%d/%1n/%n:ALT=/home/email_archive/%d/%1n/%n
and those % variables will still be expanded by dovecot?
No. Otherwise it would break paths that actually contain % characters.
Or would I be required to replace them in the LDAP directory with their actual values?
Yes. If you really wanted to avoid that and you have only a few different values, you could create some namespaces in dovecot.conf and enable/disable them as needed in the ldap fields. Although I guess that's not a whole lot better since there's currently no simple "enabled" setting for namespaces, maybe I should add one..
Timo,
Thanks, I scripted replacing the correct entries in LDAP.
To clarify, what happens in these case with regard to the default mail_location set in the config files (ie is it used or overridden):
- The LDAP attribute referenced in the userdb lookup exists but is empty
- The LDAP attribute is not present for the user.
Cheers
Alex
-- This message is intended only for the addressee and may contain confidential information. Unless you are that person, you may not disclose its contents or use it in any way and are requested to delete the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc Domain House, 5-7 Singer Street, London EC2A 4BQ Tel: (020) 7608 4900 Fax: (020) 7608 5300 (Registered office: as above; Registered in England and Wales under number: 3727592) Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
On 21.8.2012, at 11.44, Alex Crow wrote:
To clarify, what happens in these case with regard to the default mail_location set in the config files (ie is it used or overridden):
- The LDAP attribute referenced in the userdb lookup exists but is empty
The value will be overridden as empty, which could be an error.
- The LDAP attribute is not present for the user.
The value isn't overridden.
participants (2)
-
Alex Crow
-
Timo Sirainen