[Dovecot] dovecot lda and quota plugin with mysql

J4 junk4 at klunky.co.uk
Thu Jan 13 18:22:48 EET 2011


Dear all,

    I have postfix delivering to dovecot lda (via spamassinassin).  I
have configured the quota plugin, but it does not seem to respect the
details in the quota table in mysql.  The query I have used looks
correct to me, and the user can connect to the database.

I wonder if someone might put me straight on the misconfiguration. 

Best wishes, j.

# Relevant portions of dovecot -n:
mail_plugins: quota imap_quota

lda:
  log_path:
  auth_socket_path: /var/run/dovecot/auth-master
  postmaster_address: postmaster at test.info
  mail_plugins: sieve quota

plugin:
  quota: dict:user::proxy::quotadict
dict:
  quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf


# cat /etc/dovecot/dovecot-dict-quota.conf
connect = host=localhost dbname=fred user=fred password=freddy
map {
  pattern = priv/quota/storage
  table = quota
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota
  username_field = username
  value_field = messages
}

# mysql table
mysql> select * from quota;
+-----------------------------+-----------+----------+
| username                    | bytes     | messages |
+-----------------------------+-----------+----------+
| root at test.info       |     19524 |       18 |
| bob at test.info     |      9420 |        6 |
| test at klunky.co.uk          |      4662 |        4 |
| bob1 at test.info    |     19284 |       13 |
| bob2 at test.info      | 173906172 |     5702 |
| postmaster at test.info |     10587 |        9 |
| bob3 at test.info  |      3695 |        2 |
+-----------------------------+-----------+----------+
7 rows in set (0.00 sec)




More information about the dovecot mailing list