From 5306160d454c8a7fdf16968f90b5d3302609c6e2 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sun, 7 Apr 2024 04:49:23 +0000 Subject: default --- etc/dovecot/conf.d/15-mailboxes.conf | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 etc/dovecot/conf.d/15-mailboxes.conf (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf new file mode 100644 index 00000000..71076d48 --- /dev/null +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -0,0 +1,86 @@ +## +## Mailbox definitions +## + +# Each mailbox is specified in a separate mailbox section. The section name +# specifies the mailbox name. If it has spaces, you can put the name +# "in quotes". These sections can contain the following mailbox settings: +# +# auto: +# Indicates whether the mailbox with this name is automatically created +# implicitly when it is first accessed. The user can also be automatically +# subscribed to the mailbox after creation. The following values are +# defined for this setting: +# +# no - Never created automatically. +# create - Automatically created, but no automatic subscription. +# subscribe - Automatically created and subscribed. +# +# special_use: +# A space-separated list of SPECIAL-USE flags (RFC 6154) to use for the +# mailbox. There are no validity checks, so you could specify anything +# you want in here, but it's not a good idea to use flags other than the +# standard ones specified in the RFC: +# +# \All - This (virtual) mailbox presents all messages in the +# user's message store. +# \Archive - This mailbox is used to archive messages. +# \Drafts - This mailbox is used to hold draft messages. +# \Flagged - This (virtual) mailbox presents all messages in the +# user's message store marked with the IMAP \Flagged flag. +# \Important - This (virtual) mailbox presents all messages in the +# user's message store deemed important to user. +# \Junk - This mailbox is where messages deemed to be junk mail +# are held. +# \Sent - This mailbox is used to hold copies of messages that +# have been sent. +# \Trash - This mailbox is used to hold messages that have been +# deleted. +# +# comment: +# Defines a default comment or note associated with the mailbox. This +# value is accessible through the IMAP METADATA mailbox entries +# "/shared/comment" and "/private/comment". Users with sufficient +# privileges can override the default value for entries with a custom +# value. + +# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf. +namespace inbox { + # These mailboxes are widely used and could perhaps be created automatically: + mailbox Drafts { + special_use = \Drafts + } + mailbox Junk { + special_use = \Junk + } + mailbox Trash { + special_use = \Trash + } + + # For \Sent mailboxes there are two widely used names. We'll mark both of + # them as \Sent. User typically deletes one of them if duplicates are created. + mailbox Sent { + special_use = \Sent + } + mailbox "Sent Messages" { + special_use = \Sent + } + + # If you have a virtual "All messages" mailbox: + #mailbox virtual/All { + # special_use = \All + # comment = All my messages + #} + + # If you have a virtual "Flagged" mailbox: + #mailbox virtual/Flagged { + # special_use = \Flagged + # comment = All my flagged messages + #} + + # If you have a virtual "Important" mailbox: + #mailbox virtual/Important { + # special_use = \Important + # comment = All my important messages + #} +} -- cgit v1.2.3-70-g09d2 From 7f64ae790c90e7922869aa9cd9d6a18a561b9715 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Mon, 8 Apr 2024 10:32:09 +0000 Subject: feat: auto subscribe mailboxes, remove unneeded mailbox --- etc/dovecot/conf.d/15-mailboxes.conf | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf index 71076d48..95f99394 100644 --- a/etc/dovecot/conf.d/15-mailboxes.conf +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -49,21 +49,30 @@ namespace inbox { # These mailboxes are widely used and could perhaps be created automatically: mailbox Drafts { special_use = \Drafts + auto = subscribe } mailbox Junk { special_use = \Junk + auto = subscribe } mailbox Trash { special_use = \Trash + auto = subscribe } # For \Sent mailboxes there are two widely used names. We'll mark both of # them as \Sent. User typically deletes one of them if duplicates are created. mailbox Sent { special_use = \Sent + auto = subscribe } - mailbox "Sent Messages" { - special_use = \Sent + #mailbox "Sent Messages" { + # special_use = \Sent + #} + + mailbox Archive { + special_use = \Archive + auto = subscribe } # If you have a virtual "All messages" mailbox: -- cgit v1.2.3-70-g09d2 From 61b8c165b12e773739278fcdb7b1235a8d189992 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 19 Jul 2024 01:55:01 +0000 Subject: dovecot auto delete old emails in Junk and Trash mailbox --- etc/dovecot/conf.d/15-mailboxes.conf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf index 95f99394..409c791c 100644 --- a/etc/dovecot/conf.d/15-mailboxes.conf +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -54,10 +54,14 @@ namespace inbox { mailbox Junk { special_use = \Junk auto = subscribe + # https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge + # https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259 + autoexpunge = 40d } mailbox Trash { special_use = \Trash auto = subscribe + autoexpunge = 40d } # For \Sent mailboxes there are two widely used names. We'll mark both of -- cgit v1.2.3-70-g09d2 From 6bac2ca29b53cd34b90db952dae084b5a10b7117 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 19 Jul 2024 02:01:28 +0000 Subject: dovecot change auto delete configs dovecot no auto delete Junk, read junk first to determine if it is spam. Trash only auto delete after 10 days, because consider in the future I may only do backup weekly, 10 days can make sure it is backuped. --- etc/dovecot/conf.d/15-mailboxes.conf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf index 409c791c..39e44737 100644 --- a/etc/dovecot/conf.d/15-mailboxes.conf +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -54,14 +54,13 @@ namespace inbox { mailbox Junk { special_use = \Junk auto = subscribe - # https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge - # https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259 - autoexpunge = 40d } mailbox Trash { special_use = \Trash auto = subscribe - autoexpunge = 40d + # https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge + # https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259 + autoexpunge = 10d } # For \Sent mailboxes there are two widely used names. We'll mark both of -- cgit v1.2.3-70-g09d2 From 0b8ee2af84085c13f817e4c630c8000a89b45e2c Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 19 Jul 2024 02:05:29 +0000 Subject: update --- etc/dovecot/conf.d/15-mailboxes.conf | 1 + 1 file changed, 1 insertion(+) (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf index 39e44737..a4f8ca0c 100644 --- a/etc/dovecot/conf.d/15-mailboxes.conf +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -60,6 +60,7 @@ namespace inbox { auto = subscribe # https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge # https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259 + # https://doc.dovecot.org/settings/types/#time autoexpunge = 10d } -- cgit v1.2.3-70-g09d2 From e2818cfe0149940034e583bc6982e7ce7039c071 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 19 Jul 2024 02:09:19 +0000 Subject: dovecot longer time auto delete trash, because my config only duplicity will backup it so maybe keep it longer --- etc/dovecot/conf.d/15-mailboxes.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc/dovecot/conf.d/15-mailboxes.conf') diff --git a/etc/dovecot/conf.d/15-mailboxes.conf b/etc/dovecot/conf.d/15-mailboxes.conf index a4f8ca0c..5b2eebae 100644 --- a/etc/dovecot/conf.d/15-mailboxes.conf +++ b/etc/dovecot/conf.d/15-mailboxes.conf @@ -61,7 +61,7 @@ namespace inbox { # https://doc.dovecot.org/configuration_manual/namespace/#core_setting-namespace/mailbox/autoexpunge # https://github.com/LukeSmithxyz/emailwiz/blob/558c4de108a472eca70abca20888de2981ff17ca/emailwiz.sh#L259 # https://doc.dovecot.org/settings/types/#time - autoexpunge = 10d + autoexpunge = 30d } # For \Sent mailboxes there are two widely used names. We'll mark both of -- cgit v1.2.3-70-g09d2