Hello. Used next version of dovecot: # dovecot --version 20130205 (03a0af22100d+) Quota configuration: plugin { quota = dict:Domain quota:%d:redis:host=127.0.0.1:prefix=domain/ quota_rule = *:storage=0 quota_rule2 = Trash:storage=+5%% quota2 = dict:User quota::redis:host=127.0.0.1:prefix=user/ quota2_rule = *:storage=0 quota2_rule2 = Trash:storage=+5%% } Problem: incorrect quota calculations. Dovecot gets size and messages count of all domain from last user in list. In 2.1 works fine. Steps to reproduce problem: 1. install dovecot 2. create over 50 users with e-mails 3. execute: doveadm quota recalc -A 4. execute: doveadm quota get -A 5. get count of all users message: sum in some application result of execution doveadm quota get -A | grep MESSAGE | grep 'User quota' | awk '{print $5}' (139443 messages) 6. get size of all users message: sum in some application result of execution doveadm quota get -A | grep STORAGE | grep 'User quota' | awk '{print $5}' (2304399 Kb) 7. look at some user user at example.org Domain quota STORAGE 82408 51200000 0 user at example.org Domain quota MESSAGE 1078 - 0 user at example.org User quota STORAGE 0 209715200 0 user at example.org User quota MESSAGE 0 - 0 and see 1078 messages and 82408 Kb in domain quota 8. look at last user in list z at example.org Domain quota STORAGE 82408 51200000 0 z at example.org Domain quota MESSAGE 1078 - 0 z at example.org User quota STORAGE 82408 209715200 0 z at example.org User quota MESSAGE 1078 - 0 and see matching values.
Timo Sirainen
2013-Feb-22 12:12 UTC
[Dovecot] dovecot-2.2: broken domain quota calculation
On 6.2.2013, at 14.07, Evgeny Basov <ya.mwork at yandex.ru> wrote:> Quota configuration: > > plugin { > quota = dict:Domain quota:%d:redis:host=127.0.0.1:prefix=domain/ > quota_rule = *:storage=0 > quota_rule2 = Trash:storage=+5%% > quota2 = dict:User quota::redis:host=127.0.0.1:prefix=user/ > quota2_rule = *:storage=0 > quota2_rule2 = Trash:storage=+5%% > } > > Problem: incorrect quota calculations. Dovecot gets size and messages > count of all domain from last user in list. In 2.1 works fine. > > Steps to reproduce problem: > > 1. install dovecot > 2. create over 50 users with e-mails > 3. execute: doveadm quota recalc -AAre you talking about the recalc command not counting the domain quota correctly? It has never worked. That's the main reason that feature isn't being advertised much. Nowadays it would at least be possible to implement by iterating through users within the domain.
22.02.2013 16:12, Timo Sirainen ?????:> Nowadays it would at least be possible to implement by iterating through users within the domain.Hello. It would be great to implement this function. Thank you.