[Dovecot] Multiple userdb possible?

/dev/rob0
Tue, 07 Feb 2012 16:00:57 -0000

On Tue, Feb 07, 2012 at 12:07:56PM +0200, Nikolaos Milas
wrote:
> I am running v2.0.13. In my dovecot.conf I have:
>
> userdb {
>   args = /etc/dovecot/dovecot-usrdb-ldap.conf
>   driver = ldap
> }
>
> passdb {
>   args = /etc/dovecot/dovecot-passdb-ldap.conf
>   driver = ldap
> }
>
> Is it legitimate to include multiple ldap userdb's, like:

Of course. The driver chosen is not significant; the query used is
all that matters. Having two LDAP searches is conceptually no
different than having system users and SQL users.

> userdb {
>   args = /etc/dovecot/dovecot-usrdb-ldap1.conf
>   driver = ldap
> }
>
> passdb {
>   args = /etc/dovecot/dovecot-passdb-ldap1.conf
>   driver = ldap
> }
>
> userdb {
>   args = /etc/dovecot/dovecot-usrdb-ldap2.conf
>   driver = ldap
> }
>
> passdb {
>   args = /etc/dovecot/dovecot-passdb-ldap2.conf
>   driver = ldap
> }
>
> If it is legitimate (in case configuration is different, please
> correct me), in which sequence userdb's are evaluated?

In the order specified. A /etc/dovecot/dovecot-usrdb-ldap1.conf match
prevents searching in /etc/dovecot/dovecot-usrdb-ldap2.conf; keep
this in mind in setting up the queries.
--
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: