Compare commits

...

2 Commits

Author SHA1 Message Date
missytake
76c53b667f cleanup(dovecot): remove redundant max_cache_file_size config 2026-04-14 00:38:03 +02:00
missytake
eb78fcf2e4 feat: remove dovecot.index.cache files if larger than 500k
fix #644
2026-04-14 00:37:55 +02:00
2 changed files with 4 additions and 6 deletions

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 (

View File

@@ -70,12 +70,6 @@ userdb {
# Mailboxes are stored in the "mail" directory of the vmail user home.
mail_location = maildir:{{ config.mailboxes_dir }}/%u
# index/cache files are not very useful for chatmail relay operations
# but it's not clear how to disable them completely.
# According to https://doc.dovecot.org/2.3/settings/advanced/#core_setting-mail_cache_max_size
# if the cache file becomes larger than the specified size, it is truncated by dovecot
mail_cache_max_size = 500K
namespace inbox {
inbox = yes