-
-
Notifications
You must be signed in to change notification settings - Fork 34
Replace expiry "find" commands with a new chatmaild.expire python module + a reporting one #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f40805a
to
4eeb887
Compare
There was a problem hiding this 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.
…er-of-mailboxes ram
…them immediately, provide a few command line options to select
…ional, defaulting to where it is on chatmail relays
There was a problem hiding this 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.
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).