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 "test...@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 "testa...@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 "testa...@m.tld"

and got:

# doveadm quota get -u
"testa...@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
"test...@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 "test...@m.tld"

# doveadm quota get -u "test...@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 "testa...@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.

Reply via email to