[Dovecot] dovecot-2.2: broken domain quota calculation

Evgeny Basov ya.mwork at yandex.ru
Wed Feb 6 14:07:42 EET 2013


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. 



More information about the dovecot mailing list