LDAP stored quota

Vincent Seynhaeve vlamsdoem at gmail.com
Thu Nov 22 09:56:38 EET 2018


Hello,

I'm trying to set up LDAP stored quota on Dovecot but it doesn't work and
doesn't get reported by the command doveadm quota get.

I'm using the field departmentNumber in my LDAP server to store the quota.


doveadm quota get -u test

Quota name Type    Value
Limit
%
User quota STORAGE     0
-
0
User quota MESSAGE     0
-
0


log file associated with doveadm quota get command:

Nov 21 11:38:47 imap dovecot: auth: Debug: master in:
USER#0111#011test#011service=doveadm
Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): user search:
base=ou=People,dc=example,dc=com scope=subtree
filter=(&(objectClass=posixAccount)(uid=test)) fields=departmentNumber
Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): result:
departmentNumber=1M; departmentNumber unused
Nov 21 11:38:47 imap dovecot: auth: Debug: ldap(test): result:
departmentNumber=1M
Nov 21 11:38:47 imap dovecot: auth: Debug: userdb out:
USER#0111#011test#011mailRoutingAddress=user =uid=vmail =gid=mail
=home=/var/mail//test =quota_rule=*:bytes=1M


Bellow my configuration files:

conf.d/10-mail.conf

mail_plugins =  $mail_plugins quota


conf.d/20-imap.conf


protocol imap {
  mail_plugins = $mail_plugins imap_quota
}


conf.d/90-quota.conf

plugin {

  quota = maildir:User quota
  quota_rule2 = Trash:storage=+100M
  quota_grace = 10%%
  quota_status_success = DUNNO
  quota_status_nouser = DUNNO
  quota_status_overquota = "552 5.2.2 Mailbox is full"

}


dovecot-ldap.conf.ext

user_attrs= \
=mailRoutingAddress=user \
=uid=vmail \
=gid=mail \
=home=/var/mail/%d/%n \
=quota_rule=*:bytes=%{ldap:departmentNumber}


Can somebody help me with this or give me some advice for debugging?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20181122/70f9a4e6/attachment.html>


More information about the dovecot mailing list