From eb83a0aa3f6244e00132b7188802b40f092e1e4a Mon Sep 17 00:00:00 2001 From: Veit Date: Fri, 21 Feb 2020 23:33:26 +0100 Subject: [PATCH] Update dovecot documentation - added quota2 table dict template for dovecot 1.2 and newer to dovecot documentation --- DOCUMENTS/DOVECOT.txt | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/DOCUMENTS/DOVECOT.txt b/DOCUMENTS/DOVECOT.txt index 4eb44520..e73fe90d 100644 --- a/DOCUMENTS/DOVECOT.txt +++ b/DOCUMENTS/DOVECOT.txt @@ -183,7 +183,9 @@ for PostgreSQL: user_query = SELECT maildir, 1001 AS uid, 1001 AS gid, 'dict:storage=' || floor(quota/1000) || '::proxy::quota' as quota FROM mailbox WHERE username = '%u' AND active='1' -Create file dovecot-dict-quota.conf: +Create file dovecot-dict-quota.conf. + +For dovecot 1.0 & 1.1, use this as a template: driver = mysql connect = host=localhost dbname=postfix user=postfix password=postfix @@ -193,6 +195,22 @@ select_field = current where_field = path username_field = username +If you use dovecot 1.2 or newer, use this: + +connect = host=localhost dbname=postfix user=postfix password=postfix +map { + pattern = priv/quota/storage + table = quota2 + username_field = username + value_field = bytes +} +map { + pattern = priv/quota/messages + table = quota2 + username_field = username + value_field = messages +} + Create database in Mysql: (This is automatically done by postfixadmin's setup.php)