Page MenuHomePhorge

Problem moving mailboxes between different backends in a murder environment
Open, NormalPublic


Hi ,

there seems to be a bug in the kolab cyrus package. I have reported this to the cyrus project already, but it seems that this is problem is caused by kolab patch to cyrus. (


  • CentOS Linux release 7.3.1611 (Core)
    • cyrus-imapd-2.5.10-6.1.el7.kolab_16.x86_64 pykolab-0.8.7-1.1.el7.kolab_16.noarch cyrus-imapd-debuginfo-2.5.10-6.1.el7.kolab_16.x86_64 kolab-cli-0.8.7-1.1.el7.kolab_16.noarch kolab-saslauthd-0.8.7-1.1.el7.kolab_16.noarch

When moving mailboxes from one backend to another the imapd process segfaults if there is no defaultpartiton set in the /etc/imapd.conf.

#0 __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:212
#1 0x00007f81226ca0f2 in xfer_localcreate (xfer=0x7f8122d149e0) at imap/imapd.c:10200
#2 do_xfer (xfer=0x7f8122d149e0) at imap/imapd.c:10547
#3 0x00007f81226cb0f6 in cmd_xfer (tag=tag@entry=0x7f8122ca8cd0 "8", name=name@entry=0x7f8122cd4e40 "user/",
toserver=toserver@entry=0x7f8122d0fe90 "iltest162", topart=) at imap/imapd.c:10729
#4 0x00007f81226cb4a0 in cmd_rename (tag=0x7f8122ca8cd0 "8", oldname=0x7f8122cd4e40 "user/",
newname=0x7f8122cc8fc0 "user/", location=) at imap/imapd.c:6182
#5 0x00007f81226da34a in cmdloop () at imap/imapd.c:1793
#6 0x00007f81226df1ac in service_main (argc=, argv=, envp=envp@entry=0x7ffe8ca6caf0) at imap/imapd.c:980
#7 0x00007f81226d0a89 in main (argc=, argv=, envp=0x7ffe8ca6caf0) at master/service.c:606

The reason seems to be some string checking issues in the xfer_localcreate function from imap/imapd.c.

Additionally I experience segfaults while moving mailboxes which where created in prior kolab versions.

#0 __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:31
#1 0x00007f4151de4e9e in prot_vprintf (s=0x7f4153564460, fmt=<optimized out>, pvar=pvar@entry=0x7ffede91dc20) at lib/prot.c:1364
#2 0x00007f4151de5424 in prot_printf (s=<optimized out>, fmt=fmt@entry=0x7f4152c221a8 "LC1 LOCALCREATE {%lu+}\r\n%s (UNIQUEID %s)\r\n") at lib/prot.c:1240
#3 0x00007f4152c0b154 in xfer_localcreate (xfer=0x7f41534d62f0) at imap/imapd.c:10226
#4 do_xfer (xfer=0x7f41534d62f0) at imap/imapd.c:10547
#5 0x00007f4152c0c0f6 in cmd_xfer (tag=tag@entry=0x7f415342ae10 "7", name=name@entry=0x7f41534580e0 "user/", toserver=toserver@entry=0x7f4153498ff0 "iltest162", topart=<optimized out>) at imap/imapd.c:10729
#6 0x00007f4152c0c4a0 in cmd_rename (tag=0x7f415342ae10 "7", oldname=0x7f41534580e0 "user/", newname=0x7f415344c260 "user/", location=<optimized out>) at imap/imapd.c:6182
#7 0x00007f4152c1b34a in cmdloop () at imap/imapd.c:1793
#8 0x00007f4152c201ac in service_main (argc=<optimized out>, argv=<optimized out>, envp=envp@entry=0x7ffede923a90) at imap/imapd.c:980
#9 0x00007f4152c11a89 in main (argc=<optimized out>, argv=<optimized out>, envp=0x7ffede923a90) at master/service.c:606

The reason for this seems to be the same string checking issues in xfer_localcreate from imap/imapd.c. This time not the defaultpartition is causing the trouble but the missing mailboxfolder uniqueid from the mailbox.

After digging around the cyrus git repository and getting some hints from the cyrus guys I noticed that the xfer_localcreate function is quite different from the original cyrus function. Is there any reason for this differences to the upstream code ?

Kind Regards,


Ticket Type