imapsync is great, but you have to read the README and learn about the parameters of imapsync.
First of all comes the login:
From capability : QUOTA STARTTLS NAMESPACE IDLE THREAD=ORDEREDSUBJECT SORT UIDPLUS CHILDREN IMAP4REV1 THREAD=REFERENCES
To capability : ID QUOTA NAMESPACE STARTTLS LOGIN-REFERRALS UNSELECT LITERAL+ UIDPLUS CHILDREN IMAP4REV1
From state Authenticated
To state Authenticated
From separator and prefix : [.][INBOX.]
To separator and prefix : [/][]
After that comes the analysis without coping messages
This can take a very long time depending of the mailboxsize and number of folders. Think on hours not minutes
and do not press Crtl+C
Third comes coping messages:
From Folder [inbox.databases]
To Folder [inbox/databases]
++++ From [inbox.databases] Parse 1 ++++
++++ To [inbox/databases] Parse 1 ++++
++++ Verifying [inbox.databases] -> [inbox/databases] ++++
Time : 6 s
++++ Statistics ++++
Time : 41 sec
Messages transfered : 29
Messages skipped : 0
Total bytes transfered : 684444
Total bytes skipped : 0
Total bytes error : 0
Detected 0 errors
With the parameter folder you can sync only one folder e.g. for testing:
imapsync --nosyncacls --syncinternaldates --debugimap --debug
--host1 myhost1 --user1 username1 --password1 userpassword1
--host2 myhost2 --user2 username2 --password2 userpassword2
--folder inbox.databases
be careful with the parameter prefix
imapsync --nosyncacls --syncinternaldates --debugimap --debug
--host1 myhost1 --user1 username1 --password1 userpassword1
--host2 myhost2 --user2 username2 --password2 userpassword2
--prefix1 inbox --prefix2 inbox
was not my friend.
imapsync --nosyncacls --syncinternaldates --debugimap --debug
--host1 myhost1 --user1 username1 --password1 userpassword1
--host2 myhost2 --user2 username2 --password2 userpassword2
--prefix1 inbox
did it right