Quota plugin and director

Aki Tuomi aki.tuomi at open-xchange.com
Thu Mar 19 10:10:06 EET 2020


> On 19/03/2020 10:06 Simone Lazzaris <simone.lazzaris at qcom.it> wrote:
> 
> 
>   
> In data mercoledì 18 marzo 2020 23:08:27 CET, Alessio Cecchi ha scritto:
>  
> > Ciao Simone,
>  
> >
>  
> > why you want each backend to recalc quota only for its managed users and
>  
> > not run "doveadm quota recalc -A" only one time from a backend tha
>  
> > recalc quota for all users?
>  
> >
>  
>  
> Because the indexes are local to the backends.
>  
>  
> If I make the recalc from one backend only, that one will have to reindex all the messages, and it will have the indexes for all users, while right now (and if every backend processes only its users) every backend has 1/10 of all the indexes.
>  
>  
> And another point: I want to switch to count backend (now I'm using maildir++). With this backend, the quota is memorized on the indexes, but if I make all the recalc on one backend only, the others will not have the correct quota on their indexes.
>  
>  
> Right now I've written a python script that iterates over the users, asks to the frontend (via doveadm http) which is the current backend, and then connect (again, doveadm http) to that to perform the recalculation.
>  
> A bit slow but working.
>  
>  
> --
>  
> Simone Lazzaris


If you are using director, you can issue `doveadm quota recalc -A` on director, which will then direct it to correct backend.

For this to work, it requires that you setup doveadm server on the backend, and configure doveadm_port and doveadm_password on director. It also either needs iteratable user database on director, or a list of users in a file, which you can provide with option -F.

Aki


More information about the dovecot mailing list