-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I find this in the logs: 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: net_connect_unix(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Permission denied 2009-06-25 14:10:37 IMAP(dvtest) [29566]: Error: acl: dict iteration failed, can't update dict
although base_dir is just /var/run/dovecot/ .
Dovecot v1.2 changeset: 9157:d14e8b8df025 Conf is attached.
I am trying to get ACL's shared dictionary running:
acl_shared_dict: proxy::acl
dict: acl: pgsql:/usr/local/dovecot-1.2.rc6acl-hook2/etc/dovecot-dict-acl-sql.conf
============
I created the symlink to get map /var/run/dovecot under $install_dir, then I get a crash:
2009-06-25 14:26:53 dict: Error: pgsql: Connect failed to dovecot: could not open certificate file "/root/.postgresql/postgresql.crt": No such file or directory
==> /var/log/postgresql/postgresql-8.1-main.log <== 2009-06-25 14:26:53 CEST LOG: could not accept SSL connection: peer did not return a certificate
==> /var/log/dovecot/dovecot-1.2.log <== 2009-06-25 14:26:58 dict: Error: pgsql: Connect failed to dovecot: could not open certificate file "/root/.postgresql/postgresql.crt": No such file or directory
==> /var/log/postgresql/postgresql-8.1-main.log <== 2009-06-25 14:26:58 CEST LOG: could not accept SSL connection: peer did not return a certificate
==> /var/log/dovecot/dovecot-1.2.log <== 2009-06-25 14:27:03 dict: Error: dict sql iterate failed: Not connected to database 2009-06-25 14:27:03 IMAP(dvtest) [29801]: Error: read(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Remote disconnected 2009-06-25 14:27:03 IMAP(dvtest) [29801]: Error: acl: dict commit failed 2009-06-25 14:27:03 dovecot: Error: child 29802 (dict) killed with signal 11 (core dumps disabled)
My sql-dict.conf is:
connect = host=localhost dbname=dovecot user=dovecot # password=pass
[CUT samples for quota & expire]
# CREATE TABLE user_shares ( # from_user varchar(100) not null, # to_user varchar(100) not null, # primary key (from_user, to_user) # );
map { pattern = shared/shared-boxes/user/$to/$from table = user_shares
fields { from_user = $from to_user = $to } }
==================
So I changed the connect line into:
connect = dbname=dovecot user=dovecot
into forcing to use the local socket, which seems to work:
2009-06-25 14:37:24 dict: Info: pgsql: Connected to dovecot
but:
2009-06-25 14:37:24 dovecot: Error: child 29986 (dict) killed with signal 11 (core dumped) 2009-06-25 14:37:24 IMAP(dvtest) [29985]: Error: read(/usr/local/dovecot-1.2.rc6acl-hook2/var/run/dovecot/dict-server) failed: Remote disconnected 2009-06-25 14:37:24 IMAP(dvtest) [29985]: Error: acl: dict commit failed
==> /var/log/postgresql/postgresql-8.1-main.log <== 2009-06-25 14:37:24 CEST LOG: unexpected EOF on client connection
The core's bt full of this latter crash is:
Core was generated by `dict'. Program terminated with signal 11, Segmentation fault. #0 0xb7ebe463 in strlen () from /lib/tls/i686/cmov/libc.so.6 (gdb) bt full #0 0xb7ebe463 in strlen () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #1 0x08065072 in str_append (str=0x806c168, cstr=0x0) at str.c:91 No locals. #2 0x080509ef in sql_dict_set_query (build=0xbffe8c34) at dict-sql.c:536 dict = (struct sql_dict *) 0x8076e08 sql_fields = <value optimized out> extra_values = <value optimized out> i = 0 prefix = (string_t *) 0x806c168 suffix = (string_t *) 0x806c1d8 __PRETTY_FUNCTION__ = "sql_dict_set_query" #3 0x080518a4 in sql_dict_set (_ctx=0x8080028, key=0x806c032 "shared/shared-boxes/user/dvtest2/dvtest", value=0x806c05a "1") at dict-sql.c:648 build = {dict = 0x8076e08, fields = {arr = {buffer = 0x806c130, element_size = 8}, v = 0x806c130, v_modifiable = 0x806c130}, extra_values = 0xbffe8c50, key1 = 115 's', inc = false} field = {map = 0x8076ed8, value = 0x806c05a "1"} query = <value optimized out> _data_stack_cur_id = 4 ctx = <value optimized out> dict = <value optimized out> map = <value optimized out> values = {arr = {buffer = 0x806c0f0, element_size = 4}, v = 0x806c0f0, v_modifiable = 0x806c0f0} #4 0x08052460 in dict_set (ctx=0x8080028, key=0x806c032 "shared/shared-boxes/user/dvtest2/dvtest", value=0x806c05a "1") at dict.c:168 __PRETTY_FUNCTION__ = "dict_set" #5 0x0804f355 in cmd_set (conn=0x8075bc8, line=0x8075df8 "2\tshared/shared-boxes/user/dvtest2/dvtest\t1") at dict-server.c:288 trans = (struct dict_server_transaction *) 0x8080118 #6 0x0804fbf9 in dict_client_connection_input (conn=0x8075bc8) at dict-server.c:458 _data_stack_cur_id = 3 line = 0x8075df7 "S2\tshared/shared-boxes/user/dvtest2/dvtest\t1" i = 6 ret = <value optimized out> #7 0x0805e2d0 in io_loop_handler_run (ioloop=0x8074a38) at ioloop-epoll.c:208 ctx = <value optimized out> event = (const struct epoll_event *) 0x8074b80 list = (struct io_list *) 0x8075da8 io = (struct io_file *) 0x8075d80 tv = {tv_sec = 2147483, tv_usec = 0} t_id = 2 msecs = <value optimized out> ret = 1 i = 0 j = 0 call = <value optimized out> #8 0x0805d398 in io_loop_run (ioloop=0x8074a38) at ioloop.c:338 No locals. #9 0x0805002f in main () at main.c:129 No locals.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSkNxwXWSIuGy1ktrAQKuyAgAn8NU8Y59qGV75VStW2MZQH/7HWLF2z9y 2L41g+NzX5LEw9o/B2ZjlAVEsNhVbqbew2A57uuvOAgV5K8iGgx1yPUjmQT9ud6X uthcsBNQIVGu6ymCN2ufeh3XdNEkrOu1pLJaWkiVQjvc8FOczMp432Jhytc9Hpbo jtMbnFuSbZmg0GX6bqJ50kOsjwme7B7ak/ubVeOwGXHU4MQ8PRXl+TXdVTlnFwKw IUZj8xPB+Gi7nRdsJlkQItp//TgeAJ9lm+i/OWzH420qljADDs9NfrfKd/DDOo6i u6W6I+5FUsJ5N7CHDAvHeDnTHPomPC+bnYAWpRyXF/kMVPaccaFxQw== =O2WZ -----END PGP SIGNATURE-----