Topic: update quota

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:

So it seems our migration to roundcube is going pretty well. I now starting to copy the old Maildirs folder (from squirrelmail) of the old server to the roundcube Maildir folder. I just check the permissions and ownership to make they are correct in roundcube.

The old emails can be successfully viewed on roundcube webmail now. Even attachements are there. But I noticed that the quota for the user is still 0%.
Let's say user1 have 30MB in the old mailbox, I created his account in roundcube and allocated 50MB in Quota. Then I transferred his old mailbox to roundcube. When user1 logins, all mail are there (including attachments) but the Quota says he is using 0% of 50MB. Now I tried sending him an new email in roundcube just to test if the qutoa will increment. And it did increase to 1%
Seems like the Quota in Roundcube doesn't count the "old emails" when it computes for the quota.

Any idea how to fix this?



Re: update quota

# ---- For iRedMail-0.7.4 and later versions ----
mysql> USE vmail;
mysql> DELETE FROM used_quota WHERE username='user@domain.ltd';

This will force the quota to refresh


Re: update quota

Should I do this for each user?


Re: update quota

nerdtron09 wrote:

Should I do this for each user?

if this is a fresh server, you can delete all records in this database. Dovecot will recalculate mailbox quota if there's no record for this user in this SQL table.


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee


Re: update quota

As always, support here is great.

Thanks again. I think, with this one, I'll make a script.