Skip to content

feat: Automatic per-user quota-keeping aka "make quota warnings a thing of the past" #926

Closed
hpk42 wants to merge 1 commit intomainfrom
quota_expire
Closed

feat: Automatic per-user quota-keeping aka "make quota warnings a thing of the past" #926
hpk42 wants to merge 1 commit intomainfrom
quota_expire

Conversation

@hpk42
Copy link
Copy Markdown
Contributor

@hpk42 hpk42 commented Apr 18, 2026

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.

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.
@hpk42
Copy link
Copy Markdown
Contributor Author

hpk42 commented Apr 18, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant