On 10/12/2014 01:28 PM, Filip Bartmann wrote:
After running `doveadm quota recalc -A` I have in my db:
-----------------------------------
+-----------+--------+----------+
| domain    | bytes  | messages |
+-----------+--------+----------+
| debian.jd | 505758 |       81 |
+-----------+--------+----------+
-----------------------------------
whith is from [email protected]  not both accounts at testing VPS 
domain debian.jd. The same is with quota enforcing - quota if enforced on the 
latter of the accounts in /etc/dovecot/users on testing machine or database in 
production machine.

What I do wrong?
As I remember from previous conversations here, this is a limitation of the current design.
The comment in example-config/conf.d/90-quota.conf says:
# Multiple quota roots are also possible, for example this gives each user
# their own 100MB quota and one shared 1GB quota within the domain
It doesn't really support accounting for the *sum* of *multiple storage quotas* within a domain. As a hack: you can just not run quota recalc ;-) or more realistically, separately track user quotas individually (you really should!), and post recalc immediately update the domain by running something like update domain_quota set bytes=(select sum(bytes) from user_quota where username like '%@debian.jd') where domain='debian.jd';

Reply via email to