[Solved] Default email account’s disk space usage not updating – cPanel

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]

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

7 thoughts on “[Solved] Default email account’s disk space usage not updating – cPanel

  1. # /scripts/generate_maildirsize –confirm –allaccounts –verbose cpaneluser

    Great It worked. Thanks a lot

  2. 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?

Leave a Reply

Your email address will not be published. Required fields are marked *