From a7218e588f500909849d0f4d7ad3d8aa7d77878b Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 18 Sep 2014 16:27:28 +0800 Subject: [PATCH] How to ignore Trash folder in mailbox quota --- URLs.md | 4 ++-- ignore.trash.folder.in.quota.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ignore.trash.folder.in.quota.md diff --git a/URLs.md b/URLs.md index afed672c..7b7a9799 100644 --- a/URLs.md +++ b/URLs.md @@ -1,6 +1,6 @@ # wiki FAQ -* http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Ignore.Trash.Folder.in.Quota + * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Add.Mail.Forwarding.Address * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Add.Mail.Forwarding.Address * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Add.Maillist.with.phpLDAPadmin @@ -11,7 +11,7 @@ * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/SQL/Create.Mail.Alias * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Turn.On.Debug.Mode.In.Amavisd - +* [DONE] http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Ignore.Trash.Folder.in.Quota * [DONE] http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/why.iredmail.append.timestamp.in.maildir.path * [DONE] http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Recalculate.Mailbox.Quota * [DONE] http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Allow.User.to.Send.Email.without.Authentication diff --git a/ignore.trash.folder.in.quota.md b/ignore.trash.folder.in.quota.md new file mode 100644 index 00000000..c376251a --- /dev/null +++ b/ignore.trash.folder.in.quota.md @@ -0,0 +1,19 @@ + +# How to ignore Trash folder in mailbox quota + +Quota\_rule is overrode in `/etc/dovecot/dovecot-mysql.conf` or `/etc/dovecot/dovecot-ldap.conf`, so please change them instead. If no per-user quota rules found, Dovecot will use 'quota_ruleX' in dovecot.conf. + +For example, with OpenLDAP backend, you have `/etc/dovecot/dovecot-ldap.conf`, update it with 'Trash:ignore' like below: + +
+user_attrs      = ...,mailQuota=quota_rule=*:bytes=%$,=quota_rule2=Trash:ignore
+
+ +With MySQL backend, update `/etc/dovecot/dovecot-mysql.conf`: + +
+user_query = SELECT ... \
+                   CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
+                   'Trash:ignore' AS quota_rule2 \
+                   FROM ...
+