Skip to content

Conversation

hpk42
Copy link
Contributor

@hpk42 hpk42 commented Sep 14, 2025

Before this PR, in https://github.com/chatmail/relay/blob/1.7.0/cmdeploy/src/cmdeploy/dovecot/expunge.cron.j2 we execute a number of "find" commands, which at least on nine.testrun.org take overall 45+ minutes to complete, and access the full directory structure 9 times (kernel caching helps a little). The new chatmaild.expiry traverses all mailboxes only once and has tests.

On the server side, you can run "python -m chatmaild.expire /usr/local/lib/chatmail.ini" to see what it would remove. Only if you specify "--remove" will it actually remove it.

The PR adds also "python -m chatmaild.fsreport" which gives various statistics of file usages, last login times etc. This is not run in any cron job and purely for curiosity purposes (and to help determine what we might do if storage becomes full again).

@hpk42 hpk42 force-pushed the hpk/expiry branch 6 times, most recently from f40805a to 4eeb887 Compare September 16, 2025 10:57
Copy link
Contributor

@missytake missytake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR, looking forward to deploying this :)

Personally I see many good comments to improve this PR, but no blockers.

@link2xt
Copy link
Contributor

link2xt commented Oct 20, 2025

Some comments behind this "hidden conversations" are unresolved:
image
It's literally typos and commented out code, so likely was just not expanded.

Copy link
Contributor

@link2xt link2xt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some unresolved comments, otherwise LGTM.

Also ARCHITECTURE.md still has a line saying "cron --- expunge;", can be removed as expunge does not run with cron anymore.

@hpk42 hpk42 merged commit 0931da2 into main Oct 21, 2025
6 checks passed
@hpk42 hpk42 deleted the hpk/expiry branch October 21, 2025 16:43
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.

4 participants