From 53605786a01141c3896c9bfb04deef971b62742e Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 17 Sep 2014 18:19:26 +0800 Subject: [PATCH] recalculate.mailbox.quota --- 3-faq-howto/recalculate.mailbox.quota.md | 30 ++++++++++++++++++++++++ URLs.md | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 3-faq-howto/recalculate.mailbox.quota.md diff --git a/3-faq-howto/recalculate.mailbox.quota.md b/3-faq-howto/recalculate.mailbox.quota.md new file mode 100644 index 00000000..f4fd42cf --- /dev/null +++ b/3-faq-howto/recalculate.mailbox.quota.md @@ -0,0 +1,30 @@ + +# How to recalculate mailbox quota +[TOC] + +iRedMail enables dict quota since v0.7.0, dict quota is recalculated only if the quota goes below zero. + +* For MySQL and PostgreSQL backend: +
+#
+# ---- For iRedMail-0.7.4 and later versions ----
+#
+mysql> USE vmail;
+mysql> DELETE FROM used_quota WHERE username='user@domain.ltd';
+
+#
+# ---- For iRedMail-0.7.3 and earlier versions ----
+#
+mysql> USE vmail;
+mysql> UPDATE mailbox SET bytes=-1,messages=-1 WHERE username='user@domain.ltd';
+
+ +* For OpenLDAP backend: +
+mysql> USE iredadmin;
+mysql> DELETE FROM used_quota WHERE username='user@domain.ltd';
+
+ +Re-login to webmail will get correct quota size. + +If there're records for non-exist mail users in table ```used_quota```, please delete them. diff --git a/URLs.md b/URLs.md index 3cee16eb..31a0a6b3 100644 --- a/URLs.md +++ b/URLs.md @@ -3,7 +3,7 @@ -http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Recalculate.Mailbox.Quota + 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/why.iredmail.append.timestamp.in.maildir.path http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Add.Mail.Forwarding.Address @@ -15,6 +15,7 @@ http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Turn.On.Debug.Mod http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Monitor.Incoming.and.Outgoing.Mails.with.BCC http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/SQL/Create.Mail.Alias +[DONE]http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Recalculate.Mailbox.Quota [duplicate]http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Allow.Insecure.POP3.IMAP.Connection.without.STARTTLS [in troubleshooting yet]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/Allow.User.to.Send.Email.without.Authentication