feat: Automatic per-user quota-keeping aka "make quota warnings a thing of the past" #926
Closed
feat: Automatic per-user quota-keeping aka "make quota warnings a thing of the past" #926
Conversation
Replace daily timer-based message expire script with Dovecot quota-warning-triggered cleanup. When a user reaches 90% of their mailbox quota Dovecot calls the new script which removes the largest and oldest messages until usage drops below 80%. The daily `chatmail-expire` service now only handles deletion of inactive user mailboxes.
Contributor
Author
|
this quota PR needs to be redone, and become additional I think. We should not directly substitute global unconditional expiry with it, but do it in addition for now, and maybe put it to grafana or so. Closing for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace daily timer-based message expire script with Dovecot quota-warning-triggered cleanup.
This mechanism prevents a user from reaching their quota, staying below the warning level.
When a user reaches 90% of their mailbox quota Dovecot calls the new script which removes the largest and oldest messages until usage drops below 80%. Probably those thresholds need tweaking so chatmail clients don't show unneccessary "quota" warnings to users.
There is no "overall" automatic storage housekeeping but it could potentially be added by having "disk" quota at 90% lower the dovecot per-user quota, thus removing more messages from everyeone. Or account registration could be closed or so. This global aspect is out of scope of this PR which only is about making per-user quota management automatic.