Can sync/migrate all mail from remote imap account except the main "INBOX"

Darren Mobley decker at n3t.net
Tue May 17 21:31:14 UTC 2022


Thanks for the replies, Paul and Sami !

So if I understand correctly, because the local server has the following config:


  prefix = INBOX.

  separator = .


doveadm-sync is reading the INBOX as INBOX.INBOX


1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE NAMESPACE LITERAL+ NOTIFY SPECIAL-USE COMPRESS=DEFLATE QUOTA] Logged in

2 list "" "*"

* LIST (\HasChildren) "." INBOX

* LIST (\HasNoChildren \UnMarked \Junk) "." INBOX.spam

* LIST (\HasNoChildren \UnMarked \Sent) "." INBOX.Sent

* LIST (\HasNoChildren \UnMarked) "." "INBOX.Travel Deals"

* LIST (\HasNoChildren \UnMarked) "." INBOX.Templates

* LIST (\HasNoChildren \UnMarked) "." INBOX.Spam

* LIST (\HasNoChildren \UnMarked) "." INBOX.Queue

* LIST (\HasChildren \UnMarked) "." INBOX.Mailspring

* LIST (\HasNoChildren \UnMarked) "." INBOX.Mailspring.Snoozed

* LIST (\HasNoChildren \UnMarked) "." "INBOX.Commercial Spam"

* LIST (\HasNoChildren \UnMarked \Archive) "." INBOX.Archive

* LIST (\HasNoChildren \UnMarked \Trash) "." INBOX.Trash

* LIST (\HasNoChildren \UnMarked \Drafts) "." INBOX.Drafts

2 OK List completed (0.002 + 0.000 + 0.001 secs).

3 logout

* BYE Logging out

3 OK Logout completed (0.001 + 0.000 secs).

So adding "-o imapc_list_prefix=INBOX" to the doveadm command line should fix that, I would think ?

When I tested, the version without the new args:


May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Ignore nonexistent mailbox GUID c92f64f79f0d1ed01e6d5b314f04886c with -1 sync

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: We don't have mailbox c92f64f79f0d1ed01e6d5b314f04886c

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain M: Ignoring missing remote box GUID c92f64f79f0d1ed01e6d5b314f04886c

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Archive: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.INBOX.Archive: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox e94acd62db4233e3f7add6d6159b1d11

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Drafts: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.INBOX.Drafts: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox 004ef77f6a9c3669bcb43012f3a43855

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.INBOX.Junk: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.INBOX.Junk: Mailbox opened

May 17 16:18:39 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox 4849549b42c9c7de02f5e49cfa8ae258

versus with the new args:


May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Ignore nonexistent mailbox GUID c92f64f79f0d1ed01e6d5b314f04886c with -1 sync

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: We don't have mailbox c92f64f79f0d1ed01e6d5b314f04886c

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain M: Ignoring missing remote box GUID c92f64f79f0d1ed01e6d5b314f04886c

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Archive: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Archive: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox e94acd62db4233e3f7add6d6159b1d11

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Drafts: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Drafts: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox 004ef77f6a9c3669bcb43012f3a43855

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.INBOX.Junk: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: Mailbox INBOX.Junk: Mailbox opened

May 17 16:19:33 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Skipping unchanged mailbox 4849549b42c9c7de02f5e49cfa8ae258

So it does seem to have an affect, but the INBOX is still not populated.

Since I can't change the config on these servers, and I'm running out of time, I'll probably just do something like imapsync to get the migrations going.

I appreciate the help!
Thanks,
Darren








---- On Tue, 17 May 2022 10:01:39 -0500 Sami Ketola <sami at ketola.io> wrote ----





On 13. May 2022, at 22.17, Darren Mobley <mailto:decker at n3t.net> wrote:

May 13 13:28:17 dsync(mailto:saywhatnow at letest.tld): Debug: brain M: Local mailbox tree: INBOX guid=980aa92b41a37e62cd0f0000537c03e1 uid_validity=1652466497 

May 13 13:28:17 dsync(mailto:saywhatnow at letest.tld): Debug: brain S: Local mailbox tree: INBOX.INBOX guid=00000000000000000000000000000000 uid_validity=0 







So your remote has INBOX and INBOX.INBOX. This is quite special case for imapc connector and cannot be solved easily. I did hit this once at a customer when I was doing migrations for them.

This was few years a go and unfortunately I cannot remember how the problem was solved. I remember that it required TWO separate dsync runs to migrate INBOX separately and remaining folders in another run.

I wrote a workaround to the migration framework to monitor the migration logs and then apply workarounds if end user and this strange INBOX.INBOX setup.



Unfortunately that is all I can remember about it and I've since left Open Xchange and do not have an access to my old migration toolkit bits and command line documentations.



Sami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20220517/584e1458/attachment-0001.htm>


More information about the dovecot mailing list