[Dovecot] Unknown dict module: mysql

Oli Schacher dovecot at lists.wgwh.ch
Wed Oct 1 11:59:53 EEST 2008


Hi

I'm trying to set up the dict/expiry plugins, but the dict server always
tells me it can't find the modules although they should be there and
compiled in.

System is: Centos 5.2 64 bit, Using rpm from
http://atrpms.net/dist/el5/dovecot/

dovecot --version
1.1.3



Relevant config:

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

plugin {

  quota = dict:::proxy::quotadict
  quota_rule = *:storage=10M:messages=1000
  quota_warning = storage=95%% /usr/local/bin/quotawarning.py 95
  quota_warning2 = storage=75%% /usr/local/bin/quotawarning.py 75

  acl = vfile:/etc/dovecot-acls

  expire = Trash 30 Trash/* 30 Spam 14
  expire_dict = proxy::expire
}

cat /etc/dovecot-dict-quota.conf
connect = host=localhost dbname=*** user=*** password=***
table = quota
select_field = current
where_field = path
username_field = username


Logoutput:
Starting Dovecot Imap: ILoading modules from directory:
/usr/lib64/dovecot/imap
IModule loaded: /usr/lib64/dovecot/imap/lib01_acl_plugin.so
IModule loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so
IModule loaded: /usr/lib64/dovecot/imap/lib11_imap_quota_plugin.so
IModule loaded: /usr/lib64/dovecot/imap/lib20_expire_plugin.so
IEffective uid=65534, gid=65534, home=
IQuota root: name= backend=dict args=:proxy::quotadict
Idict quota: user=dump-capability, uri=proxy::quotadict, enforcing=0
IQuota rule: root= mailbox=* bytes=10485760 (0%) messages=1000 (0%)
IQuota warning: bytes=9961472 (95%) messages=0 (0%)
command=/usr/local/bin/quotawarning.py 95
IQuota warning: bytes=7864320 (75%) messages=0 (0%)
command=/usr/local/bin/quotawarning.py 75




When I try to use the dict (by moving mails via IMAP or by passing
through the lda) I get:

Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me): Loading modules from
directory: /usr/lib64/dovecot/lda
Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me): Module loaded:
/usr/lib64/dovecot/lda/lib10_quota_plugin.so
Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me): Module loaded:
/usr/lib64/dovecot/lda/lib20_expire_plugin.so
Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me): Module loaded:
/usr/lib64/dovecot/lda/lib90_cmusieve_plugin.so
[...]
Oct  1 10:52:15 inet2 dovecot: dict: Unknown dict module: mysql
Oct  1 10:52:15 inet2 dovecot: dict: Failed to initialize dictionary
'quotadict'
Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me):
read(/var/run/dovecot/dict-server) failed: Remote disconnected
Oct  1 10:52:15 inet2 deliver(oli at terrabyte.me): Internal quota
calculation error


I also ran the dict procy through strace to check where it searches for
those modules, and I think it finds the correct files:

strace ./dict 2>&1 | grep mysql -A 1
open("/usr/lib64/dovecot/dict/libdriver_mysql.so", O_RDONLY) = 8
read(8,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\27\0\0\0\0\0\0"...,
832) = 832
--
open("/usr/lib64/mysql/libmysqlclient.so.15", O_RDONLY) = 8
read(8,
"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\2\202\2178\0\0\0"...,
832) = 832


Could anyone give me a hint what I could be doing wrong?

Thanks a lot,
Oli



More information about the dovecot mailing list