[Dovecot] dovecot-2.2: broken domain quota calculation
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:
install dovecot
create over 50 users with e-mails
execute: doveadm quota recalc -A
execute: doveadm quota get -A
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)
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)
look at some user
user@example.org Domain quota STORAGE 82408 51200000
0 user@example.org Domain quota MESSAGE 10780 user@example.org User quota STORAGE 0 209715200
0 user@example.org User quota MESSAGE 00
and see 1078 messages and 82408 Kb in domain quota
look at last user in list
z@example.org Domain quota STORAGE 82408 51200000
0 z@example.org Domain quota MESSAGE 10780 z@example.org User quota STORAGE 82408 209715200
0 z@example.org User quota MESSAGE 10780
and see matching values.
On 6.2.2013, at 14.07, Evgeny Basov <ya.mwork@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:
- install dovecot
- create over 50 users with e-mails
- execute: doveadm quota recalc -A
Are 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.
participants (2)
-
Evgeny Basov
-
Timo Sirainen