While auditing email accounts in my cPanel I noticed that the space usage on some accounts, especially the default email account is not updated. I checked the mailbox of my default email account via Webmail and noticed nothing there. Then, how it’s showing few MB of space usage in cPanel? Alright, I decided to check the back end for any hidden files/folders which causing this issue.
I checked the cur, new, tmp, .Trash and .Send folders in its mail directory (/home/username/mail/) and cleared those directories, restarted the cPanel. And nothing changed on cPanel. The size usage for the default email account still showing the same disk space usage.
This might be due to the cPanel configuration problem or due to any mess up happened while running the default cPanel scripts to check and update the disk space usage of all the cPanel accounts. We can update it manually.
I found the following solution for this disk usage problem on default email account. Please do the following steps to fix it.
Method I (This will fix this problem)
Step 1 : SSH to server as root user.
# ssh root@host
Step 2 : Execute the following script:
# /scripts/generate_maildirsize --confirm --allaccounts --verbose cpaneluser
Replace “cpaneluser” with the cPanel user name.
For example:
# /scripts/generate_maildirsize --confirm --allaccounts --verbose crybit2012
Here crybit2012 is the user name for that cPanel account.
That’s it! Just login into the cPanel once again and check the disk usage now. 🙂
Method II (If the above method did not work)
If the above method did not help, you can use the following steps:
Step 1 : SSH to server as root user.
Step 2 : 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.
Please check it and let me know if you have any questions.
[This post was created on Sep, 2016]
# /scripts/generate_maildirsize –confirm –allaccounts –verbose cpaneluser
Great It worked. Thanks a lot
You’re welcome Abin
Hi, may I know what is the use of email_accounts.yaml file?
is there any harm if i delete this file?
Yes
Great, Thank you very much.
both options not working please advise
Running a script to recalculate the usage for the default email will make it show 0 MB for a while. But still, eventually, the large number comes back for the empty default account. What’s the best fix for this?