Thanks for the explanation, this should be fine however I am a little bit confused with the multiple LDAP userdb/passdb in Dovecot? i.e. Dovecot will be:
passdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
userdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
add the specified below to search in another site
passdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap_site1.conf
userdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap_site1.conf
Also then I have to double up on the files on the postfix side if I understand correctly each reflecting the same changes to the dovecot configuration?
The reason we don't have everything in a single OU is because we have multiple sites and to logically group them in different OU's brings makes for a better logical structure.
It would've been nice if it were possible to use a Wildcard search, in other words it would iterate through all of the OU's. So the way I see it working would be
1. Have another parameter in postfix and dovecot search base i.e. %AOU (All Origanisational Units)
2. The query agent will then because the above parameter is specified query the AD to return the # of organizational units and names and store it in an array of some sorts
3. The query agent will establish multiple connections to the AD each matching one of the identified OU's in the array
4. The query agent will search each connection simultaneously for the user
|
|- SITE 1 (Query Agent Connection 1 search user XYZ)
| |- Engineering Department OU
| |- Development Department OU
|
|- SITE 2 (Query Agent Connection 2 search user XYZ)
| |- Marketing OU
| |- Sales OU
|
|- Users (Built-In) AD Accounts
This would eliminate the need for stacking multiple files configured for each individual site and have 1 file for everything. You could potentially then just bind an authenticated user account or special account created in the built-in OU that has domain-wide privileges for authentication