Cpanel: Error invalid maildir size file

Sometimes an email account goes over quota and the quota can’t be adjusted due to the following error:

Error invalid maildir size file

The following commands ran as root will resolve most email quota issues for a Cpanel account, including incorrect quota calculations. Substitute <cpaneluser> with the Cpanel user which owns the email account having issues.

cd /home/<cpaneluser>/mail/
rm -f maildirsize
/scripts/generate_maildirsize --confirm --allaccounts --verbose <cpaneluser>
cd ../.cpanel
rm -f email_accounts
rm -f email_accounts*

Comments are closed.