Hi all,
I'm having a bit of a time trying to get the EXPUNGED mailbox to not display when any mail is moved or deleted.
Here's what I'm running:
Operating System = Debian 11.9
Dovecot = 2.3.13
MUA = Mac OS X Mail 16.0 \(3774.600.62\)
Here is the information I think is relevant:
# cat /etc/dovecot/conf.d/50-expunge.conf
namespace INBOX { mailbox EXPUNGED { autoexpunge = 7days autoexpunge_max_mails = 10000 } }
mail_plugins = $mail_plugins lazy_expunge acl
plugin { lazy_expunge = EXPUNGED quota_rule = EXPUNGED:ignore }
# cat /etc/dovecot/conf.d/90-acl.conf
[...]
plugin { acl = vfile:/etc/dovecot/global-acls:cache_secs=300 }
[...]
# cat /etc/dovecot/global-acls/expunged.acl
EXPUNGED user=masteruser lr
I have also tried setting 'expunged.acl' to the following, with no ACL flags:
EXPUNGED owner
This version doesn't seem to do anything different but that's probably down to me.
No matter what I do with this current configuration, I cannot get the EXPUNGED folder to stop showing after any deletion or move. This point aside, Dovecot's doing almost exactly what I want: all mail moved or deleted ends up in EXPUNGED; I just don't want to see it, nor anyone else with an account on my server ;)
Thanks for your time and any information you can provide.
Pete.
On Jun 4, 2024, at 8:40 AM, Pete Long via dovecot dovecot@dovecot.org wrote:
I'm having a bit of a time trying to get the EXPUNGED mailbox to not display when any mail is moved or deleted.
You should make the name start with a dot like ".EXPUNGED" to hide it from normal folders. See the "example configuration" at https://doc.dovecot.org/configuration_manual/lazy_expunge_plugin/, where it shows, for example:
namespace inbox { mailbox .EXPUNGED { ... lazy_expunge = .EXPUNGED
Here is the information I think is relevant:
As a tip, rather than doing this, send the output of "doveconf -n" to the list in the future. That way other people can see what your full configuration is, rather than guessing.
-- Robert L Mathews
On 4 Jun 2024, at 18:56, Robert L Mathews via dovecot dovecot@dovecot.org wrote:
On Jun 4, 2024, at 8:40 AM, Pete Long via dovecot dovecot@dovecot.org wrote:
I'm having a bit of a time trying to get the EXPUNGED mailbox to not display when any mail is moved or deleted.
You should make the name start with a dot like ".EXPUNGED" to hide it from normal folders. See the "example configuration" at https://doc.dovecot.org/configuration_manual/lazy_expunge_plugin/, where it shows, for example:
namespace inbox { mailbox .EXPUNGED { ... lazy_expunge = .EXPUNGED
Here is the information I think is relevant:
As a tip, rather than doing this, send the output of "doveconf -n" to the list in the future. That way other people can see what your full configuration is, rather than guessing.
Thanks Robert. Here I go.
# dovecot -n # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.13 (cdd19fe3) # OS: Linux 5.10.0-30-amd64 x86_64 Debian 11.9 # Hostname: sulaco.fafflords.co.uk auth_failure_delay = 6 secs auth_master_user_separator = + auth_username_format = %Ln log_path = /var/log/dovecot/dovecot.log mail_location = maildir:~/Maildir mail_plugins = " lazy_expunge acl" mail_privileged_group = mail namespace inbox { inbox = yes location = mailbox .EXPUNGED { autoexpunge = 1 weeks autoexpunge_max_mails = 100000 } mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes } passdb { driver = pam } passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes } plugin { acl = vfile:/etc/dovecot/global-acls:cache_secs=300 lazy_expunge = .EXPUNGED quota_rule = .EXPUNGED:ignore } protocols = " imap" service auth { unix_listener auth-client { mode = 0600 user = Debian-exim } } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 0 } } ssl_cert =
My 50-expunge.conf is now exactly as is shown at https://doc.dovecot.org/configuration_manual/lazy_expunge_plugin/ .
After a restart of Dovecot, I see this in the logs:
Jun 05 08:12:07 imap(pete)<19761><KPYfSB8aj4dWH1ne>: Error: Mailbox Deleted Messages: Lazy-expunge transaction failed: Mailbox Deleted Messages: UID=1 67: lazy_expunge: Couldn't open expunge mailbox: Failed to open mailbox .EXPUNGED: Invalid mailbox name: Begins with hierarchy separator
Should I specify a different seperator for the .EXPUNGED mailbox?
https://doc.dovecot.org/configuration_manual/namespace/#hierarchy-separators
Thanks.
Pete.
On Jun 5, 2024, at 12:21 AM, Pete Long via dovecot dovecot@dovecot.org wrote:
After a restart of Dovecot, I see this in the logs:
Jun 05 08:12:07 imap(pete)<19761><KPYfSB8aj4dWH1ne>: Error: Mailbox Deleted Messages: Lazy-expunge transaction failed: Mailbox Deleted Messages: UID=1 67: lazy_expunge: Couldn't open expunge mailbox: Failed to open mailbox .EXPUNGED: Invalid mailbox name: Begins with hierarchy separator
Hmmm, I'm not sure about that -- in my setup I have something different, with no actual mailbox for it:
namespace { hidden = yes inbox = no list = no location = maildir:~/expunged prefix = .EXPUNGED/ separator = . type = private } plugin { lazy_expunge = .EXPUNGED/ lazy_expunge_only_last_instance = yes ...
Perhaps someone else who has a similar setup to you with it as a mailbox can offer more advice, sorry!
-- Robert L Mathews
participants (2)
-
Pete Long
-
Robert L Mathews