For 2.4 you would use
acl_driver = vfile acl_global_path = /etc/dovecot/dovecot.acl lazy_expunge_mailbox = EXPUNGED/ lazy_expunge_only_last_instance = yes
namespace inbox { mailbox EXPUNGED { autoexpunge = 32days autoexpunge_max_mails = 100000 } mailbox \Drafts { lazy_expunge_mailbox = } }
namespace ns { hidden = yes list = no prefix = EXPUNGED/ subscriptions = no
mailbox EXPUNGED { quota_ignore = yes } }
mail_plugins { acl = yes lazy_expunge = yes }
but you never did explain "how it does not work".
Aki
On 15/06/2026 19:17 EEST Randolf Richardson via dovecot <dovecot@dovecot.org> wrote:
One of the Dovecot repository maintainers on GitHub recommended sending an eMail to you regarding the issue I encountered:
Documentation for lazy-expunge doesn't work https://github.com/dovecot/documentation/issues/1555
I converted from Dovecot 2.3 to Dovecot 2.4.1, which was not a minor upgrade. Anyway, I can't get the lazy-expunge plugin to work in 2.4.1 now. Here's my configuration file from 2.3 -- how can I get this working in 2.4.1? Thanks.
namespace inbox { mailbox EXPUNGED { autoexpunge = 32days autoexpunge_max_mails = 100000 #auto = create } }
Namespace for lazy_expunge plugin
namespace { prefix = EXPUNGED/ hidden = yes list = no subscriptions = no separator = / location = maildir:~/Maildir.deleted:INDEX= }
mail_plugins = $mail_plugins lazy_expunge acl plugin {
Move expunged messages into the .EXPUNGED namespace
lazy_expunge = EXPUNGED/
Only move to expunged storage if this is the last copy of the
message in the user“s account lazy_expunge_only_last_instance = yes
Exclude Drafts from lazy expunging
lazy_expunge_exclude = \Drafts
Copy of each message is done with hard links whenever possible
maildir_copy_with_hardlinks = yes
Define ACL so that user cannot list the .EXPUNGED mailbox
Example entry: .EXPUNGED owner rwstipekxa
acl = vfile:/etc/dovecot/dovecot.acl
dovecot.acl contains one line: EXPUNGED owner ip
Expunged messages most likely don't want to be included in quota:
quota_rule = EXPUNGED:ignore } #lazy_expunge_mailbox = EXPUNGED
Here's an example of someone else who encountered the same problem: https://www.dovecot.org/mailman3/archives/list/dovecot@dovecot.org/thr ead/25BXSHQWGQQ3ACVZSYF3O3LC4WROTUCI/
Randolf Richardson, CNA - randolf@inter-corporate.com Inter-Corporate Computer & Network Services, Inc. Beautiful British Columbia, Canada https://www.inter-corporate.com/
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org