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.
On 30.1.2015 16:03, Evgeny Basov wrote:
Hello.
I'm tried to use domain quota:
Search the list archives. Unless something changed in that regard, domain quotas don't work. When you use recalc, domain quota is updated to values which are valid for last mailbox that was recalculated.
The way we got domain quota working was using filesystem quotas. Naturally this only works if messages (files) are owned by different system groups (one group per domain) and when you're using maildir storage (otherwise no mail count, just size.)
I'm not sure but I think I saw another possible solution mentioned in previous discussions on the topic. Should turn up if you search the archive.
participants (2)
-
Evgeny Basov
-
Jiri Bourek