We're running a huge imapc-Migration from an old Courier-IMAP to Dovecot. Courier always uses "INBOX."-prefix for his folders, so we set
namespace inbox { [...] separator = . prefix = INBOX. [...] } on our new Dovecot 2.2.20 system. And also we added: imapc_list_prefix=INBOX to avoid the dublication of the INBOX prefix. At the end, doveadm/dsync/imapc see "INBOX.Virus", adds his Prefix, has "INBOX.INBOX.Virus", deletes his imapc_list_prefix and the end we have "INBOX.Virus" again which is identical to the source folder from Courier. Works perfect BUT: It looks like there is a "hidden feature" in Dovecot that always maps "INBOX.INBOX" back to "INBOX". For me that looks like a workaround for broken mailclients to fix some of the common problems after changing the namespace prefix. I never heard about that "hidden feature", but even if I don't (!) have INBOX.INBOX: root@imap01:~/MIGRATION # doveadm mailbox list -u test INBOX INBOX.Virus INBOX.Spam INBOX.Trash I'm always able to access INBOX.INBOX which is identical to INBOX: root@imap01:~/MIGRATION # doveadm fetch -u test uid mailbox INBOX.INBOX uid: 1 Looks like there is such a magic-mapping and looks like this "hard coded mapping" (?) breaks the imapc_list_prefix-magic. If the user has on the SOURCE-server (Courier): Source-Server: INBOX (5 messages) INBOX.Inbox (3 messages) and I do migrate that user using doveadm/dsync/imapc, this user has on the DESTINATION-server (Dovecot) Destination-server: INBOX (5 messages) INBOX.Inbox (5 messages from "real INBOX") and his 3 messages from INBOX.Inbox are lost. I can NOT find any errors in the debug/error-output of doveadm/dsync/imapc. From the view of doveadm everything worked perfect as you can see in the attached logfile. Or am I completly wrong?! Peer -- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin http://www.heinlein-support.de Tel: 030 / 405051-42 Fax: 030 / 405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
Debug: Loading modules from directory: /usr/lib/dovecot/modules Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so Debug: Module loaded: /usr/lib/dovecot/modules/lib15_notify_plugin.so Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mail_log_plugin.so Debug: Module loaded: /usr/lib/dovecot/modules/lib20_zlib_plugin.so Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message) Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message) Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_sieve_plugin.so Debug: Skipping module doveadm_fts_lucene_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so: undefined symbol: lucene_index_iter_deinit (this is usually intentional, so just ignore this message) Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: fts_backend_rescan (this is usually intentional, so just ignore this message) doveadm(test): Debug: Added userdb setting: plugin/quota_rule=*:storage=2097151900b doveadm(test): Debug: Effective uid=2001, gid=2001, home=/vmail/98/60/test doveadm(test): Debug: Quota root: name=User quota backend=dict args=:noenforcing:file:/vmail/98/60/test/dovecot-quota doveadm(test): Debug: Quota rule: root=User quota mailbox=* bytes=2097151900 messages=0 doveadm(test): Debug: Quota warning: bytes=1887436710 (90%) messages=0 reverse=no command=quota-warning 90 test doveadm(test): Debug: Quota warning: bytes=2055208862 (98%) messages=0 reverse=no command=quota-warning 98 test doveadm(test): Debug: Quota grace: root=User quota bytes=209715190 (10%) doveadm(test): Debug: dict quota: user=test, uri=file:/vmail/98/60/test/dovecot-quota, noenforcing=1 doveadm(test): Debug: Namespace inbox: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=mdbox:~/mdbox:ALT=/vmail-alt/98/60/test/mdbox doveadm(test): Debug: fs: root=/vmail/98/60/test/mdbox, index=, indexpvt=, control=, inbox=, alt=/vmail-alt/98/60/test/mdbox doveadm(test): Debug: Namespace INBOX.: /vmail/98/60/test/mdbox doesn't exist yet, using default permissions doveadm(test): Debug: Namespace INBOX.: Using permissions from /vmail/98/60/test/mdbox: mode=0700 gid=default doveadm(test): Debug: Namespace : type=private, prefix=POP3-MIGRATION-NS/, sep=, inbox=no, hidden=yes, list=no, subscriptions=yes location=pop3c: doveadm(test): Debug: fs: root=, index=, indexpvt=, control=, inbox=, alt= doveadm(test): Debug: Namespace : type=private, prefix=, sep=, inbox=no, hidden=yes, list=no, subscriptions=no location=fail::LAYOUT=none doveadm(test): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt= dsync(test): Debug: Effective uid=2001, gid=2001, home=/vmail/98/60/test dsync(test): Debug: Quota root: name=User quota backend=dict args=:noenforcing:file:/vmail/98/60/test/dovecot-quota dsync(test): Debug: Quota rule: root=User quota mailbox=* bytes=2097151900 messages=0 dsync(test): Debug: Quota warning: bytes=1887436710 (90%) messages=0 reverse=no command=quota-warning 90 test dsync(test): Debug: Quota warning: bytes=2055208862 (98%) messages=0 reverse=no command=quota-warning 98 test dsync(test): Debug: Quota grace: root=User quota bytes=209715190 (10%) dsync(test): Debug: dict quota: user=test, uri=file:/vmail/98/60/test/dovecot-quota, noenforcing=1 dsync(test): Debug: Namespace inbox: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=imapc: dsync(test): Debug: imapc(imap.internal:143): Looking up IP address dsync(test): Debug: imapc: root=, index=, indexpvt=, control=, inbox=, alt= dsync(test): Debug: Namespace : type=private, prefix=POP3-MIGRATION-NS/, sep=, inbox=no, hidden=yes, list=no, subscriptions=yes location=pop3c: dsync(test): Debug: fs: root=, index=, indexpvt=, control=, inbox=, alt= dsync(test): Debug: Namespace : type=private, prefix=, sep=, inbox=no, hidden=yes, list=no, subscriptions=no location=fail::LAYOUT=none dsync(test): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt= dsync(test): Debug: imapc(imap.internal:143): Connecting to xxxxx:143 dsync(test): Debug: imapc(imap.internal:143): Server capabilities: IMAP4rev1 UIDPLUS CHILDREN NAMESPACE QUOTA IDLE ACL ACL2=UNION dsync(test): Debug: imapc(imap.internal:143): Authenticating as test dsync(test): Debug: imapc(imap.internal:143): Authenticated successfully dsync(test): Debug: brain M: Local mailbox tree: INBOX guid=00000000000000000000000000000000 uid_validity=0 uid_next=0 subs=no last_change=0 last_subs=0 dsync(test): Debug: brain S: Local mailbox tree: INBOX guid=c92f64f79f0d1ed01e6d5b314f04886c uid_validity=1452093762 uid_next=9 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain S: Local mailbox tree: INBOX.Virus guid=ad4aa8b5829399ff85164d3444e38fbc uid_validity=1452094836 uid_next=3 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain S: Local mailbox tree: INBOX.Trash guid=b36f688eae08506001091708006abe5a uid_validity=1452094199 uid_next=1 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain M: Remote mailbox tree: INBOX guid=c92f64f79f0d1ed01e6d5b314f04886c uid_validity=1452093762 uid_next=9 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain M: Remote mailbox tree: INBOX.Virus guid=ad4aa8b5829399ff85164d3444e38fbc uid_validity=1452094836 uid_next=3 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain M: Remote mailbox tree: INBOX.Trash guid=b36f688eae08506001091708006abe5a uid_validity=1452094199 uid_next=1 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain S: Local mailbox tree: INBOX.Inbox guid=75ceb79ba5cc13bafa102509369c2b53 uid_validity=1452093762 uid_next=9 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain M: Remote mailbox tree: INBOX.Inbox guid=75ceb79ba5cc13bafa102509369c2b53 uid_validity=1452093762 uid_next=9 subs=yes last_change=0 last_subs=0 dsync(test): Debug: brain M: Mailbox INBOX: local=00000000000000000000000000000000/0/0, remote=c92f64f79f0d1ed01e6d5b314f04886c/0/1: mailbox not selectable yet dsync(test): Debug: brain M: Mailbox INBOX.Inbox: local=00000000000000000000000000000000/0/0, remote=75ceb79ba5cc13bafa102509369c2b53/0/1: mailbox not selectable yet dsync(test): Debug: brain M: Mailbox INBOX.Trash: local=00000000000000000000000000000000/0/0, remote=b36f688eae08506001091708006abe5a/0/1: mailbox not selectable yet dsync(test): Debug: brain M: Mailbox INBOX.Virus: local=00000000000000000000000000000000/0/0, remote=ad4aa8b5829399ff85164d3444e38fbc/0/1: mailbox not selectable yet dsync(test): Debug: Namespace INBOX.: /vmail/98/60/test/mdbox/mailboxes/INBOX doesn't exist yet, using default permissions dsync(test): Debug: Namespace INBOX.: Using permissions from /vmail/98/60/test/mdbox: mode=0700 gid=default dsync(test): Debug: Namespace INBOX.: /vmail/98/60/test/mdbox/mailboxes/Inbox doesn't exist yet, using default permissions dsync(test): Debug: Namespace INBOX.: Using permissions from /vmail/98/60/test/mdbox: mode=0700 gid=default dsync(test): Debug: Namespace INBOX.: /vmail/98/60/test/mdbox/mailboxes/Trash doesn't exist yet, using default permissions dsync(test): Debug: Namespace INBOX.: Using permissions from /vmail/98/60/test/mdbox: mode=0700 gid=default dsync(test): Debug: Namespace INBOX.: /vmail/98/60/test/mdbox/mailboxes/Virus doesn't exist yet, using default permissions dsync(test): Debug: Namespace INBOX.: Using permissions from /vmail/98/60/test/mdbox: mode=0700 gid=default dsync(test): Debug: brain S: Remote mailbox tree: INBOX guid=00000000000000000000000000000000 uid_validity=0 uid_next=0 subs=no last_change=0 last_subs=0 dsync(test): Debug: brain S: Mailbox INBOX: local=c92f64f79f0d1ed01e6d5b314f04886c/0/1, remote=00000000000000000000000000000000/0/0: mailbox not selectable yet dsync(test): Debug: brain S: Mailbox INBOX.Inbox: local=75ceb79ba5cc13bafa102509369c2b53/0/1, remote=00000000000000000000000000000000/0/0: mailbox not selectable yet dsync(test): Debug: brain S: Mailbox INBOX.Trash: local=b36f688eae08506001091708006abe5a/0/1, remote=00000000000000000000000000000000/0/0: mailbox not selectable yet dsync(test): Debug: brain S: Mailbox INBOX.Virus: local=ad4aa8b5829399ff85164d3444e38fbc/0/1, remote=00000000000000000000000000000000/0/0: mailbox not selectable yet dsync(test): Debug: doveadm-sieve: Iterating Sieve mailbox attributes dsync(test): Debug: sieve: Pigeonhole version 0.4.10 initializing dsync(test): Debug: sieve: include: sieve_global is not set; it is currently not possible to include `:global' scripts. dsync(test): Debug: sieve: file storage: Using active Sieve script path: /vmail/98/60/test/.dovecot.sieve dsync(test): Debug: sieve: file storage: Using script storage path: /vmail/98/60/test/sieve dsync(test): Debug: sieve: file storage: Using permissions from /vmail/98/60/test/sieve: mode=0700 gid=-1 dsync(test): Debug: sieve: file storage: Relative path to sieve storage in active link: sieve/ dsync(test): Debug: sieve: file storage: sync: Synchronization active dsync(test): Debug: brain M: Import INBOX: Last common UID=0. Delayed expunges= dsync(test): Debug: brain M: Import INBOX: Import change GUID= UID=1 hdr_hash=8b6ce6a1b9723d158b197ae06192fff8 result=Mail's UID is above local UIDNEXT - No more local mails found dsync(test): Debug: brain M: Import INBOX: Import change GUID= UID=2 hdr_hash=485376b34877787de6427db7cfd957e0 result=New mail dsync(test): Debug: brain M: Import INBOX: Import change GUID= UID=3 hdr_hash=42ce4c8b6e56f40977d1ab7fef7ebf45 result=New mail dsync(test): Debug: brain M: Import INBOX: Import change GUID= UID=4 hdr_hash=8b11d185c681e1caa517810082d50ec2 result=New mail dsync(test): Debug: brain M: Import INBOX: Import change GUID= UID=5 hdr_hash=a86b2a374829fc3b006516499d9a986e result=New mail dsync(test): Debug: pop3c(imap.internal): Looking up IP address dsync(test): Debug: pop3c(imap.internal): Connecting to xxx.xxx.xxx.xxx:110 dsync(test): Debug: pop3c(imap.internal): Authenticating as test dsync(test): Debug: pop3_migration: 1/5 mails matched by size dsync(test): Debug: pop3_migration: 5 mails matched by headers dsync(test): Debug: brain M: import mail uid 1 guid dsync(test): Debug: brain M: Import INBOX: Import mail body for GUID= UID=1 dsync(test): Debug: brain M: import mail uid 2 guid dsync(test): Debug: brain M: Import INBOX: Import mail body for GUID= UID=2 dsync(test): Debug: brain M: import mail uid 3 guid dsync(test): Debug: brain M: Import INBOX: Import mail body for GUID= UID=3 dsync(test): Debug: brain M: import mail uid 4 guid dsync(test): Debug: brain M: Import INBOX: Import mail body for GUID= UID=4 dsync(test): Debug: brain M: import mail uid 5 guid dsync(test): Debug: brain M: Import INBOX: Import mail body for GUID= UID=5 dsync(test): Info: copy from INBOX: box=INBOX, uid=1, msgid=<20151211150712.85a89120...@mx1.agenturserver.de>, size=1728 dsync(test): Info: copy from INBOX: box=INBOX, uid=2, msgid=<20160102105621.640c962...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX: box=INBOX, uid=3, msgid=<20160102170756.9923862...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX: box=INBOX, uid=4, msgid=<20160102170803.55a6d62...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX: box=INBOX, uid=5, msgid=<20160102170814.ace8f62...@ilpostino.jpberlin.de>, size=810 dsync(test): Debug: brain M: Import INBOX: Saved UIDs: 1:5 dsync(test): Debug: brain M: Import INBOX: Finish update: min_next_uid=9 min_first_recent_uid=6 min_highest_modseq=1 min_highest_pvt_modseq=0 dsync(test): Debug: brain M: Import INBOX: Reassign UIDs: 6:8 dsync(test): Debug: brain M: Import INBOX.Inbox: Last common UID=0. Delayed expunges= dsync(test): Debug: brain M: Import INBOX.Inbox: Import change GUID= UID=1 hdr_hash=8b6ce6a1b9723d158b197ae06192fff8 result=Mail's UID is above local UIDNEXT - No more local mails found dsync(test): Debug: brain M: Import INBOX.Inbox: Import change GUID= UID=2 hdr_hash=485376b34877787de6427db7cfd957e0 result=New mail dsync(test): Debug: brain M: Import INBOX.Inbox: Import change GUID= UID=3 hdr_hash=42ce4c8b6e56f40977d1ab7fef7ebf45 result=New mail dsync(test): Debug: brain M: Import INBOX.Inbox: Import change GUID= UID=4 hdr_hash=8b11d185c681e1caa517810082d50ec2 result=New mail dsync(test): Debug: brain M: Import INBOX.Inbox: Import change GUID= UID=5 hdr_hash=a86b2a374829fc3b006516499d9a986e result=New mail dsync(test): Debug: brain M: import mail uid 1 guid dsync(test): Debug: brain M: Import INBOX.Inbox: Import mail body for GUID= UID=1 dsync(test): Debug: brain M: import mail uid 2 guid dsync(test): Debug: brain M: Import INBOX.Inbox: Import mail body for GUID= UID=2 dsync(test): Debug: brain M: import mail uid 3 guid dsync(test): Debug: brain M: Import INBOX.Inbox: Import mail body for GUID= UID=3 dsync(test): Debug: brain M: import mail uid 4 guid dsync(test): Debug: brain M: Import INBOX.Inbox: Import mail body for GUID= UID=4 dsync(test): Debug: brain M: import mail uid 5 guid dsync(test): Debug: brain M: Import INBOX.Inbox: Import mail body for GUID= UID=5 dsync(test): Info: copy from INBOX.Inbox: box=INBOX.Inbox, uid=1, msgid=<20151211150712.85a89120...@mx1.agenturserver.de>, size=1728 dsync(test): Info: copy from INBOX.Inbox: box=INBOX.Inbox, uid=2, msgid=<20160102105621.640c962...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX.Inbox: box=INBOX.Inbox, uid=3, msgid=<20160102170756.9923862...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX.Inbox: box=INBOX.Inbox, uid=4, msgid=<20160102170803.55a6d62...@ilpostino.jpberlin.de>, size=810 dsync(test): Info: copy from INBOX.Inbox: box=INBOX.Inbox, uid=5, msgid=<20160102170814.ace8f62...@ilpostino.jpberlin.de>, size=810 dsync(test): Debug: brain M: Import INBOX.Inbox: Saved UIDs: 1:5 dsync(test): Debug: brain M: Import INBOX.Inbox: Finish update: min_next_uid=9 min_first_recent_uid=6 min_highest_modseq=1 min_highest_pvt_modseq=0 dsync(test): Debug: brain M: Import INBOX.Inbox: Reassign UIDs: 6:8 dsync(test): Debug: brain S: Skipping unchanged mailbox b36f688eae08506001091708006abe5a dsync(test): Debug: brain M: Import INBOX.Virus: Last common UID=0. Delayed expunges= dsync(test): Debug: brain M: Import INBOX.Virus: Import change GUID= UID=1 hdr_hash=3050b625f10893aee8596fd5c0724f7e result=Mail's UID is above local UIDNEXT - No more local mails found dsync(test): Debug: brain M: Import INBOX.Virus: Import change GUID= UID=2 hdr_hash=1f64a72e2fae1ea430d5cbe9f8a20185 result=New mail dsync(test): Debug: brain M: import mail uid 1 guid dsync(test): Debug: brain M: Import INBOX.Virus: Import mail body for GUID= UID=1 dsync(test): Debug: brain M: import mail uid 2 guid dsync(test): Debug: brain M: Import INBOX.Virus: Import mail body for GUID= UID=2 dsync(test): Info: copy from INBOX.Virus: box=INBOX.Virus, uid=1, msgid=<5687c290.5000...@alec.pl>, size=6537 dsync(test): Info: copy from INBOX.Virus: box=INBOX.Virus, uid=2, msgid=<CAO3naw4YbqrLnyMyXmRnAekbnPmf=v73vsw7-hocvzbz+gf...@mail.gmail.com>, size=8909 dsync(test): Debug: brain M: Import INBOX.Virus: Saved UIDs: 1:2 dsync(test): Debug: brain M: Import INBOX.Virus: Finish update: min_next_uid=3 min_first_recent_uid=3 min_highest_modseq=1 min_highest_pvt_modseq=0 dsync(test): Debug: imapc(imap.internal:143): Disconnected