On 12 February 2019 at 19:55 Robert Moskowitz via dovecot dovecot@dovecot.org wrote:
On 2/12/19 12:38 PM, Aki Tuomi via dovecot wrote:
On 12 February 2019 at 18:23 Robert Moskowitz via dovecot dovecot@dovecot.org wrote:
Does dovecot compute that values for quota2 with each email it updates for the user? Or only an incremental change?
I ask because I am looking at migrating all the user mail from the old server to the new and building a new sql database. All I see is:
dovecot-dict-sql.conf.ext: connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix password=$Postfix_Database_Password map { pattern = priv/quota/storage table = quota2 username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota2 username_field = username value_field = messages }
what is actually done with this table?
thanks
dict-sql converts the mappings into SQL statements.
But does dovecot check out the current bytes used and # of messages and resets quota2, or only uses this latest operation (add message, delete message...) to adjust quota2?
If the later how to reset quota2 to the current reality?
thanks
Dovecot keeps the quota current, although dict quota has been known to be bit bad at this.
We nowadays recommend using count quota instead and use quota_clone to copy the quota state to database. It is more accurate.
Aki