Hello,
In my case, my AD domain is called "domain.lan" and my externals domains are called "domain2.fr", "domain3.com", "domain4.biz"
So, I've made an OU called "domains" at the root of my AD tree (under "domain.lan") and I've made others OU under "domains", one for each domains I'm supposed to manage.
After this, in Dovecot :
/etc/dovecot/dovecot-ldap.conf :
hosts = dc.domain.lan:389
ldap_version = 3
auth_bind = yes
dn = vmail@domain.lan
dnpass = password_of_vmail
base = ou=domains,dc=domain,dc=lan
scope = subtree
deref = never
user_filter = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_attrs = userPassword=password
default_pass_scheme = CRYPT
user_attrs = =home=/path_to_your_storage/%Ld/%Ln/Maildir/,=mail=maildir:/path_to_your_storage/mail/%Ld/%Ln/Maildir/
With this config, users must authenticate with, as username, the full email address.
Use the same config in Postfix, but beware to add the line "result_attribute= userPrincipalName" in each 3 files *_maps.cf" (I've modified only those files), beacause you'll had duplicates results with the tests commands mentionned in the howto.
Had I answered to your problem ?
Nicolas