[Dovecot] quota dict mysql not working (2.0.beta4)

Michael Kliewe mkliewe at gmx.de
Wed May 5 21:34:00 EEST 2010


Ok, found the problem and fixed it.

Two things had to be done:

------------------------------------------------
master.cnf

service dict {
  extra_groups = vmail
  unix_listener dict {
    group = vmail
    mode = 0660
  }
}
------------------------------------------------

After restart I got another problem which I fixed with this patch  
(Thanks Andrey!)

------------------------------------------------
-- dovecot-2.0.beta4-25/src/lib-sql/driver-mysql.c     2010-04-02  
16:47:13.000000000 +0400
+++ dovecot-2.0.beta4/src/lib-sql/driver-mysql.c        2010-05-01  
03:29:02.000000000 +0400
@@ -630,7 +631,9 @@
                struct mysql_result *my_result = (struct mysql_result  
*)result;

                rows = mysql_affected_rows(my_result->conn->mysql);
-               i_assert(rows != (my_ulonglong)-1);
+               if (mysql_errno(my_result->conn->mysql))
+                       i_assert(rows != (my_ulonglong)-1);
+               else rows = 0;
                *ctx->head->affected_rows = rows;
        }
        sql_result_unref(result);
------------------------------------------------

I also wrote Timo an email regarding this problem. Hope he fixes it  
soon.

Michael


On May 5, 2010, at 3:11 PM, Michael Kliewe wrote:

> Hi,
>
> I have a problem when setting up the quota dict plugin. I get this  
> error in my logfile when trying to store a draft (APPEND):
>
> May 05 14:44:53 imap(test at domain.de): Error: net_connect_unix(/usr/ 
> local/var/run/dovecot/dict) failed: Permission denied
> May 05 14:44:53 imap(test at domain.de): Error: Internal quota  
> calculation error
>
> The file is there:
>
> user at imap01:/$ ls -al /usr/local/var/run/dovecot/
> total 20
> drwxr-xr-x 4 root    root    4096 2010-05-05 14:44 .
> drwxr-xr-x 3 root    root    4096 2010-04-20 18:50 ..
> srw------- 1 root    root       0 2010-05-05 14:44 anvil
> srw------- 1 root    root       0 2010-05-05 14:44 anvil-auth-penalty
> srw------- 1 root    root       0 2010-05-05 14:44 auth-client
> srw------- 1 root    root       0 2010-05-05 14:44 auth-master
> srw------- 1 root    root       0 2010-05-05 14:44 auth-userdb
> srw------- 1 dovecot root       0 2010-05-05 14:44 auth-worker
> srw------- 1 root    root       0 2010-05-05 14:44 config
> srw------- 1 root    root       0 2010-05-05 14:44 dict
> srw-rw-rw- 1 root    root       0 2010-05-05 14:44 dns-client
> lrwxrwxrwx 1 root    root      35 2010-05-05 14:44 dovecot.conf -> / 
> usr/local/etc/dovecot/dovecot.conf
> drwxr-xr-x 2 root    root    4096 2010-04-20 18:50 empty
> srw-rw-rw- 1 root    root       0 2010-05-05 14:44 lmtp
> drwxr-x--- 2 root    dovecot 4096 2010-05-05 14:44 login
> -rw------- 1 root    root       5 2010-05-05 14:44 master.pid
>
> What is going on there, how can I fix this?
>
> Michael



More information about the dovecot mailing list