Koozali.org: home of the SME Server

How to Recalculate quota for ALL mail accounts

Offline edb

  • *
  • 546
  • +0/-0
How to Recalculate quota for ALL mail accounts
« on: December 14, 2022, 08:07:48 PM »
Can someone tell me how to recalculate the current usage for mail quotas?
After deleting many messages the current usage has not gone down so it must need to be re-indexed or something.
Any help appreciated.
......

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: How to Recalculate quota for ALL mail accounts
« Reply #1 on: December 14, 2022, 11:14:50 PM »
quota are usually real time.

However, there is not such thing as mail quota. There is file quota. This means your mails aka files in user hole Maildir folder but also ALL files created by the user ANYWHERE on the server.  Particularly in the home folder, any ibays or any shared folder.

Mail are usually a small fraction of the whole files owned by the user.  If your removed 5000 mails for a user, there are chances you only removed few ko and this will make little to no difference. But remiving dozen of video files of 600Mo-3Go each will make a difference. And yes do not forget to empty the recycle bin of samba if activated !

Offline edb

  • *
  • 546
  • +0/-0
Re: How to Recalculate quota for ALL mail accounts
« Reply #2 on: December 15, 2022, 04:43:58 PM »
Thank you for your input, however we only have email and no other files.
So in this case if I delete 20,000 messages from the users IMAP account it should lower the current usage by several GB under "Collaberation-Quotas" but the current usage for that user never changes.
If I instead go to "Disk Usage" it will properly display the correct usage info for that user.
I was thinking it must be a cache file that perhaps isn't being updated properly. Not a big deal but I just thought maybe there was a command that would get it to recalculate or something.

Oh I should also state that the grace and absolute limits are set to 0.

Perhaps a reboot would fix the issue but it more of a cosmetic thing since the Disk Usage properly reports the correct info.
« Last Edit: December 15, 2022, 05:01:48 PM by edb »
......

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: How to Recalculate quota for ALL mail accounts
« Reply #3 on: December 16, 2022, 01:45:54 AM »
Do yoi have everythin on a single partition or your user data is on a different disk?

can you confirm your filesystem is xfs?


https://unix.stackexchange.com/questions/156897/why-does-du-and-quota-results-not-match/156903#156903
« Last Edit: December 16, 2022, 01:49:45 AM by Jean-Philippe Pialasse »