Symptoms
The mail usage for the email accounts in the "Email Accounts" section is not updated and is not accurate after removing emails from the accounts.
Description
The Email address shows an incorrect of disk space, caused by the maildirsize file for the email accounts not having been updated yet.
Workaround
You will first want to move the maildirsize files out of the way as the below script will not overwrite the files.
find /home/CPUSER/mail/ -type f -name maildirsize | while read line; do mv -v $line{,.bak}; done
You will want to run the following script from root with the cPanel user in question to have them regenerate all of the maildirsize files and ensure their accuracy within the WHM.
/usr/local/cpanel/scripts/generate_maildirsize --user=CPUSER --confirm
You will be able to run the following command in order to perform the script for all of the cPanel accounts on the server.
/usr/local/cpanel/scripts/generate_maildirsize --allaccounts --confirm
There is also an internal improvement case that has been opened on the issue.