summaryrefslogtreecommitdiffstats
path: root/doc/wiki/Plugins.QuotaClone.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /doc/wiki/Plugins.QuotaClone.txt
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/wiki/Plugins.QuotaClone.txt')
-rw-r--r--doc/wiki/Plugins.QuotaClone.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/wiki/Plugins.QuotaClone.txt b/doc/wiki/Plugins.QuotaClone.txt
new file mode 100644
index 0000000..56325f7
--- /dev/null
+++ b/doc/wiki/Plugins.QuotaClone.txt
@@ -0,0 +1,37 @@
+Quota Clone Plugin
+==================
+
+(Requires v2.2.17+)
+
+Quota clone plugin is useful when you want to store everybody's current quota
+usage to a database, but you don't want to use the database as the
+authoritative quota database. For example you might want to access everybody's
+quota via Redis (or with SQL database, Redis is example here), but you don't
+store the Redis database permanently so it could become empty once in a while.
+In this case you can use e.g. <dict-file> [Quota.Dict.txt] or <count>
+[Quota.Count.txt] as the authoritative quota database and make a copy of the
+quota usage to Redis. From Redis you could then once in a while gather
+everybody's current quota usage and send it to yet another place (e.g. for
+statistics handling).
+
+Every time quota is updated, the value is updated to the cloned dict. There are
+race conditions with it so the quota may not always be 100% correct. The old
+value is always replaced with the new one though (not just
+incremented/decremented) so the cloned quota is never too much wrong.
+
+The keys that are written to:
+
+ * priv/quota/storage - storage usage in bytes
+ * priv/quota/messages - count of messages
+
+Configuration
+-------------
+
+---%<-------------------------------------------------------------------------
+mail_plugins = $mail_plugins quota quota_clone
+plugin {
+ quota_clone_dict = redis:host=127.0.0.1:port=6379
+}
+---%<-------------------------------------------------------------------------
+
+(This file was created from the wiki on 2019-06-19 12:42)