Hi Daniel, The "userdb" ldap is in this section:
protocol lmtp { mail_plugins = " quota sieve" userdb { args = /etc/dovecot/dovecot-ldap-lmtp.conf.ext driver = ldap } } And dovecot-ldap-lmtp.conf.ex contains this: hosts = xxx.xxx.es:389 dn = uid=xxxxx,o=xxxxxx,c=es dnpass = xxxxxxxxxxx ldap_version = 3 base = o=xxxxxxxxxxxx,c=ES user_attrs = mailMessageStore=home,mailquotasize=quota_rule=*:bytes=%$ user_filter = (uid=%u) A las Viernes, 27-07-2012 en 2:34 Daniel Parthey escribió: Hi Raul, Raul Jareño Morago wrote: > We get user's quota limit from LDAP. It works fine when user has > quota attribute in LDAP (this is when it's different from default > quota). But when user doesn't have quota limit attribute Dovecot > doesn't take default value defined in quota plugin and assign unlimit > quota to user. > Our configuration is similar to the example from wiki ( > http://wiki2.dovecot.org/Quota/Configuration ). This is the plugin > configuration > > plugin { > quota = maildir:User quota > quota_rule = *:storage=1G > } > > And this is the recovered fields in LDAP search: > > user_attrs = > mailMessageStore=home,mailquotasize=quota_rule=*:bytes=%$ > > It works if user has mailquotasize in its LDAP entry. But if it hasn't > it Dovecot assign 0 instead of *:STORAGE=1G > > This is the log when LTMP deliver a mail to a user without > mailquotasize attribute: > > _auth: Debug: ldap(eepp68,172.31.100.119): result: > mailMessageStore=/buzones1/e/eepp68; MAILQUOTASIZE MISSING LDAP Entry for mailquotasize is missing... so far so good. > auth: Debug: master out: USER#0111#011eepp68#011home=/buzones1/e/eepp68#011QUOTA_RULE=*:BYTES= > lmtp(8235): Debug: auth input: eepp68 home=/buzones1/e/eepp68 quota_rule=*:bytes= > lmtp(8235): Debug: Added userdb setting: plugin/quota_rule=*:bytes= Here comes the interesting part, ldap "userdb" has returned "QUOTA_RULE=*:BYTES=" and this empty value seems to correspond to 0 Bytes as you can read from the resulting Quota rule: > lmtp(8235, eepp68): Debug: Quota rule: root=User quota mailbox=* bytes=0 messages=0 The "bytes=..." value should be different from 0. http://wiki2.dovecot.org/Quota/Configuration#LDAP states that user_attrs is used only if you use userdb ldap. Where is the "userdb" ldap in your doveconf -n output and where do you get the user information like quota from? > Any idea about where is the problem? The default is not taken since your LDAP query returns a quota_rule with an empty bytes= value when the mailquotasize entry is missing. Regards Daniel -- https://plus.google.com/103021802792276734820