Hi
I´m trying to figure how to proper configure postfix+dovecot to enforce quotas from a AD (ldap). I´m using the following configuration:
dovecot.conf:
... protocol lda { mail_plugins = quota .. }
auth default {
passdb ldap { args = /etc/dovecot/dovecot-ldap-pass.conf } userdb ldap { args = /etc/dovecot/dovecot-ldap.conf } ... }
plugin { quota = maildir:User quota #quota_rule = *:storage=2M // tried with and without this line }
dovecot-ldap.conf: ... user_attrs = sAMAccountName=mail=maildir:/var/vmail/%$/Maildir, quotaMail=quota_rule=*:storage=%$ user_filter = (&(objectClass=person)(|(mail=%u)(sAMAccountName=%u)))
pass_attrs = sAMAaccountName=user,userPassword=password pass_filter = (&(objectClass=person)(sAMAaccountName=%u))
Quotas are set by the quotaMail in AD. And here is the log:
Aug 9 11:41:37 vm29 dovecot: auth(default): master in: USER#0111#011testeti@teste.mydomain#011service=deliver Aug 9 11:41:37 vm29 dovecot: auth(default): ldap(testeti@teste.mydomain): user search: base=dc=mydomain scope=subtree filter=(&(objectClass=person)(| (mail=testeti@teste.mydomain)(sAMAccountName=testeti@teste.mydomain))) fields=sAMAccountName,quotaMail Aug 9 11:41:37 vm29 dovecot: auth(default): ldap(testeti@teste.mydomain): result: sAMAccountName(mail=maildir:/var/vmail/%$/Maildir)=maildir:/var/vmail/testeti/Maildir Aug 9 11:41:37 vm29 dovecot: auth(default): master out: USER#0111#011testeti@teste.mydomain#011mail=maildir:/var/vmail/testeti/Maildir Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): auth input: mail=maildir:/var/vmail/testeti/Maildir Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): Quota root: name=User quota backend=maildir args= Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): maildir: data=/var/vmail/testeti/Maildir Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): maildir++: root=/var/vmail/testeti/Maildir, index=, control=, inbox=/var/vmail/testeti/Maildir Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): Namespace : Using permissions from /var/vmail/testeti/Maildir: mode=0700 gid=-1 Aug 9 11:41:37 vm29 dovecot: deliver(testeti@teste.mydomain): msgid=201008091142.53089.lyra@pop-pr.rnp.br: saved mail to INBOX
There´s no quota_rule in logs... uncomenting the line quota_rule = *:storage=2M I got quota, bu only this static one, and not per-user. What I´m doing wrong?
Btw... with static configuration the maildirsize file is created, but without static configuration it´s not (well.. no quota_rule...).
thanks in advance,
-- Christian Lyra POP-PR - RNP