Wednesday 12 August 2015

Migrate your mail data using imapSync

Recently tried IMAPSync tool to migrate some mails off a google account to a local domino server as well as to my Connections cloud account. I used the below steps for the migration. Note that I used a windows machine to run the batch file and the syntax mentioned below apply to a windows desktop environment and would differ for a linux client.

1) Download and unzip the latest imapSync utility.
2) Edit the batch file with the below:

.\imapsync.exe ^
           --host1 imap.gmail.com ^
           --user1 "username@gmail.com" ^
           --password1 "gmailsecretpassword" ^
           --ssl1 ^
           --authmech1 LOGIN ^
           --host2 imap.notes.na.collabserv.com ^
           --user2 "collabservuser@collabservdomain.com" ^
           --password2 "collabservsecret" ^
           --ssl2 ^
           --maxbytespersecond 500000 ^
           --useheader="X-Gmail-Received" ^
           --useheader "Message-Id" ^
           --automap ^
          
--addheader ^
           --sep2 "/"  ^
           --prefix2 ""


3) Save the batch file
4) Run the batch file by double clicking the file

*** Edit Notes ***
Added the --addheader to synchronize the sent folder to Gmail/Sent folder
Added the --sep2 and --prefix2 to synchronize the nested folders.
Removed --skipcrossduplicates to make sure that messages marked with multiple labels appear in separate folders
*** End Edit Notes ***

To test the connections you could first use the --dry and --justfolders options..
Some points to take care..
A) Your google account should allow less secure devices to connect --> Link
B) Your google account should not be set for application passwords --> Link
C) You should have IMAP enabled on IBM Connections account

To test out the settings you can try telnet to the hosts on port 993.
To further test out the settings you could try to connect the two account using a mail client such as outlook / thunderbird over imap.

If you wish to migrate emails to a local domino server which doesn't use SSL, you would need to telnet on port 143 and the option --ssl2 will need to be removed in the above batch file.

The batch file for migrating mails to a local domino server over imap would look as below:

.\imapsync.exe ^
           --host1 imap.gmail.com ^
           --user1 "gmailuser@gmail.com" ^
           --password1 "gmailpassword" ^
    --ssl1 ^
        --authmech1 LOGIN ^
           --host2 domino.server.fqdn ^
           --user2 "dominouserid" ^
           --password2 "dominopassword" ^
                      --maxbytespersecond 500000 ^
           --useheader="X-Gmail-Received" ^
           --useheader "Message-Id" ^
           --automap ^
           --skipcrossduplicates


Thanks for great documentation provided by author of imapsync Gilles LAMIRAL -> http://imapsync.lamiral.info/

No comments:

Post a Comment