[Dovecot] crash on LIST command
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
On Mon, Jun 16, 2003 at 04:28:36AM +0200, Wouter Van Hemel wrote:
Hello,
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.
I use procmail to create the directory on delivery of first item of mail
DROPPRIVS=yes MAILDIR=$HOME/Mail DEFAULT=$MAILDIR/./
DUMMY=if [ ! -d $MAILDIR ]; then mkdir $MAILDIR; fi
--Andrew
-- If at first you don't succeed, destroy all evidence that you tried.
On Mon, 2003-06-16 at 05:28, Wouter Van Hemel wrote:
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):
I'm pretty sure this is fixed in the -test releases. http://dovecot.procontrol.fi/test/
On Mon, 16 Jun 2003, Timo Sirainen wrote:
On Mon, 2003-06-16 at 05:28, Wouter Van Hemel wrote:
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):
I'm pretty sure this is fixed in the -test releases. http://dovecot.procontrol.fi/test/
It is, I just tested with -test12. Thanks!
wouter
On Mon, 2003-06-16 at 05:28, Wouter Van Hemel wrote:
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.
Oh, and this is already fixed too.
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?
You mean if you have only INBOX in /var/mail/ but eg. no ~/mail? I don't think it even allows logging in without? And that is intentional.
On Mon, 16 Jun 2003, Timo Sirainen wrote:
On Mon, 2003-06-16 at 05:28, Wouter Van Hemel wrote:
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.
Oh, and this is already fixed too.
So it is, too. Thanks. :)
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?
You mean if you have only INBOX in /var/mail/ but eg. no ~/mail? I don't think it even allows logging in without? And that is intentional.
In that case, no problem. :)
I discovered two small errors (at least I think they are):
Fatal: Can't create directory /usr/local/var/run/dovecot: No such file or directory
... when I undefine "base_dir = /var/run/dovecot/". So that path really isn't the default dovecot uses, for some reason it prepends '/usr/local' (that being the install prefix). This could be a feature, too - it just confused me because I thought the comments showed the default settings.
And I also get an error when I uncomment "max_logging_users = 256":
Fatal: Error in configuration file /usr/local/etc/dovecot.conf line 125: Unknown setting: max_logging_users
That should probably be login_max_logging_users?
Regards,
wouter
On Mon, 2003-06-16 at 17:14, Wouter Van Hemel wrote:
Fatal: Can't create directory /usr/local/var/run/dovecot: No such file or directory
... when I undefine "base_dir = /var/run/dovecot/". So that path really isn't the default dovecot uses, for some reason it prepends '/usr/local' (that being the install prefix). This could be a feature, too - it just confused me because I thought the comments showed the default settings.
From beginning of config file:
# Default values are shown after each value, it's not required to uncomment # any of the lines. Exception to this are paths, they're just examples # with real defaults being based on configure options.
I use those values that are the preferred locations that binary package builders should use.
Fatal: Error in configuration file /usr/local/etc/dovecot.conf line 125: Unknown setting: max_logging_users
That should probably be login_max_logging_users?
Right.
participants (3)
-
Andrew Basterfield
-
Timo Sirainen
-
Wouter Van Hemel