On Mar 14, 2012, at 3:29 PM, Timo Sirainen wrote: > 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
We tried version 2.1.2, which unfortunately does not fix the issue with weird characters. Whenever . LIST "" "*" is issued, dovecot crashes: Error: Raw backtrace: /opt/dovecot-2.1.2/lib/dovecot/libdovecot.so.0 [0x2b54671eb870] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot.so.0 [0x2b54671eb8c6] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot.so.0 [0x2b54671ead83] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot-storage.so.0 [0x2b5466f2a0e5] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot-storage.so.0 [0x2b5466f376cc] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot-storage.so.0 [0x2b5466f37846] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot-storage.so.0(fs_list_iter_init+0x4b1) [0x2b5466f38241] -> /opt/dovecot-2.1.2/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_init_multiple+0xec) [0x2b5466f3119c] -> dovecot/imap [0x40bbb6] -> dovecot/imap(cmd_list_full+0x520) [0x40c1f0] -> dovecot/imap(cmd_list+0xb) [0x40c3eb] -> dovecot/imap(command_exec+0x37) [0x410497] -> dovecot/imap [0x40f4ed] -> dovecot/imap [0x40f5a2] -> dovecot/imap(client_handle_input+0x3f) [0x40f6ef] -> dovecot/imap(client_input+0x62) [0x410072] -> /opt Any clues? > >> 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. I think we can leave this issue out, since I don't believe the users will be creating folders directly from interactive SSH sessions and rather use IMAP to create folders. So, this use-case is not very likely to occur. Thank you for your help... Cheers, Jernej