[Dovecot] quota dict (mysql)
Neil Smith
lists at nsmith.me.uk
Thu Oct 5 13:57:06 UTC 2006
Hi,
I've had this problem as well. I brought it up about a month ago but
nobody responded to my message.
There seems to be a problem in the SQL INSERT query in the source code.
The ‘path’ value is being inserted into the ‘current’ column and via
versa. I swapped them around in the source and recompiled it. That
seemed to solve the insert problem, however there seems to be another
issue I couldn’t solve when using multiple domains. Have a look at the
message I posted last on this:
http://www.dovecot.org/list/dovecot/2006-September/015970.html
This was all done on Dovecot version 1.0.rc6-1 from the Debian Testing
package on a x86 machine. Does anyone know if this was fixed in rc7 or
if anyone is working on it?
I’m afraid I'm not a C(++) coder so can’t really offer much more of an
explanation on this.
Thanks
Neil
Peter Veerman wrote:
> 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