I'm returning the quota size from database, why then does it need to be in the maildirsize file?
The logic is: use the values in maildirsize whenever possible since that contains the current space used in addition to the quota limit, then if maildirsize does not exist or is too old or known to be wrong, recreate it by scanning the maildir and querying the database. Dovecot should always create it if it does not exist, but it is not.
How does it define "too old"??? As in, what if I set a 10Mb limit on my users, then get some new drives, and upgrade the limit in the database to 100Mb. How then does dovecot 'upgrade' the users quota's? How would someone force an upgade? Delete all the maildirsize files (when dovecot creates them properly)?
Tim
Linux Counter user #273956