hosts           = PH_LDAP_SERVER_HOST:PH_LDAP_SERVER_PORT
ldap_version    = PH_LDAP_BIND_VERSION
auth_bind       = yes
dn              = PH_LDAP_BINDDN
dnpass          = PH_LDAP_BINDPW
base            = PH_LDAP_BASEDN
scope           = subtree
deref           = never

# Below two are required by command 'doveadm mailbox ...'
#iterate_attrs   = mail=user
#iterate_filter  = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail))

user_filter     = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
user_attrs      = mail=master_user,mail=user,=home=%L{ldap:homeDirectory},=mail=%{ldap:mailboxFormat:maildir}:~/%{ldap:mailboxFolder:Maildir}/,mailQuota=quota_rule=*:bytes=%$

# Used for dn lookup
pass_filter     = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_attrs      = mail=user,userPassword=password,allowNets=allow_nets
default_pass_scheme = CRYPT
