From 7d7789a8ceedaf2b427f7e5c1aa4af598d72f231 Mon Sep 17 00:00:00 2001 From: Rob Lister Date: Sun, 3 May 2026 12:22:27 +0100 Subject: [PATCH] Update lazy expunge documentation example I could not get this example to work: ``` 2026-05-03T11:33:38.013704+01:00 turing dovecot: imap(user@example.com)<207022>: Error: Mailbox Trash: Laz y-expunge transaction failed: Mailbox Trash: UID 94164: lazy_expunge: Couldn't open expunge mailbox: Failed to open mailbox .EXPUNGED: Invalid mailbox name: Begins with hierarchy separator ``` Then the ACL didn't apply for some reason. Added `fts_autoindex = no`, as this seems like a good idea to avoid unnecessary fts indexing. Updated config example works on 2.4.3 --- docs/core/plugins/lazy_expunge.md | 35 ++++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/core/plugins/lazy_expunge.md b/docs/core/plugins/lazy_expunge.md index 4edcd9a5e..1c4bd894f 100644 --- a/docs/core/plugins/lazy_expunge.md +++ b/docs/core/plugins/lazy_expunge.md @@ -49,31 +49,32 @@ To move to a mailbox, do NOT add a trailing delimiter to the ::: code-group ```doveconf[dovecot.conf] + +mail_plugins { + lazy_expunge = yes + acl = yes +} + +acl_driver = vfile + namespace inbox { - mailbox .EXPUNGED { + mailbox "-EXPUNGED" { autoexpunge = 7days autoexpunge_max_mails = 100000 + # Expunged messages most likely don't want to be included in quota + quota_ignore = yes + # If you use fulltext search, you may want to exclude: + fts_autoindex = no - # Define ACL so that user cannot list the .EXPUNGED mailbox + # Define ACL so that user cannot list the -EXPUNGED mailbox acl owner { - rights = rwstipekxa + acl_rights = rwstipekxa } } } -mail_plugins { - lazy_expunge = yes - acl = yes -} -acl_driver = vfile +lazy_expunge_mailbox = "-EXPUNGED" -# Move messages to an .EXPUNGED mailbox -lazy_expunge_mailbox = .EXPUNGED - -mailbox .EXPUNGED { - # Expunged messages most likely don't want to be included in quota: - quota_ignore = yes -} ``` ::: @@ -127,10 +128,10 @@ See [[plugin,quota]]. Doveadm can be used to manually clean expunge storage. -Example to delete all messages in `.EXPUNGED` mailbox older than one day: +Example to delete all messages in `-EXPUNGED` mailbox older than one day: ```sh -doveadm expunge mailbox '.EXPUNGED' savedsince 1d +doveadm expunge mailbox -- '-EXPUNGED' savedsince 1d ``` ### Autoexpunge