[Dovecot] per user quota using LDAP entries

Kenneth Oncinian koncinian at gmail.com
Mon May 21 09:47:09 EEST 2007


Hi List,

This is my first post to this list so please be gentle :-).
First of all, kudos to the developers of dovecot!

Im trying to implement quota, and I followed the instructions in the wiki.
My problem is the quota specified per user is not being honored, only the
global quota setting.
I do have an "quota = maildir:storage=204800" in the plugin area and enabled
quota in the mail_plugins for both imap and pop3.

This is my user attribute in /etc/dovecot-ldap.conf:
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,mailQuota=quota
wherein the "mailQuota" attribute has an entry of "mailQuota:
maildir:storage=30720".

So i was expecting of a 300MB quota for that user, but dovecot is using the
global quota of 200MB instead of 300MB.

My dovecot version is 1.0.0

My dovecot.conf:
-----------------------
# /etc/dovecot.conf
log_path: /var/log/dovecot.log
protocols: imap pop3
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
mail_location: /var/mail/vhost/%u
mail_debug: yes
maildir_copy_with_hardlinks: yes
maildir_copy_preserve_filename: yes
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota trash
mail_plugins(imap): quota imap_quota trash
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: ldap
    args: /etc/dovecot-ldap.conf
  userdb:
    driver: passwd
  userdb:
    driver: ldap
    args: /etc/dovecot-ldap.conf
  userdb:
    driver: prefetch
plugin:
  quota: maildir:storage=204800
  trash: /etc/dovecot-trash.conf
---

my dovecot-ldap.conf
------------------------------------------
hosts = localhost.localdomain
dn = "cn=Directory Manager"
dnpass = "xxxxxx"
tls = no
auth_bind = no
ldap_version = 3
base = ou=people, dc=xx, dc=xx, dc=xx
user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,mailQuota=quota
pass_attrs = uid=user,userPassword=password
pass_filter = (&(objectClass=posixAccount)(uid=%u))
default_pass_scheme = LDAP-MD5
--------------

sample LDAP query:
------------------------------
ldapsearch -x -Z '(uid=kenneth.oncinian)'
# LDAPv3
# base <> with scope sub
# filter: (uid=kenneth.oncinian)
# requesting: ALL
#

# kenneth.oncinian, People, ph.panasonic.com
dn: uid=kenneth.oncinian,ou=People, dc=xx,dc=xx,dc=xx
givenName: Kenneth
sn: Oncinian
telephoneNumber: xxx-xxxx
loginShell: /bin/bash
gidNumber: 2516
uidNumber: 1000
mail: kenneth.oncinian at xx.xx.xx
facsimileTelephoneNumber: xxx xxxx
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: posixAccount
objectClass: account
objectClass: mailgroup
objectClass: mailgroupmanagement
objectClass: mailgroupmanagement-globalconfig
objectClass: mailgroupmember
objectClass: mailrecipient
objectClass: netscapemailserver
objectClass: nsmailclient
objectClass: ntuser
objectClass: sambaSamAccount
objectClass: proxyaccess
objectClass: jabberaccess
uid: kenneth.oncinian
preferredLanguage: en
cn: Kenneth Oncinian
homeDirectory: /var/mail/vhost/kenneth.oncinian
ou: Information Systems Department (ISD)
x500UniqueIdentifier:
mailAlternateAddress: koncinian at gmail.com
ntUserDomainId: kenneth.oncinian
ntUserCreateNewAccount: true
ntUserDeleteAccount: true
sambaSID: S-1-5-21-1685363153-499155089-1962420841-3000
sambaPrimaryGroupSID: S-1-5-21-1685363153-499155089-1962420841-3001
displayName: Kenneth Oncinian
sambaPwdMustChange: 2147483647
sambaPasswordHistory:
00000000000000000000000000000000000000000000000000000000
 00000000
sambaAcctFlags: [U          ]
myproxyaccess: yes
myjabberaccess: yes
sambaPwdCanChange: 1179303932
sambaLMPassword: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sambaNTPassword: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sambaPwdLastSet: 1179303932
mailQuota: maildir:storage=30720

# search result
search: 3
result: 0 Success

# numResponses: 2
# numEntries: 1
-- snip--



thanks and best regards,
Kenneth


More information about the dovecot mailing list