Does domain quota work and how?

Kai Schaetzl maillists at conactive.com
Sat Sep 1 15:19:02 EEST 2018


Kai Schaetzl wrote on Mon, 20 Aug 2018 13:32:59 +0200:

> So, is this config correct for domain quota dictionary-based and how 
> should it work?

Hello,

resolving a problem and knowing that there is a problem are two different 
things. I would still like to know if this config is correct and how the 
domain quota should work, e.g. either user quota or domain quota or are 
user and domain quota handled on the same level and if either one is hit 
the quota is reached? Only then I would be able to check if the quota 
handling is working like it should.

As an additional information.
I noticed today that I didn't get any figures in the quota and 
quota_domain tables. Actually, I had noticed this earlier, but didn't find 
the time to troubleshoot this. But doveadm was showing me figures. As it 
turned out I had still set the connect string only for these two tables to 
the testing database while all other connect strings pointed to the 
correct database. I simply changed the two files and dovecot started 
immediately to use the different database, without a restart. The tables 
where empty at this stage. Dovecot recalculated the quotas and filled the 
tables. Good.

After some checking I can confirm that the user quotas seem to be correct, 
e.g. I counted the message numbers for each user of a domain and compared 
it with the table. That's easier than to compare sizes. 

But the domain quotas are not correct. Dovecot used the quota of the 
*first* user to fill the domain quota. It didn't add the other users to 
it. Note, this is without doveadm, just happens if Dovecot encounters 
empty records I suppose. So, the domain quota is getting recalculated 
wrongly, but not (as I said earlier about doveadm) by using the last user, 
but the first.

Ok, then I tried a doveadm quota recalc -A again and, lo and behold, it 
changed the domain quota values to show the last user's quota. So, the 
recalc in dovecot itself uses the first user, the recalc in doveadm uses 
the last user. But both are wrong.

Kai






More information about the dovecot mailing list