My sysadmin email address which server notifications come to started getting emails about a mailbox quota getting close on a cPanel server. I logged into the client’s control panel to increase their mailbox quota, I found the account, doubled the quota and went to save it when I got the following error message:
invalid maildirsize file
While I didn’t actually check the size of the user’s mailbox in file size, which I would have done with:
du -sch /home/username/mail/domain.com/john.smith/*
I would have found that the actual usage was near zero, while cPanel was reporting the mail box usage was over 200mb.
The cause of the invalid maildirsize file error message is a corruption in the maildirsize file – as the error might suggest. It is no longer accurately keeping track of the usage properly. The solution is simple, all you need to do is delete the file and it will rebuild itself without a problem (will occur on new activity like a login or modification of quota).
There are two common ways of deleting it. First is to login to your server via SSH. The follow example applies where the email address is email@example.com, and the account username is “username”. Substitute the values in bold.
rm -f maildirsize
That’s all there is to it for SSH.
The second method is probably more easier for the laymen, FTP. Login to the account with the primary login details (e.g. username will be the account username [avoid the sub user FTP accounts], and the password the account password). Browse to:
Delete file named maildirsize
Problem solved. The disk usage dropped back to zero and I’ve not received any more annoying emails since, and the quota reset didn’t give me a invalid maildirsize file error message.
- Moving From No Control Panel Servers to a cPanel Server
- Synchronise cPanel DNS Cluster from Command Line
- Find What IP Address cPanel Site Is Using via Command Line
- Error message “The file is either corrupted or does not have the latest credentials associated with recovery service. (ID: 34513) “
- Understanding cPanel clustered DNS and Setup
- Emails Not Sending – defer (111): Connection refused (Exim) and SMTP Tweak
- apf: command not found
- ISAPI Filter ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll’ could not be loaded due to a configuration problem
4 Responses to Modifying cPanel Mailbox Quota Errors “invalid maildirsize file”