1

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?

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: update quota

iredmail.org/wiki/index.php?title=IRedMail/FAQ/Recalculate.Mailbox.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

3

Re: update quota

Should I do this for each user?

4

Re: update quota

nerdtron09 wrote:

Should I do this for each user?

Yes.
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.

5

Re: update quota

As always, support here is great.

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