[Dovecot] quota dict (mysql)

Peter Veerman pveerman at nemo.kabelfoon.net
Thu Oct 5 11:41:24 UTC 2006


Hi,

I have dovecot configured to make use of the dict (mysql) plugin in
order to keep track of the used quota.
First, as you can see in the mysql table output below it seems that
values aren't stored correctly.
Secondly I get all kinds of database related errors in my mail logs.
The (relevant) sections of the configuration files are also included below.
My question is, what am I doing wrong?

Peter



mysql> select * from quota;
+------------------+-------+---------+
| username         | path  | current |
+------------------+-------+---------+
| userc at domain1    | 0     |       0 |
| usera at domain1    | 0     |       0 |
| userb at domain1    | 0     |       0 |
| userb at domain1    | 5417  |       0 |
| userb at domain1    | 937   |       0 |
| userb at domain1    | 3724  |       0 |
| userb at domain1    | -9141 |       0 |
| userb at domain1    | 4887  |       0 |
| userb at domain1    | -4887 |       0 |
| usera at domain2    | 0     |       0 |
| usera at domain1    | 3134  |       0 |
| usera at domain1    | 2177  |       0 |
| usera at domain1    | 5137  |       0 |
| usera at domain1    | 4953  |       0 |
+------------------+-------+---------+
14 rows in set (0.03 sec)




dovecot.conf:

dict {
  quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-quota.conf
}

plugin {
  quota = dict:storage=10240 proxy::quotadict
}




dovecot-dict-quota.conf:

connect = host=localhost dbname=postfix user=postfix password=*******
table = quota
select_field = current
where_field = path
username_field = username





dovecot.log gives:
Oct 02 23:25:49 Info: imap-login: Login: user=<user at domain.net>,
method=plain, rip=88.211.149.123, lip=10.0.0.4, TLS
Oct 02 23:25:49 Info: IMAP(user at domain.net): Effective uid=125, gid=125
Oct 02 23:25:49 Info: IMAP(user at domain.net): Loading modules from
directory: /usr/local/lib/dovecot/imap
Oct 02 23:25:49 Info: IMAP(user at domain.net): Module loaded:
/usr/local/lib/dovecot/imap/lib01_quota_plugin.so
Oct 02 23:25:49 Info: IMAP(user at domain.net): Module loaded:
/usr/local/lib/dovecot/imap/lib02_imap_quota_plugin.so
Oct 02 23:25:49 Info: IMAP(user at domain.net): Namespace: type=private,
prefix=INBOX., sep=., inbox=yes, hidden=no, subscriptions=no
Oct 02 23:25:49 Info: IMAP(user at domain.net): maildir:
data=/data/postfix/virtual/domain.net/user
Oct 02 23:25:49 Info: IMAP(user at domain.net): maildir:
root=/data/postfix/virtual/domain.net/user,
index=/data/postfix/virtual/domain.net/user, control=, inbox=
Oct 02 23:25:49 Info: IMAP(user at domain.net): dict quota: uri =
proxy::quotadict
Oct 02 23:25:49 Info: IMAP(user at domain.net): dict quota: byte limit =
524288000
Oct 02 23:25:49 Info: IMAP(user at domain.net): dict quota: count limit = 0
Oct 02 23:25:49 Info: dict: mysql: Connected to localhost (postfix)
Oct 02 23:25:55 Info: dict: mysql: Connected to localhost (postfix)
Oct 02 23:25:56 Info: dict: mysql: Connected to localhost (postfix)
Oct 02 23:26:37 Info: dict: mysql: Connected to localhost (postfix)
Oct 02 23:27:07 Info: imap-login: Aborted login: rip=10.0.0.25,
lip=10.0.0.22, TLS
Oct 02 23:27:11 Info: dict: mysql: Connected to localhost (postfix)




mail.debug gives:
Oct  2 23:26:39 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:39 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:39 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:39 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:40 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:41 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:42 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:42 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:42 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:48 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:48 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota
Oct  2 23:26:48 bubbles dovecot: IMAP(user at domain.net): dict_quota:
Couldn't update quota




More information about the dovecot mailing list