30 Jan
2015
30 Jan
'15
5:03 p.m.
Hello.
I'm tried to use domain quota:
plugin {
quota = dict:Domain quota:%d:redis:host=127.0.0.1:prefix=domain/
quota_rule = *:storage=0
quota2 = dict:User quota::redis:host=127.0.0.1:prefix=user/
quota2_rule = *:storage=0
quota3_rule = Trash:storage=+5%%
}
but got next problem with it. Init state:
# doveadm quota get -u "testacc@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 27070
204800
13
Domain quota MESSAGE 21
0 User quota STORAGE 27068
0 User quota MESSAGE 18
0
# doveadm quota get -u "testacc2@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 27070
204800
13
Domain quota MESSAGE 21
0 User quota STORAGE 2
0 User quota MESSAGE 3
0
Make recalc:
# doveadm quota recalc -u "testacc2@m.tld"
and got:
# doveadm quota get -u "testacc2@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 2
204800
0
Domain quota MESSAGE 3
0 User quota STORAGE 2
0 User quota MESSAGE 3
0 # doveadm quota get -u "testacc@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 2
204800
0
Domain quota MESSAGE 3
0 User quota STORAGE 27068
0 User quota MESSAGE 18
0
All values of all domain quota are equals.
Execute recalc one more time:
# doveadm quota recalc -u "testacc@m.tld"
# doveadm quota get -u "testacc@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 27068
204800
13
Domain quota MESSAGE 18
0 User quota STORAGE 27068
0 User quota MESSAGE 18
0
# doveadm quota get -u "testacc2@m.tld"
Quota name Type Value
Limit
%
Domain quota STORAGE 27068
204800
13
Domain quota MESSAGE 18
0 User quota STORAGE 2
0 User quota MESSAGE 3
0
How can I get fast realtime changed domain quota? Used dovecot 2.2.13.