[Dovecot] crash on LIST command

Wouter Van Hemel wouter at pair.com
Mon Jun 16 05:28:36 EEST 2003


Hello,

I'm experiencing a reproducable crash in the imap daemon of dovecot
0.99.9.1 when running the next commands (sniffed from a sylpheed session):

[cocaine:~] telnet ice 143
Trying 192.168.196.1...
Connected to ice.
Escape character is '^]'.
* OK dovecot ready.
1 NOOP
1 OK NOOP completed.
2 LOGIN wouter password
2 OK Logged in.
3 NAMESPACE
3 BAD Error in IMAP command: Unknown command 'NAMESPACE'
4 LIST "" ""
* LIST (\Noselect) "/" ""
4 OK List completed.
5 LIST "" "%"
Connection closed by foreign host.
[cocaine:~] _

The log shows this:

Jun 16 02:48:09 ice imap-login: Login: wouter [192.168.196.5]
Jun 16 02:48:19 ice dovecot: child 1870 (imap) killed with signal 11

Looks like a segfault.

[...]
Core was generated by `imap'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x8058469 in mbox_list_inbox (ctx=0x8098080) at mbox-list.c:333
333		if (ctx->dir->virtual_path != NULL)
(gdb) bt
#0  0x8058469 in mbox_list_inbox (ctx=0x8098080) at mbox-list.c:333
#1  0x805809e in mbox_list_mailbox_next (ctx=0x8098080) at mbox-list.c:193
#2  0x804b75a in list_unsorted (client=0x8096080, ctx=0x8098080,
reply=0x807ed06 "LIST", sep=0xbfbffac4 "/", listext=0) at cmd-list.c:234
#3  0x804b9fa in _cmd_list_full (client=0x8096080, lsub=0) at
cmd-list.c:341
#4  0x804ba8b in cmd_list (client=0x8096080) at cmd-list.c:365
#5  0x804d39e in client_handle_input (client=0x8096080) at client.c:306
#6  0x804d43d in _client_input (context=0x8096080) at client.c:342
#7  0x8078c87 in io_loop_handler_run (ioloop=0x808d060) at
ioloop-poll.c:210
#8  0x8078745 in io_loop_run (ioloop=0x808d060) at ioloop.c:295
#9  0x80524a9 in main (argc=1, argv=0xbfbffc2c, envp=0xbfbffc34) at
main.c:166
#10 0x8049eb5 in _start ()
(gdb) _

This crash happens when adding an imap account to the sylpheed mailer.


I also noticed other problematic log entries, which might or might not be
related:

Jun 16 00:28:36 ice imap-login: Login: wouter [192.168.196.5]
Jun 16 00:28:36 ice imap(wouter): open() failed with file /usr/home/wouter/.mail/.imap/INBOX/.customflags: No such file or directory
Jun 16 00:28:36 ice imap(wouter): Can't create temp index /usr/home/wouter/.mail/.imap/INBOX/.temp.hostname.domainname.tld.1728: No such file or directory

... this happens when an imap user connects and opens his/her INBOX for
the first time, and the /usr/home/username/.mail/ directory doesn't exist yet.

My DEFAULT_MAIL_ENV settings:

#default_mail_env = mbox:~/.mail:INBOX=/var/mail/%u
default_mail_env = mbox:/usr/home/%u/.mail:INBOX=/var/mail/%u

(tried both)

Manually adding the ~/.mail directory with mkdir takes care of the
problem, but shouldn't this directory be created automatically when it
doesn't exist? I can't expect every user to log in and first make this
mail directory before they can use their mail account.

Dovecot also refuses to show any folders at all, such as the INBOX, when
it can't find it's mail(folders) directory. Is this intentional?

Dovecot is running on a pretty standard (i386) FreeBSD 4.4 test machine
with postfix and normal mbox-formatted inbox files.


Thanks for any suggestions,

  wouter



More information about the dovecot mailing list