summaryrefslogtreecommitdiffstats
path: root/doc/wiki/Plugins.Trash.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/wiki/Plugins.Trash.txt')
-rw-r--r--doc/wiki/Plugins.Trash.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/wiki/Plugins.Trash.txt b/doc/wiki/Plugins.Trash.txt
new file mode 100644
index 0000000..a37905d
--- /dev/null
+++ b/doc/wiki/Plugins.Trash.txt
@@ -0,0 +1,41 @@
+Trash Plugin
+============
+
+This requires <quota plugin> [Quota.txt] to be loaded and configured to use
+non- <FS quota> [Quota.FS.txt].
+
+Normally if a message can't be saved/copied because it would bring user over
+quota, the save/copy fails with "Quota exceeded" error. The trash plugin can be
+used to avoid such situations by making Dovecot automatically expunge oldest
+messages from configured mailboxes until the message can be saved. If the new
+message is large enough that it wouldn't fit even if all messages from
+configured mailboxes were expunged, then none are and user gets the "Quota
+exceeded" error.
+
+The configuration file is a text file where each line is in format: '<priority>
+<mailbox name>'. Mails are deleted in lowest -> highest priority number order.
+
+dovecot.conf:
+
+---%<-------------------------------------------------------------------------
+mail_plugins = $mail_plugins quota trash
+
+plugin {
+ trash = /etc/dovecot/dovecot-trash.conf.ext
+}
+---%<-------------------------------------------------------------------------
+
+dovecot-trash.conf.ext:
+
+---%<-------------------------------------------------------------------------
+# Spam mailbox is emptied before Trash
+1 Spam
+# Trash mailbox is emptied before Sent
+2 Trash
+# If both Sent and "Sent Messages" mailboxes exist, the next oldest message
+# to be deleted is looked up from both of the mailboxes.
+3 Sent
+3 Sent Messages
+---%<-------------------------------------------------------------------------
+
+(This file was created from the wiki on 2019-06-19 12:42)