From eb78fcf2e48ec84742e1891e23c899ce0e2dce9c Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 14 Apr 2026 00:31:08 +0200 Subject: [PATCH] feat: remove dovecot.index.cache files if larger than 500k fix #644 --- chatmaild/src/chatmaild/expire.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chatmaild/src/chatmaild/expire.py b/chatmaild/src/chatmaild/expire.py index 3074073a..621374d6 100644 --- a/chatmaild/src/chatmaild/expire.py +++ b/chatmaild/src/chatmaild/expire.py @@ -145,6 +145,10 @@ class Expiry: changed = True if changed: self.remove_file(f"{mbox.basedir}/maildirsize") + for file in mbox.extrafiles: + if "dovecot.index.cache" in file.path.split("/")[-1]: + if file.size > 500 * 1024: + self.remove_file(file.path) def get_summary(self): return (