Dogz
2016-Apr-30 21:32 UTC
Dovecot (LDAP) get the quota limitation from windows Active directory
Hi, I can't get the quota limitation from windows AD, I did read the dovecot wiki like http://wiki2.dovecot.org/Quota/Configuration and search from google, but failed. *doveadm -D quota get -u dogz:* ... doveadm(dogz): Debug: auth input: dogz at mail.com home=/vmail/dogz/ mail=maildir:/vmail/dogz/Maildir/ uid=500 gid=500 mobile=quota_rule=*:storage=M ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doveadm(dogz): Debug: changed username to dogz at mail.com doveadm(dogz): Debug: Added userdb setting: mail=maildir:/vmail/dogz/Maildir/ doveadm(dogz): Debug: Added userdb setting: plugin/mobile=quota_rule=*:storage=M ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doveadm(dogz): Debug: Effective uid=1000, gid=1000, home=/vmail/dogz/ ... Quota name Type Value Limit % User quota STORAGE 72 - 0 User quota MESSAGE 82 - 0 *ldapsearch -x -h 192.168.90.20 -b dc=mail,dc=com -D cn=ldapquery,cn=users,dc=mail,dc=com -W '(&(mail=*dogz at mail.com*))'* ... objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user ... maxStorage: 500 ... sAMAccountName: dogz ... mail: dogz at mail.com mobile: 200 carLicense: 2 My configuration files are as follwing */etc/dovecot/dovecot-ldap.conf :* .... scope = subtree deref = never user_filter (&(objectCategory=person)(|(mail=%Lu)(otherIpPhone=%Lu))(!(userAccountControl:1.2.840.113556.1.4.803:=2))) pass_filter (&(objectCategory=person)(|(mail=%Lu)(otherIpPhone=%Lu))(!(userAccountControl:1.2.840.113556.1.4.803:=2))) #PS: I don't know why I can't use otherMailbox to be the alias, but I can use otherIpPhone field successfully. user_attrs = =home=/vmail/%Ln/, =mail=maildir:/vmail/%Ln/Maildir/, =uid=1000, =gid=1000, =mobile=quota_rule=*:storage=%$M ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ default_pass_scheme = CRYPT pass_attrs = userPassword=password */etc/dovecot/conf.d/auth-ldap.conf.ext* auth_username_format = %Lu passdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf } userdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf } */etc/dovecot/conf.d/90-quota.conf:* ... plugin { #quota = dict:user::proxy::quota #quota2 = dict:domain:%d:proxy::quota_domain #quota_rule = *:storage=102400 #quota2_rule = *:storage=1048576 #quota = dict:User quota::file:%h/Maildir/dovecot-quota quota = dict:User quota::file:~/Maildir/dovecot-quota } I also tried different form as following, but still can't work it out, please help me and thank you in advance. user_attrs = =home=/vmail/%Ln/, =mail=maildir:/vmail/%Ln/Maildir/, =quota_rule=*:storage=%{ldap:mobile}M or user_attrs = =home=/vmail/%Ln/, =mail=maildir:/vmail/%Ln/Maildir/, =mobile=quota_rule=*:storage=%{ldap:mobile}M Is there any information I should provide? Please advise me and thank you in advance. -- Best Regards, Dogz
Dogz
2016-May-02 01:14 UTC
Dovecot (LDAP) get the quota limitation from windows Active directory
Hi, Finally I found the root cause due to some specific fields are not in windows GC. I was use port:3268 to access windows active directory. For example, while I choose maxStorage to limit users' quota, it can't find the value from GC, but I changed to port:389, it works. Sorry to bother all of you. -- Best Regards, Dogz