For anyone looking for the solution to this…
I had a domain on Zoho Free, and wanted to transfer the domain mailboxes to another email server. Zoho Free does not allow IMAP! So it wasn’t possible to use Imapsync or any other IMAP-2-IMAP tool. I will describe below what I did on a Linux box, for each mailbox, to transfer all the .EML file from my file system to the new IMAP email server. Although this procedure has to do with Zoho, most of it is provider independent.
a) In Zoho settings there is an option to export mailbox contents as .EML files. There is an option to include any sub-folders you may have under Inbox
b) Download the ZIP file(s) and extract them in a folder structure like this:
MainFolder: In here create a directory named cur and any other directories you may have in Inbox. Note to start the directory names with “.” If your directory is Work, then create the directory .Work
MainFolder/cur: Place in here all the .EML files that are inside the ZIP file(s) you extracted
MainFolder/.Work: Create a sub-directory named cur and place in that all the .EML files you extracted from your “Work” IMAP directory. Note that all .EML files are placed inside the cur directories.
Repeat for all IMAP directories
c) Create a file users.txt (or any other name you like) inside the MainFolder and place in there this:
/path/MainFolder/,user@example.com,uSeRpAsSwOrD
It’s 3 values, separated with commas: File System Path where .EML files are, Email Server User Login, Email Server Password
d) Download andrewnimmo/rick-sanders-imap-toolsblob/master/maildir_to_imap.pl
e) Run perl maildir_to_imap.pl -i /path/MainFolder/users.txt -D FQDN.server.com:993
This will load authentication information from users.txt to connect to the new email server, and copy there all the .EML files inside Inbox (cur directory) and all sub-directories, creating all these IMAP directories at the same time on the email server.
Remember to export Sent directory as well and any other IMAP directories you may have/need.
Please note, that your Linux box need to have perl (but I guess that’s default nowadays)