[Dovecot] Problems with dovecot 1.1b3
I am testing dovecot 1.1 betas on a testing system, hoping to take advantage of self repairing and NFS-capable indexes when 1.1 is sensible to put into production. I ran into a number of issues that I did not have with 1.0, and I think I'll just pick one or more at a time and report them rather than try to report every single issue at once, hoping that some of the fixes will solve more than one problem.
I started with 1.1b2 just for record, but the issues seem to be present in 1.1b3 as well. I realized yesterday that using the acl plugin may be complicating my testing and results, so I have disabled it for now and am connecting with plaintext IMAP just so I can sniff connections and see what is happening. I am running it on FreeBSD 6.2-stable from Sep 19 2007.
First my dovecot -n output: # 1.1.beta3: /usr/local/etc/dovecot.conf ssl_cert_file: /usr/local/etc/apache2/ssl/ssl.pem ssl_key_file: /usr/local/etc/apache2/ssl/ssl.pem disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 0 mail_location: maildir:%h/Maildir:CONTROL=%h/Maildir/dovecot/private/control:INDEX=%h/Maildir/dovecot/private/indexes mail_debug: yes mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes mail_plugins: mail_log mail_log_max_lines_per_sec: 0 imap_client_workarounds: delay-newmail netscape-eoh tb-extra-mailbox-sep namespace: type: private separator: / prefix: mail/ location: maildir:%h/Maildir:CONTROL=%h/Maildir/dovecot/private2/control:INDEX=%h/Maildir/dovecot/private2/indexes hidden: yes list: yes namespace: type: private separator: / inbox: yes list: yes auth default: mechanisms: plain login passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 384 user: postfix group: postfix plugin: acl: vfile:/usr/local/etc/dovecot-acls
The first thing I did was to try to update my dovecot.conf from 1.0 to work with 1.1. When I started dovecot 1.1 for the first time, I noticed it was listening to 143 but not 993, even though my config was designed for ssl/tls in 1.0 without any listen ports specified:
# netstat -a | grep LISTEN | grep imap tcp4 0 0 *.imap *.* LISTEN
So, I thought I would try specifying the ports in the config:
protocol imap { listen = *:143 ssl_listen = *:993 # .. }
Success!
# netstat -a | grep LISTEN | grep imap tcp4 0 0 *.imaps *.* LISTEN tcp4 0 0 *.imap *.* LISTEN
Initially I was then testing using ACLs, but I disabled it to simplify.
One of the more basic problems I've seen is the behavior from "list = no/yes". For the sake of simplicity and example, I've disabled most of the additional public and private namespaces from my 1.0 config.
I have some private namespaces with prefix "mail/" and "Mail/" that I wish to provide for users for compatability with clients set with those prefixes. In dovecot 1.0, this worked as expected:
namespace: type: private separator: / prefix: mail/ hidden: yes
But in 1.1b2 or b3, I never seem to get a list of the contents under mail/ when I tell mutt to default to servername/mail/ as the default folder path.
Cases:
hidden = yes list = yes
a0006 LIST "" "mail"
- LIST (\Noselect \HasChildren) "/" "mail" a0006 OK List completed. a0007 LIST "" "mail/%" a0007 OK List completed.
mutt lists contents of only "../" and selecting it brings me to the imap root with the expected folders. When ../ is followed, I see all my folders as well as all my folders repeated under mail/ prefix.
hidden = yes list = no
a0006 LIST "" "mail" a0006 OK List completed. a0007 LIST "" "mail/%" a0007 OK List completed.
mutt claims "No such folder"
hidden = no list = yes
a0006 LIST "" "mail"
- LIST (\Noselect \HasChildren) "/" "mail" a0006 OK List completed. a0007 LIST "" "mail/%" a0007 OK List completed.
mutt lists contents of only "../" and selecting it brings me to the imap root with the expected folders. When ../ is followed, I see all my folders as well as all my folders repeated under mail/ prefix.
On Wed, 2007-10-17 at 20:05 -0400, Adam McDougall wrote:
The first thing I did was to try to update my dovecot.conf from 1.0 to work with 1.1. When I started dovecot 1.1 for the first time, I noticed it was listening to 143 but not 993, even though my config was designed for ssl/tls in 1.0 without any listen ports specified:
Fixed: http://hg.dovecot.org/dovecot/rev/79836b3474f4
One of the more basic problems I've seen is the behavior from "list = no/yes".
I think this fixes it: http://hg.dovecot.org/dovecot/rev/c901bdf0db75
On Sat, Oct 20, 2007 at 11:01:03PM +0300, Timo Sirainen wrote:
On Wed, 2007-10-17 at 20:05 -0400, Adam McDougall wrote:
The first thing I did was to try to update my dovecot.conf from 1.0 to work with 1.1. When I started dovecot 1.1 for the first time, I noticed it was listening to 143 but not 993, even though my config was designed for ssl/tls in 1.0 without any listen ports specified:
Fixed: http://hg.dovecot.org/dovecot/rev/79836b3474f4
That seems to work.
One of the more basic problems I've seen is the behavior from "list = no/yes".
I think this fixes it: http://hg.dovecot.org/dovecot/rev/c901bdf0db75
This helps, thunderbird seems to act as I would expect with hidden=yes and list=no:
8 list "" "mail/%"
- LIST (\HasNoChildren) "/" "mail/Deleted Items" ...... etc
but mutt cannot access mail/ when I ask it to:
set folder={localhost:1143}mail/ Chdir to: imap://localhost:1143/mail/
mutt says "No such folder"
a0006 LIST "" "mail" a0006 OK List completed. a0007 LIST "" "mail%" a0007 OK List completed.
I can see a difference in what the client asks for, mail/% versus mail%. I'm not sure why mutt is removing the / but is it supposed to work anyway on the server side? I can do a trace with mutt on dovecot 1.0 if you want. Thanks.
On Sat, 2007-10-20 at 17:15 -0400, Adam McDougall wrote:
This helps, thunderbird seems to act as I would expect with hidden=yes and list=no:
8 list "" "mail/%"
- LIST (\HasNoChildren) "/" "mail/Deleted Items"
Right.
but mutt cannot access mail/ when I ask it to:
set folder={localhost:1143}mail/ Chdir to: imap://localhost:1143/mail/
mutt says "No such folder"
a0006 LIST "" "mail" a0006 OK List completed.
Looks like v1.0 answers to this, although I didn't do it intentionally. I guess it's a good idea. http://hg.dovecot.org/dovecot/rev/5b2ff32877d4
a0007 LIST "" "mail%" a0007 OK List completed.
This happened with v1.0 too.
On Sun, Oct 21, 2007 at 01:44:26AM +0300, Timo Sirainen wrote:
On Sat, 2007-10-20 at 17:15 -0400, Adam McDougall wrote:
This helps, thunderbird seems to act as I would expect with hidden=yes and list=no:
8 list "" "mail/%"
- LIST (\HasNoChildren) "/" "mail/Deleted Items"
Right.
but mutt cannot access mail/ when I ask it to:
set folder={localhost:1143}mail/ Chdir to: imap://localhost:1143/mail/
mutt says "No such folder"
a0006 LIST "" "mail" a0006 OK List completed.
Looks like v1.0 answers to this, although I didn't do it intentionally. I guess it's a good idea. http://hg.dovecot.org/dovecot/rev/5b2ff32877d4
a0007 LIST "" "mail%" a0007 OK List completed.
This happened with v1.0 too.
Thanks! This patch seems to make it act the way I expected.
Next issue: when I try to read a message in a private namespace using thunderbird, dovecot is killed with signal 11. In thunderbird, it just acts like it refuses to read any message contents from private namespace. Based on a tcpdump trace, it is reproducable easily for me with telnet:
telnet server 143 ? login username pass 1 select "anyfolder" 2 IDLE DONE (crash)
If this is not reproducable for you, I guess I'll have to setup some process debugging.
On Sat, 2007-10-20 at 23:11 -0400, Adam McDougall wrote:
telnet server 143 ? login username pass 1 select "anyfolder" 2 IDLE DONE (crash)
If this is not reproducable for you, I guess I'll have to setup some process debugging.
Not reproducible with me. gdb backtrace would be nice. http://dovecot.org/bugreport.html
What notify method are you using? (dovecot --build-options)
On Sun, Oct 21, 2007 at 02:52:04PM +0300, Timo Sirainen wrote:
On Sat, 2007-10-20 at 23:11 -0400, Adam McDougall wrote:
telnet server 143 ? login username pass 1 select "anyfolder" 2 IDLE DONE (crash)
If this is not reproducable for you, I guess I'll have to setup some process debugging.
Not reproducible with me. gdb backtrace would be nice. http://dovecot.org/bugreport.html
What notify method are you using? (dovecot --build-options)
Build options: ioloop=kqueue notify=kqueue openssl
It does not crash if I use poll instead of kqueue.
Hopefully I did this backtrace right, let me know if I should change anything to improve it.
env MAIL=maildir:~/Maildir gdb /tmp/imap GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) r Starting program: /tmp/imap
- PREAUTH [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS UIDPLUS LIST-EXTENDED] Logged in as mcdouga9 1 select "funny"
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 unknown-0)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 unknown-0 \*)] Flags permitted.
- 422 EXISTS
- 0 RECENT
- OK [UNSEEN 295] First unseen.
- OK [UIDVALIDITY 1192968516] UIDs valid
- OK [UIDNEXT 423] Predicted next UID 1 OK [READ-WRITE] Select completed. 2 IDLE
- idling DONE
Program received signal SIGSEGV, Segmentation fault. 0x00000000004a8003 in io_file_unlink (io=0x5fb340) at ioloop.c:54 54 io->prev->next = io->next; (gdb) bt full #0 0x00000000004a8003 in io_file_unlink (io=0x5fb340) at ioloop.c:54 No locals. #1 0x00000000004a80ce in io_remove (_io=0x5fd0a8) at ioloop.c:82 io_file = (struct io_file *) 0x5fb340 io = (struct io *) 0x5fb340 #2 0x000000000045ae16 in index_mailbox_check_remove_all (ibox=0x60b048) at index-mailbox-check.c:118 file = (struct index_notify_file *) 0x0 aio = (struct index_notify_io *) 0x5fd0a0 #3 0x000000000042d40b in maildir_notify_changes (box=0x60b048) at maildir-storage.c:824 mbox = (struct maildir_mailbox *) 0x60b048 #4 0x000000000048bf90 in mailbox_notify_changes (box=0x60b048, min_interval=0, callback=0, context=0x0) at mail-storage.c:544 No locals. #5 0x000000000048bfc4 in mailbox_notify_changes_stop (box=0x60b048) at mail-storage.c:550 No locals. #6 0x00000000004158ab in idle_finish (ctx=0x6010b0, done_ok=true, free_cmd=true) at cmd-idle.c:48 client = (struct client *) 0x5fe200 #7 0x0000000000415a05 in idle_client_input (ctx=0x6010b0) at cmd-idle.c:90 client = (struct client *) 0x5fe200 line = 0x604018 "DONE" #8 0x00000000004a96f7 in io_loop_handler_run (ioloop=0x5f0080) at ioloop-kqueue.c:149 ctx = (struct ioloop_handler_context *) 0x5fb0c0 events = (struct kevent *) 0x5ff000 event = (const struct kevent *) 0x5ff000 tv = {tv_sec = 0, tv_usec = 999661} ts = {tv_sec = 0, tv_nsec = 999661000} io = (struct io_file *) 0x5f0a00 events_count = 3 t_id = 2 msecs = 1000 ret = 1 i = 0 __PRETTY_FUNCTION__ = "io_loop_handler_run" #9 0x00000000004a8810 in io_loop_run (ioloop=0x5f0080) at ioloop.c:303 No locals. #10 0x000000000042504e in main (argc=1, argv=0x7fffffffebd0, envp=0x7fffffffebe0) at main.c:293 No locals.
participants (2)
-
Adam McDougall
-
Timo Sirainen