How can I recalculate a maildirsize usage value?

I have a few mailboxes that are using a different amount of space in qmail’s eyes vs what the CP calculates with the “Calculate Box Size” features. For these mailboxes, the maildirsize shows a much higher usage number, certainly due to direct manipulation of the Maildir with rsync in the past.

I have tried many ways to recalculate that file, according to recommendations found elsewhere, but the file always comes back with the same values as if it is being duplicated from another source (perhaps the InterWorx SQL database). How can I accurately and permanently recalculate it?

Hi jimp

Good question

There is a file you can run, but I cannot think of it just now, all I have in mind cvspernsfix.pex, but I do not think that is the file to run

It maybe tommorow before I can check for the file, but it is listed in /bin from iworx home folder and you specify a specific domain

I hope that helps

Many thanks

John

Hi jimp

Sorry it’s varpermsfix.pex

So in ssh, ~iworx/bin/varpermsfix.pex <siteworx account>

This corrects the var folder, which should include qmail for the siteworx account I believe

Many thanks and I hope that helps but sorry if I’m wrong

Many thanks

John

That script will recalculate the mailbox quotas? The script name sounds like it only fixes permissions. Are there any negative side effects I should be aware of before running it?

Hi jimp

I thought of varpermsfix as it could be a permission issue on the quota, but sorry if I’m wrong

Running the script I believe should not have any adverse effects as all it does is to correctly set the permissions on the var folder of the siteworx account

Appreciate if you could update your post once it’s been resolved

Many thanks

John

Hi Jimp
Sorry, once you have run varpermsfix.pex, you may need to sun storage.pex, or wait for the cron job to run
Many thanks
John

Thanks for the effort, but neither script made a difference on the maildirsize value. I’m going to open a support ticket with InterWorx.

For future reference, in case anyone is looking for how to do this in the future, removing and recreating the maildirsize file forces it to update. ? To do so,first delete the file via the command line. Then, in SiteWorx, next to the mail account you would like recalculated, click “Edit” and then “save”–you don’t actually have to make any changes in the ‘Edit’ box. This will rebuild the file.