Not compatible with dovecot 2.3?
i'm getting a strange error when attempting to use this with dovecot 2.3.0. i tried testing with a clean install of dovecot, with only the trees plugin enabled. as soon as it tries to write mail, it gets the following error:
Mar 08 03:48:20 mail-test dovecot[19059]: imap(my@email)<19065><GcO5ht5mU/LMcIPz>: Panic: file ostream.c: line 54 (o_stream_close_full): assertion failed: (stream->real_stream->error_handling_disabled)
Mar 08 03:48:20 mail-test dovecot[19059]: imap(my@email)<19065><GcO5ht5mU/LMcIPz>: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0xc5167) [0x7f6763511167] -> /usr/lib/dovecot/libdovecot.so.0(+0xc522a) [0x7f676351122a] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f676347ff09] -> /usr/lib/dovecot/libdovecot.so.0(+0xec2b9) [0x7f67635382b9] -> /usr/lib/dovecot/libdovecot.so.0(o_stream_destroy+0x16) [0x7f67635382d6] -> /usr/lib/dovecot/libdovecot-storage.so.0(dbox_save_end+0x56) [0x7f6763825a16] -> /usr/lib/dovecot/libdovecot-storage.so.0(mdbox_save_finish+0x3a) [0x7f6763819fda] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_finish+0x7e) [0x7f6763800ede] -> dovecot/imap(+0xdbff) [0x55608002cbff] -> dovecot/imap(command_exec+0x64) [0x55608003b6d4] -> dovecot/imap(+0xd1a3) [0x55608002c1a3] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x6b) [0x7f676352951b] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x137) [0x7f676352ae47] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x4d) [0x7f676352961d] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x39) [0x7f6763529839] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x14) [0x7f67634a36b4] -> dovecot/imap(main+0x357) [0x55608002bcc7] -> /usr/lib/libc.so.6(__libc_start_main+0xea) [0x7f67630b5f4a] -> dovecot/imap(_start+0x2a) [0x55608002beba]
Mar 08 03:48:20 mail-test dovecot[19059]: imap(my@email)<19065><GcO5ht5mU/LMcIPz>: Fatal: master: service(imap): child 19065 killed with signal 6 (core not dumped)
i also had to modify the following line in trees-istream.c in order for it to compile against dovecot 2.3.0:
return i_stream_create(&sstream->istream, input, i_stream_get_fd(input), 0);
(line 434)
if you need more info, please let me know! or if there is a way for me to get more/better debugging messages. thanks!
Edit: i think i found the problem. in trees_ostream_flush, i changed the the first line to:
ssize_t result = 1;
because dovecot is expecting a non-zero return, and if the "flushed" flag is set, it immediately goes to the end and returns the result, and was returning 0, which dovecot thought was an error.
i'm not sure why this only cropped up in dovecot 2.3?