Dovecot domain quota

Jiri Bourek bourek at thinline.cz
Mon Oct 13 08:47:56 UTC 2014


On 13.10.2014 00:08, Gedalya wrote:
> 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 accountbartmann at debian.jd  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.

I remember the same thing.

> 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';

This won't accout for changes made during the recalc - although to my 
knowledge it's still the best solution in this type of configuration.

When I was trying to make both user and domain quotas work properly, the 
only way I figured out was to track domain quota as group quota in the 
filesystem. Forcing users/domains to have separate system user and group 
of course.


More information about the dovecot mailing list