Symptoms
The disk usage displayed in cPanel / Email Accounts does not reflect the correct amount after messages are removed from an email account.
Cause
The Email Accounts interface reports the usage from the local dovecot-quota file. While the disk usage and RoundCube may show the correct usage, this can lag behind if the quota file has not been rebuilt. This normally only triggers when a new message is received, or an IMAP/POP3 connection is made.
We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-55308.
Resolution
To manually rebuild the quota for a maildir storage user, please follow these steps:
Note: Replace cpuser with the cPanel username in each of the following commands.
- Access the server as the
rootuser using SSH, or the Terminal in WHM. First, remove the Dovecot indexes for the user:
# /scripts/remove_dovecot_index_files --user cpuser
Next, regenerate the
maildirsizefor all users under the account:# /scripts/generate_maildirsize --confirm --allaccounts cpuser
- Finally, log in to Webmail, or send an email from the email address that you want to update the quota for.
Generating a new message and deleting it will allow the usage to update from the cached storage value. To manually rebuild the quota for a mdbox storage user, please follow these steps:
Note: Replace emailuser@domain.tld with the email user with the incorrect usage after deleting emails from Webmail.
Generate a new test message.
# printf 'Subject: quota-kick\nFrom: quota-kick\n\nquota-kick\n' | doveadm save -u emailuser@domain.tld -m INBOX
Clear the new test message from the inbox.
# doveadm expunge -u emailuser@domain.tld mailbox INBOX subject quota-kick
Comments
0 comments
Article is closed for comments.