feat: remove dovecot.index.cache files if larger than 500k

fix #644
This commit is contained in:
missytake
2026-04-14 00:31:08 +02:00
parent 74326a8c54
commit eb78fcf2e4

View File

@@ -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 (