KNOWNHOST WIKI

User Tools

Site Tools


control-panels:cpanel-whm:maildir-not-updating-and-cpanel-email-disk-usage-incorrect

This is an old revision of the document!


Mialdir is Not Updating and cPanel eMail Account Disk Space Usage is Incorrect


If you log into cPanel and notice that the disk space usage for an email account is incorrect as compared to what is computed via SSH, it may be because maildir is not updating.

To test, log into SSH, and try to trigger the maildirsize file to be regenerated. To do this for the default email account, run the following:

mv /home/cpaneluser/mail/maildirsize /home/cpaneluser/mail/maildirsize.bak

To do this for any other non-default account, run this (substituting the account name 'emailaccount' for the account whose maildirsize file is being regenerated):

mv /home/cpaneluser/mail/domain.com/emailaccount/maildirsize /home/cpaneluser/mail/domain.com/emailaccount/maildirsize.bak

For example, you would run this command for support@myuniquedomain.tld owned by cPanel user myunique:

mv /home/myunique/mail/myuniquedomain.tld/support/maildirsize /home/myunique/mail/myuniquedomain.tld/support/maildirsize.bak

Log back into cPanel and visit the Email Accounts section to determine whether the cached email account's disk space usage is shown, or if it is showing an updated calculation.

If the cached information is still shown, you can run the following command to forcefully regenerate the maildir file:

/scripts/generate_maildirsize --confirm --allaccounts --verbose cpaneluser

You should see output like the following:

Checking user emailaccount@domain.com
Calculating diskusage and diskcount from reading files
Writing /home/cpaneluser/mail/domain.com/emailaccount/maildirsize for user cpaneluser

You could try running the following command to recalculate this as well, which appears to the same command ran by the cPanel script noted above:

/usr/bin/doveadm quota recalc -u emailaccount@domain.com

You should now be able to log into cPanel and have it show the correct disk space usage for the account(s).

control-panels/cpanel-whm/maildir-not-updating-and-cpanel-email-disk-usage-incorrect.1568145622.txt.gz · Last modified: 2019/09/10 15:00 by Karson N.