From 75ec7c5a5ad6dd6505a056247fac3d013d0f7611 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 13 Feb 2022 18:06:26 -0800 Subject: [PATCH] email: Add more special-use IMAP folders, set autoexpunge to 60days A mail client should not create these special folders if they see existing folders with the special-use flag set on them. However, if a mail clients does create a folder and does not set special-use folder, the server will set the flag so that all other mail clients can see the flag. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .../conf.d/90-freedombox-mailboxes.conf | 72 +++++++++++++------ 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/plinth/modules/email/data/etc/dovecot/conf.d/90-freedombox-mailboxes.conf b/plinth/modules/email/data/etc/dovecot/conf.d/90-freedombox-mailboxes.conf index 1456360ce..209d932b5 100644 --- a/plinth/modules/email/data/etc/dovecot/conf.d/90-freedombox-mailboxes.conf +++ b/plinth/modules/email/data/etc/dovecot/conf.d/90-freedombox-mailboxes.conf @@ -1,43 +1,71 @@ # Direct edits to this file will be lost! # Manage your settings on FreedomBox +# Mark various mailboxes with special use flags (RFC 6154). Various names used +# in mail clients for mailboxes: https://www.imapwiki.org/SpecialUse + namespace inbox { + # Archive mailbox Archive { auto = subscribe special_use = \Archive } + mailbox Archives { # Thunderbird + auto = no + special_use = \Archive + } + + # Drafts mailbox Drafts { auto = subscribe special_use = \Drafts } - mailbox Junk { - auto = subscribe - autoexpunge = 30d - special_use = \Junk - } - mailbox Trash { - auto = subscribe - autoexpunge = 30d - special_use = \Trash - } - - mailbox INBOX.Junk { - auto = no - autoexpunge = 30d - special_use = \Junk - } - mailbox INBOX.Trash { - auto = no - autoexpunge = 30d - special_use = \Trash - } + # Sent mailbox Sent { auto = subscribe special_use = \Sent } - mailbox "Sent Messages" { + mailbox "Sent Items" { # Outlook 2010/2013 auto = no special_use = \Sent } + mailbox "Sent Messages" { # iOS + auto = no + special_use = \Sent + } + + # Junk + mailbox Junk { + auto = subscribe + autoexpunge = 60d + special_use = \Junk + } + mailbox Spam { # KMail, K-9 Mail + auto = no + autoexpunge = 60d + special_use = \Junk + } + mailbox "Junk E-mail" { # Outlook 2010 + auto = no + autoexpunge = 60d + special_use = \Junk + } + mailbox INBOX.Junk { + auto = no + autoexpunge = 60d + special_use = \Junk + } + + # Trash + mailbox Trash { + auto = subscribe + autoexpunge = 60d + special_use = \Trash + } + mailbox INBOX.Trash { + auto = no + autoexpunge = 60d + special_use = \Trash + } }