This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 1 and 2
Revision 1 as of 2006-06-08 20:48:42
Size: 1278
Editor: TimoSirainen
Comment:
Revision 2 as of 2006-06-13 15:11:57
Size: 1293
Comment: minor linguistic improvements
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Dictionary quota backend supports both '''storage''' and '''messages''' quota limits. The current quota is kept in a dictionary. Currently you can use only MySQL as a dictionary backend. (1.0.beta9 and later) The ''dictionary'' quota backend supports both '''storage''' and '''messages''' quota limits. The current quota is kept in a dictionary. Currently (as of 1.0.beta9 and later), the only supported dictionary backend is MySQL.

Dictionary quota

The dictionary quota backend supports both storage and messages quota limits. The current quota is kept in a dictionary. Currently (as of 1.0.beta9 and later), the only supported dictionary backend is MySQL.

The plugin parameter format is dict:<quota limits> <dictionary URI>. For example:

plugin {
  # 10MB and 1000 messages quota limit
  quota = dict:storage=10240:messages=1000 mysql:/etc/dovecot-dict-quota.conf
} 

Example dovecot-dict-quota.conf:

connect = host=localhost dbname=mails user=mailuser
table = dict
select_field = value
where_field = path
username_field = username 

Create the table like this:

create table dict (
  path varchar(255) not null primary key,
  username varchar(255) not null,
  value text
); 

Dictionary proxy server

To avoid each process making a new SQL connection, you can also make all dictionary communications go through a special dict process. Prefix the dictionary URI with proxy:<dictionary server socket path>:. The socket path may be left empty if you haven't changed base_dir setting in dovecot.conf. Otherwise set it to <base_dir>/dict-server. For example:

dict:storage=10240 proxy::mysql:/etc/dovecot-dict-quota.conf 

None: Quota/Dict (last edited 2017-04-12 09:00:54 by TimoSirainen)