summaryrefslogtreecommitdiffstats
path: root/doc/wiki/Quota.Count.txt
blob: 4e461ec8fc6350a39cd4c8c2660f33953d6fade6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Count quota
===========

(Requires Dovecot v2.2.19+)

The quota is tracked internally within Dovecot's index files. Each mailbox's
quota is tracked separately and when the current quota usage is wanted to be
known, the mailboxes' quotas are summed up together. To get the best
performance mailbox list indexes should be enabled.

*WARNING*: If you're switching from some other quota backend to count, make
sure that all the mails have their virtual sizes already indexed. Otherwise
there may be a significant performance hit when Dovecot starts opening all the
mails to get their sizes. You can help to avoid this by accessing the mailbox
vsizes for all the users before doing the configuration change:'doveadm mailbox
status -u user@domain vsize '*''

Configuration
-------------

---%<-------------------------------------------------------------------------
mailbox_list_index = yes
# Avoid spending excessive time waiting for the quota calculation to finish
when
# mails' vsizes aren't already cached. If this many mails are opened, finish
the
# quota calculation on background in indexer-worker process. Mail deliveries
will
# be assumed to succeed, and explicit quota lookups will return internal error.
# (v2.2.28+)
mail_vsize_bg_after_count = 100

plugin {
  # 10MB quota limit
  quota = count:User quota
  quota_rule = *:storage=10M

  # This is required - it uses "virtual sizes" rather than "physical sizes" for
quota counting:
  quota_vsizes = yes
}
---%<-------------------------------------------------------------------------

(This file was created from the wiki on 2019-06-19 12:42)