~ubuntu-branches/ubuntu/utopic/dovecot/utopic-proposed

« back to all changes in this revision

Viewing changes to doc/wiki/Quota.Dict.txt

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (4.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20140108093549-i72o93pux8p0dlaf
Tags: 1:2.2.9-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
limits. The current quota is kept in a dictionary. The available dictionaries
6
6
are:
7
7
 
8
 
 * MySQL
9
 
 * PostgreSQL
 
8
 * SQL
 
9
 * Redis
10
10
 * Flat file
11
11
 
12
12
The quota root format is:
28
28
NOTE: The dictionary stores only the current quota usage. The quota limits are
29
29
still configured in userdb the same way as with other quota backends.
30
30
 
 
31
NOTE2: The quota dict may delete rows from the database when it wants to
 
32
rebuild the quota. You must use a separate table that contains only the quota
 
33
information, or you'll lose the other data.
 
34
 
31
35
Examples
32
36
--------
33
37
 
34
38
---%<-------------------------------------------------------------------------
35
39
plugin {
36
40
  # SQL backend:
37
 
  quota = dict:User quota::proxy::quota
 
41
  quota = dict:User quota::proxy::sqlquota
 
42
  # Redis backend (v2.1.9+):
 
43
  quota = dict:User quota::redis:host=127.0.0.1:prefix=user/
38
44
  # file backend:
39
45
  quota = dict:User quota::file:%h/Maildir/dovecot-quota
40
46
 
41
47
  quota_rule = *:storage=10M:messages=1000
42
48
}
43
49
dict {
44
 
  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
 
50
  sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
45
51
}
46
52
---%<-------------------------------------------------------------------------
47
53
 
48
54
The above SQL example uses dictionary proxy process (see below), because SQL
49
 
libraries aren't linked to all Dovecot binaries. The file example accesses the
50
 
file directly.
 
55
libraries aren't linked to all Dovecot binaries. The file and Redis examples
 
56
use direct access.
51
57
 
52
58
Example 'dovecot-dict-sql.conf.ext':
53
59
 
82
88
privileges.
83
89
 
84
90
---%<-------------------------------------------------------------------------
85
 
INSERT INTO table (bytes,username) VALUES ('112497180','foo@spam.dom') ON
 
91
INSERT INTO table (bytes,username) VALUES ('112497180','foo@example.com') ON
86
92
DUPLICATE KEY UPDATE bytes='112497180';
87
 
INSERT INTO table (messages,username) VALUES ('1743','foo@spam.dom') ON
 
93
INSERT INTO table (messages,username) VALUES ('1743','foo@example.com') ON
88
94
DUPLICATE KEY UPDATE messages='1743';
89
95
UPDATE table SET bytes=bytes-14433,messages=messages-2 WHERE username =
90
 
'foo@spam.dom';
 
96
'foo@example.com';
 
97
DELETE FROM table WHERE username = 'foo@example.com';
91
98
---%<-------------------------------------------------------------------------
92
99
 
93
100
If you're using PostgreSQL, you'll need a trigger:
155
162
 
156
163
See <Dict.txt> for more information, especially about permission issues.
157
164
 
158
 
(This file was created from the wiki on 2012-04-23 04:42)
 
165
(This file was created from the wiki on 2013-11-24 04:42)