One of our client cPanel Default email account’s disk space usage was not updating and having issue with disk space usage on his account, While checking email accounts in his cPanel I noticed that the space usage on some accounts, especially the default email account is not updating. I checked the mailbox of his default email account via Webmail and noticed nothing wrong there. Then question is , how it’s showing extra MB of space usage in cPanel? I decided to check the back end for any hidden files/folders which causing this problem.
I have checked the cur, new, tmp, .Trash and .Send folders in its mail directory (/home/username/mail/) and cleared those directories, restarted the cPanel but nothing get changed. The size of the default email account still showing the same disk space usage.
This might be due to the cPanel configuration problem or due to any problem happened while running the default cPanel scripts. We can update it manually.
To resolve it i found the following solution, Please do the following steps to fix it.
Method 1
- SSH to server as root user.
- Execute the following script:
/scripts/generate_maildirsize --confirm --allaccounts --verbose cpaneluser
please Replace “cpaneluser” with your cPanel user name having issue.
It will fix the issue, Just login into the cPanel once again and check the disk usage now.
Method 2
If the above method does not work , you can use the following steps:
- SSH to server as root user.
- Locate the following files email_accounts.yaml and email_accounts.cache and clear/delete.
- Now check the disk space usage of the email accounts in cPanel and verify that the disk space usage is showing correctly.
That’s all to do, Please Give your opinion below if you experience any issues or to discuss your ideas and experiences.