Skip to main content

Email's disk space usage shows wrong in cPanel

The article helps to fix the issue if email account's size shows zero in cPanel but contains data

Scott avatar
Written by Scott
Updated over 5 years ago

Once I checked the disk space usage of email accounts of one domain via cPanel and all shows zero. But when checking in backend, all email accounts contain so many emails.

We can fix this very easily if we have root SSH access to the server. Just follow the below steps.
​

Step 1. SSH to the server as root.
Step 2. Run the below command.

# /scripts/generate_maildirsize --confirm --allaccounts --verbose username

Β (Replace 'username' with the username of the problematic account)
​

The issue should be fixed then, but sometimes the cPanel cache shows same result. Hence, remove cPanel cache.


Access the hidden directory '.cpanel' residing under the home directory of the problematic user and remove or rename the directory 'caches' .


Now check cPanel again.
​

Did this answer your question?