[Dovecot] dict, quota, mysql and postfixadmin

Johan Hendriks j.hendriks at schavemaker.com
Tue Feb 3 12:09:31 EET 2009


Hello all

I am trying to get quota working with dict and mysql but i get an error.

This is my dovecot.conf file ( relevant part ) i hope ;-)

######################
protocol imap {
 listen = *:143
 imap_client_workarounds = delay-newmail outlook-idle netscape-eoh 
tb-extra-mailbox-sep
 imap_max_line_length = 65536
mail_plugins = quota imap_quota
}

protocol pop3 {
 listen = *:110
 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
 pop3_uidl_format = %08Xu%08Xv
 mail_plugins = quota
}

protocol lda {
 postmaster_address = postmaster at testserver.com
 sendmail_path = /usr/local/sbin/sendmail
 auth_socket_path = /var/run/dovecot/auth-master
 mail_plugins = cmusieve
 mail_plugins = quota
}

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

## Default quota values
plugin {
  quota = dict:::proxy::quotadict
  quota_rule = *:storage=50M:messages=10000
}
######################

my dovecot-sql.conf

#####################
driver = mysql
default_pass_scheme = MD5-CRYPT

connect = host=localhost dbname=postfix user=postfix password=12345

password_query = SELECT password FROM mailbox WHERE username = '%u' AND 
active =  '1'
user_query = SELECT maildir, 1004 AS uid, 1004 AS gid, 
CONCAT('dict:storage=',floor(quota/1000),' proxy::quotadict') as quota 
FROM mailbox WHERE username = '%u' AND active = '1'
######################

and my dovecot-dict-quota.conf

######################
driver = mysql
connect = host=localhost dbname=postfix user=postfix password=12345
default_pass_scheme = MD5-CRYPT
table = quota
select_field = current
where_field = path
username_field = username
######################

When i try to login i see the following in my log file

Feb  2 21:46:57 beasty dovecot: imap-login: Login: 
user=<j.hendriks at testserver.com>, method=PLAIN, rip=127.0.0.1, lip=
127.0.0.1, secured
Feb  2 21:46:57 beasty dovecot: IMAP(j.hendriks at testserver.com): 
Dictionary URI is missing ':': quotadict
Feb  2 21:46:57 beasty dovecot: Fatal: IMAP(j.hendriks at testserver.com): 
Couldn't create quota root: dict:storage=20480
0 proxy::quotadict

If i update the quota of the user then the value in the 
(dict:storage=204800) logfile do change so it reads my quota set with 
postfxadmin.

What am i doing wrong?

regards,
Johan Hendriks


More information about the dovecot mailing list