On 2016-04-06 20:38, Timo Sirainen wrote:
On 06 Apr 2016, at 13:43, Tom Sommer mail@tomsommer.dk wrote:
I'm switching quota backend to redis (from maildir++), so all my current usages are reset.
I get that I can do "doveadm quota recalc -A", but it takes forever (and auth processes time out/crash).
It would make much more sense to recalc the usage on login if the current usage is unset. Is there no way to do a recalc-quota-on-first-login?
I'd actually recommend switching to "count" quota: http://wiki2.dovecot.org/Quota/Count
I tried count, but it crashes because of dotlocks :) There is another post about it :)
Then if you also want to see the current quotas in Redis, you can use http://wiki2.dovecot.org/Plugins/QuotaClone
Also, quota-dict is actually able to recalculate quota on missing keys, but specifically in Redis case its INCRBY command succeeds even if it didn't originally exist, so Dovecot doesn't detect it. And it would be pretty wasteful to do a GET every time before INCRBY.
Well, GET is cheap in redis, so - But I get what you are saying.
-- Tom