Modifying cPanel Mailbox Quota Errors “invalid maildirsize file”

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/*

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, and the account username is “username”. Substitute the values in bold.

cd /home/username/mail/
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.

Similar Posts:

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: -1 (from 1 vote)
Modifying cPanel Mailbox Quota Errors "invalid maildirsize file", 5.0 out of 5 based on 1 rating
Tags: , , .

4 Responses to Modifying cPanel Mailbox Quota Errors “invalid maildirsize file”

What are your thoughts?