Email Accounts Showing Incorrect Disk Usage After Deleting Emails
Symptoms
After removing emails from the email accounts, the disk usage for the email accounts in the “Email Accounts” section is not updated or accurate.
Description
The Email address shows incorrect disk space usage due to the maildirsize file for the email accounts not being updated.
Workaround
Please note that “CPUSER” in the following examples must be replaced with the cPanel username of the account in question.
- Access the server’s command line as the ‘root’ user via SSH or “Terminal” in WHM.
- Move the maildirsize files out of the way with the following script.
find /home/CPUSER/mail/ -type f -name maildirsize | while read line; do mv -v $line{,.$(date +%s)}; done
- Regenerate the cPanel user’s
maildirsize
files./usr/local/cpanel/scripts/generate_maildirsize --confirm CPUSER
- Move the cPanel user’s
email_accounts.json
aside.mv -v /home/CPUSER/.cpanel/email_accounts.json{,.$(date +%s)}