hi-
i'm setting up an imap proxy in front of a novell groupwise server. it seems to so far be partially working, but dovecot is having trouble in certain cases. i expect that it's ultimately due to what i believe is a very poor implementation of imap provided by groupwise [at least based on other experiences in the past] - but that's a big part of why i'd like to have dovecot in between it and clients.
below is information collected during starting of dovecot, opening/initial connection from a client [os x mail.app], closing of the client, and stopping of dovecot.
os is ubuntu 12.10 development/beta, dovecot is 2.1.7 courtesy of ubuntu's packages.
log entries: Oct 11 13:24:33 halo dovecot: master: Dovecot v2.1.7 starting up Oct 11 13:24:49 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14171, TLS, session=<iHgu2cvLlwAKRChu> Oct 11 13:24:50 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14174, TLS, session=<t1E/2cvLoQAKRChu> Oct 11 13:24:51 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14176, TLS, session=<OZlM2cvLqgAKRChu> Oct 11 13:24:51 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14178, TLS, session=<d3NU2cvLsQAKRChu> Oct 11 13:24:51 halo dovecot: imap(jdoe): Connection closed in=16 out=350 Oct 11 13:24:52 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14180, TLS, session=<oxNa2cvLtAAKRChu> Oct 11 13:24:52 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:24:52 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14176 killed with signal 11 (core dumped) Oct 11 13:24:57 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:24:57 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14178 killed with signal 11 (core dumped) Oct 11 13:24:57 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14182, TLS, session=<FUCv2cvLuAAKRChu> Oct 11 13:24:58 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:24:58 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14180 killed with signal 11 (core dumped) Oct 11 13:25:03 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:25:03 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14182 killed with signal 11 (core dumped) Oct 11 13:25:03 halo dovecot: imap-login: Login: user=<jdoe>, method=PLAIN, rip=10.68.40.110, lip=10.59.1.53, mpid=14184, TLS, session=<DQkF2svLuwAKRChu> Oct 11 13:25:03 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:25:03 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14184 killed with signal 11 (core dumped) Oct 11 13:25:09 halo dovecot: imap(jdoe): Error: imapc: Mailbox 'Trash' state corrupted: Expunged message reappeared in session (uid=6282 < next_uid=6283) Oct 11 13:25:09 halo dovecot: imap(jdoe): Fatal: master: service(imap): child 14174 killed with signal 11 (core dumped) [repeats] Oct 11 13:25:27 halo dovecot: dns-client: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: dns-client: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: master: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: auth: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: config: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: ssl-params: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: anvil: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill) Oct 11 13:25:27 halo dovecot: log: Warning: Killed with signal 15 (by pid=1 uid=0 code=kill)
gdb backtrace:
~ >gdb /usr/lib/dovecot/imap /var/cache/imapproxy/jdoe/core GNU gdb (GDB) 7.5-ubuntu Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/lib/dovecot/imap...Reading symbols from /usr/lib/debug/usr/lib/dovecot/imap...done. done. [New LWP 13939]
warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `dovecot/imap'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb) bt full #0 0x0000000000000000 in ?? () No symbol table info available. #1 0x00007fc7f6cb611e in imap_parser_reset (parser=0x7fc7f8a0f3a0) at imap-parser.c:93 No locals. #2 0x00007fc7f6f7ada7 in imapc_connection_input_reset (conn=conn@entry=0x7fc7f8a0d270) at imapc-connection.c:664 No locals. #3 0x00007fc7f6f7c6f4 in imapc_connection_input_untagged (conn=conn@entry=0x7fc7f8a0d270) at imapc-connection.c:908 imap_args = 0x7fc7f8a0f4f8 name = 0x7fc7f8a0f5d0 "" value = <optimized out> parser = 0x0 reply = {name = 0x7fc7f8a0f5d0 "", num = 11, args = 0x7fc7f8a0f4f8, file_args = 0x7fc7f8a0d5d0, file_args_count = 0, resp_text_key = 0x0, resp_text_value = 0x0, untagged_box_context = 0x7fc7f8a1ad70} ret = <optimized out> #4 0x00007fc7f6f7d25e in imapc_connection_input_one (conn=0x7fc7f8a0d270) at imapc-connection.c:1061 tag = 0x7fc7f8a0f5c0 "" ret = -1 #5 imapc_connection_input_pending (conn=0x7fc7f8a0d270) at imapc-connection.c:1407 _data_stack_cur_id = 6 ret = <optimized out> #6 0x00007fc7f6f7d2c2 in imapc_connection_input (conn=0x7fc7f6c8f798) at imapc-connection.c:1100 errstr = <optimized out> ret = <optimized out> #7 0x00007fc7f6cdf006 in io_loop_call_io (io=0x7fc7f8a23800) at ioloop.c:379 ioloop = 0x7fc7f8a23630 t_id = 5 #8 0x00007fc7f6cdfcb7 in io_loop_handler_run (ioloop=ioloop@entry=0x7fc7f8a23630) at ioloop-epoll.c:213 ctx = 0x7fc7f8a23850 events = 0x7fc7f8a245e0 event = 0x7fc7f8a238c0 list = 0x7fc7f8a24320 io = <optimized out> tv = {tv_sec = 299, tv_usec = 999402} events_count = <optimized out> msecs = <optimized out> ret = 1 i = <optimized out> call = <optimized out> #9 0x00007fc7f6cdea18 in io_loop_run (ioloop=0x7fc7f8a23630) at ioloop.c:398 No locals. #10 0x00007fc7f6f7a0f7 in imapc_client_run_pre (client=<optimized out>) at imapc-client.c:142 connp = 0x7fc7f8a0cfe0 prev_ioloop = 0x7fc7f89e3670 #11 imapc_client_run (client=0x7fc7f8a0ce80) at imapc-client.c:161 No locals. #12 0x00007fc7f6f79254 in imapc_storage_run (storage=0x7fc7f8a0be60) at imapc-storage.c:118 No locals. #13 0x00007fc7f6f78311 in imapc_sync_index (ctx=0x7fc7f8a1fc70) at imapc-sync.c:351 mbox = 0x7fc7f8a1ad70 sync_rec = {uid1 = 47, uid2 = 0, type = (unknown: 4171272512), add_flags = 199 '\307', remove_flags = 127 '\177', keyword_idx = 0, guid_128 = "\000\000\000\000)\235\312\366\307\177\000\000p\255\241", <incomplete sequence \370>} seq1 = 32767 seq2 = 0 #14 imapc_sync_begin (force=<optimized out>, ctx_r=<synthetic pointer>, mbox=0x7fc7f8a1ad70) at imapc-sync.c:422 ctx = 0x7fc7f8a1fc70 sync_flags = <optimized out> ret = <optimized out> #15 imapc_sync (mbox=0x7fc7f8a1ad70) at imapc-sync.c:464 sync_ctx = <optimized out> force = <optimized out> #16 imapc_mailbox_sync_init (box=0x7fc7f8a1ad70, flags=(MAILBOX_SYNC_FLAG_FULL_READ | MAILBOX_SYNC_FLAG_FIX_INCONSISTENT)) at imapc-sync.c:498 mbox = 0x7fc7f8a1ad70 capabilities = <optimized out> changes = false ret = <optimized out> #17 0x00007fc7f6f8bd43 in mailbox_sync_init (box=0x7fc7f8a1ad70, flags=(MAILBOX_SYNC_FLAG_FULL_READ | MAILBOX_SYNC_FLAG_FIX_INCONSISTENT)) at mail-storage.c:1320 _data_stack_cur_id = 4 ctx = <optimized out> #18 0x00007fc7f6f8be67 in mailbox_sync (box=<optimized out>, flags=<optimized out>, flags@entry=MAILBOX_SYNC_FLAG_FULL_READ) at mail-storage.c:1368 ctx = <optimized out> status = {sync_delayed_expunges = 0} #19 0x00007fc7f74475d2 in select_open (readonly=false, mailbox=<optimized out>, ctx=0x7fc7f8a0da98) at cmd-select.c:296 client = 0x7fc7f8a13d30 status = {messages = 4171084000, recent = 32711, unseen = 0, uidvalidity = 0, uidnext = 13, first_unseen_seq = 0, first_recent_uid = 4137782496, last_cached_seq = 32711, highest_modseq = 13, keywords = 0x7fc7f6cd06fb <t_malloc0+43>, permanent_flags = 4171118192, nonpermanent_modseqs = 1, permanent_keywords = 1, allow_new_keywords = 1} flags = MAILBOX_FLAG_DROP_RECENT ret = <optimized out> #20 cmd_select_full (cmd=<optimized out>, readonly=<optimized out>) at cmd-select.c:419 ---Type <return> to continue, or q <return> to quit--- client = <optimized out> ctx = <optimized out> args = 0x7fc7f8a18598 list_args = 0x7fc7f89db0e0 mailbox = 0x7fc7f89db310 "Trash" ret = 1 __FUNCTION__ = "cmd_select_full" #21 0x00007fc7f744b29c in command_exec (cmd=cmd@entry=0x7fc7f8a0d9a0) at imap-commands.c:148 hook = 0x7fc7f89e4cd0 ret = <optimized out> #22 0x00007fc7f744a2ee in client_command_input (cmd=0x7fc7f6c8f798) at imap-client.c:682 client = 0x7fc7f8a13d30 command = <optimized out> __FUNCTION__ = "client_command_input" #23 0x00007fc7f744a39a in client_command_input (cmd=0x7fc7f8a0d9a0) at imap-client.c:733 client = 0x7fc7f8a13d30 command = <optimized out> __FUNCTION__ = "client_command_input" #24 0x00007fc7f744a5fd in client_handle_next_command (remove_io_r=<synthetic pointer>, client=0x7fc7f8a13d30) at imap-client.c:774 size = 19 #25 client_handle_input (client=client@entry=0x7fc7f8a13d30) at imap-client.c:786 _data_stack_cur_id = 3 ret = 112 remove_io = false handled_commands = false __FUNCTION__ = "client_handle_input" #26 0x00007fc7f744aef5 in client_input (client=0x7fc7f8a13d30) at imap-client.c:825 cmd = <optimized out> output = 0x7fc7f8a0d868 bytes = 19 __FUNCTION__ = "client_input" #27 0x00007fc7f6cdf006 in io_loop_call_io (io=0x7fc7f8a11c90) at ioloop.c:379 ioloop = 0x7fc7f89e3670 t_id = 2 #28 0x00007fc7f6cdfcb7 in io_loop_handler_run (ioloop=ioloop@entry=0x7fc7f89e3670) at ioloop-epoll.c:213 ctx = 0x7fc7f89e39e0 events = 0x7fc7f8a245e0 event = 0x7fc7f89e3a50 list = 0x7fc7f8a0f380 io = <optimized out> tv = {tv_sec = 1739, tv_usec = 996790} events_count = <optimized out> msecs = <optimized out> ret = 1 i = <optimized out> call = <optimized out> #29 0x00007fc7f6cdea18 in io_loop_run (ioloop=0x7fc7f89e3670) at ioloop.c:398 No locals. #30 0x00007fc7f6ccb463 in master_service_run (service=0x7fc7f89e3520, callback=callback@entry=0x7fc7f7452f70 <client_connected>) at master-service.c:544 No locals. #31 0x00007fc7f74428c7 in main (argc=1, argv=0x7fc7f89e3370) at main.c:389 set_roots = {0x7fc7f7658d20 <imap_setting_parser_info>, 0x0} login_set = {auth_socket_path = 0x7fc7f89db070 "/run/dovecot/auth-master", postlogin_socket_path = 0x0, postlogin_timeout_secs = 60, callback = 0x7fc7f7452e10 <login_client_connected>, failure_callback = 0x7fc7f7452b60 <login_client_failed>} service_flags = <optimized out> storage_service_flags = <optimized out> username = 0x0 c = <optimized out> (gdb)
doveconf -n # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.5.0-17-generic x86_64 Ubuntu quantal (development branch) first_valid_gid = 999 first_valid_uid = 999 imapc_host = backend.example.com last_valid_gid = 999 last_valid_uid = 999 log_timestamp = "%d.%m.%Y %H.%M.%S " login_greeting = dovecot ready mail_gid = imapproxy mail_home = /var/cache/imapproxy/%u mail_location = imapc:%h/%n/Maildir mail_uid = imapproxy
config: passdb { args = host=backend.example.com default_fields = userdb_imapc_user=%u userdb_imapc_password=%w driver = imap } protocols = " imap" service auth-worker { user = $default_internal_user } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } ssl = required ssl_cert = </etc/dovecot/pki/mra.example.com-cert.pem ssl_key = </etc/dovecot/pki/mra.example.com-key.pem userdb { driver = prefetch } verbose_proctitle = yes
thanks -ben