Heya, We are expiriencing issues with dovecot 2.1.1 on Linux with weird filenames in home directory of username. We are using mbox IMAP folders, with no special changes (mail_location = mbox:~/:INBOX=%h/.mailbox). Mar 6 13:37:17 machine dovecot: imap(username): Panic: file mail-storage.c: line 628 (mailbox_alloc): assertion failed: (uni_utf8_str_is_valid(vname)) Mar 6 13:37:17 machine dovecot: imap(username): Error: Raw backtrace: /opt/dovecot-2.1.1/lib/dovecot/libdovecot.so.0 [0x2ba41cb79450] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot.so.0 [0x2ba41cb794a6] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot.so.0 [0x2ba41cb78963] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot-storage.so.0 [0x2ba41c87ebd5] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot-storage.so.0 [0x2ba41c88c12c] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot-storage.so.0(fs_list_iter_next+0x1b4) [0x2ba41c88c494] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot-storage.so.0 [0x2ba41c885342] -> /opt/dovecot-2.1.1/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_next+0x234) [0x2ba41c885604] -> dovecot/imap [0x40b2d1] -> dovecot/imap(cmd_list_full+0x520) [0x40c1f0] -> dovecot/imap(cmd_list+0xb) [0x40c3eb] -> dovecot/imap(command_exec+0x37) [0x410427] -> dovecot/imap [0x40f4cd] -> dovecot/imap [0x40f582] -> dovecot/imap(client_handle_input+0x3f) [0x40f6cf] -> dovecot/imap(client_input+0x62) [0x410052] -> /opt/dovecot Mar 6 13:37:17 machine dovecot: imap(username): Fatal: master: service(imap): child 20873 killed with signal 6 (core dumps disabled) The bug is reproducible by using home folder structure available from: http://bit.ly/x8pTXS AFAIK, the problem lies in processing the file list of home folder, which can contain filenames that do not have proper UTF-8 encoding of filenames, which causes dovecot to crash. On the other hand, UTF-8 filenames created on the system by hand (using touch), are not displayed in IMAP LIST command (sample is included in the folder structure; single letter file). Cheers, Jernej
On Tue, 2012-03-06 at 14:28 +0100, Jernej Porenta wrote:> Heya, > > We are expiriencing issues with dovecot 2.1.1 on Linux with weird > filenames in home directory of username. We are using mbox IMAP > folders, with no special changes (mail_location = mbox:~/:INBOX=% > h/.mailbox). > > Mar 6 13:37:17 machine dovecot: imap(username): Panic: file > mail-storage.c: line 628 (mailbox_alloc): assertion failed: > (uni_utf8_str_is_valid(vname))..> AFAIK, the problem lies in processing the file list of home folder, > which can contain filenames that do not have proper UTF-8 encoding of > filenames, which causes dovecot to crash.Yes, Dovecot shouldn't crash even if there are non-UTF8 mailboxes. This should fix it by renaming such mailboxes: http://hg.dovecot.org/dovecot-2.1/rev/c077ca9bc306> On the other hand, UTF-8 filenames created on the system by hand > (using touch), are not displayed in IMAP LIST command (sample is > included in the folder structure; single letter file).This is a bit trickier problem. The mailbox names are currently stored in filesystem as IMAP's modified-UTF7. So it's not really even currently supposed to work, although it's not very nice that the mailboxes aren't visible either. Maybe I'll do something smart in future for this, like allowing both mUTF-7 and UTF-8 and remembering per-mailbox which formatting it is in.
On Mon, 2012-03-19 at 14:27 +0100, Jernej Porenta wrote:> > Mar 19 10:56:40 server dovecot: imap(user): Panic: file mail-storage.c: line 628 (mailbox_alloc): assertion failed: (uni_utf8_str_is_valid(vname)) > > > > It is the same. We will try 2.1.3 today and report the results...> The home directory of the username is tar.gzipped here: http://www2.arnes.si/~krklubsls13/username.tar.gzThanks, fixed: http://hg.dovecot.org/dovecot-2.1/rev/c77fbfce438d
On Mar 19, 2012, at 2:53 PM, Timo Sirainen wrote:> On Mon, 2012-03-19 at 14:27 +0100, Jernej Porenta wrote: >>> Mar 19 10:56:40 server dovecot: imap(user): Panic: file mail-storage.c: line 628 (mailbox_alloc): assertion failed: (uni_utf8_str_is_valid(vname)) >>> >>> It is the same. We will try 2.1.3 today and report the results... > >> The home directory of the username is tar.gzipped here: http://www2.arnes.si/~krklubsls13/username.tar.gz > > Thanks, fixed: http://hg.dovecot.org/dovecot-2.1/rev/c77fbfce438d >Confirmed working? Thank you again, cheers, Jernej