[Dovecot] Problem with quota recreation

Uroš Gruber uros.gruber at gmail.com
Fri Mar 19 20:45:48 EET 2010


I'm refering to current usage not limits. Here is my quota-sql config

user_query = \
  SELECT '/var/vmail/%d/%n' as home, 'dict:user::proxy::quota' AS quota,
concat('*:storage=', quotaLimit,'M') AS quota_rule \
  FROM mailAccount WHERE username = '%u' AND domain = '%d' AND isLocked =

and actual quota config

map {
  pattern = priv/quota/storage
  table = mailAccount
  username_field = username
  value_field = usageBytes
map {
  pattern = priv/quota/messages
  table = mailAccount
  username_field = username
  value_field = usageMessages

Select from mysql select username, usageBytes, usageMessages from
mailAccount where username='uros at gruber.si' gives me

uros at gruber.si NULL NULL

actual usageBytes and usageMessages only change on moving messages between
folders or on delivery. But I need recalculate after migration from cyrus to
dovecote via cyrus2dovecote. I tried with GETQUOTAROOT but without any luck.

Best regards


On Fri, Mar 19, 2010 at 3:16 PM, Steffen Kaiser <
skdovecot at smail.inf.fh-brs.de> wrote:

> Hash: SHA1
> On Fri, 19 Mar 2010, Uroš Gruber wrote:
>  only problem is when i migrate mailbox from cyrus to dovecot and when
>> bytes
>> and messages is set to 0. I tried with x GETQUOTAROOT Inbox but  the quota
>> usage is not recalculated and when a new message is delivered quota is
>> calculated only on the new message. Any help would be greatly appreciated.
> Hmm, what does "0" means for cyrus, unlimited too?
> see http://wiki.dovecot.org/Quota/1.1
> "bytes: Quota limit in bytes, 0 means unlimited."
> Or do you refer to the actual (current) quota and not the limits?
> In that case, just remove the entries.
> Regards,
> - -- Steffen Kaiser
> Version: GnuPG v1.4.6 (GNU/Linux)
> FYSZ1sPvxfybTZOzcf8oViaI2bhtkYd2VblLU+0+w9FlPwvSY5oOfhr5r70EyhB+
> NN42/RfXo91oVM2rK9+tg71HdnsBNJVj+a2I+PTPW5lP7KzHnCV9cDTlHV0845L1
> vMuZTUBsaiPM4k4RRR7l7LzN6gvhLSVLl123SojgMX61G6smmP5jZlIqffb0kY4v
> MDFEbuwr0S04HBKPzTwoUFanRnBvwI9byUmJfEQswqbUzFvgRnSUT2L0Vcq4V6SB
> zGDmq9FPRQCGzbcupPOe1EPV/jqSthI/mzRC1+4yLe4IPDIio4fQ6g==
> =Bn6e

More information about the dovecot mailing list