This guide walks you through migrating email accounts from Office 365 to cPanel using the imapsync tool. The process involves installing imapsync on your cPanel server and running a synchronization command to transfer all emails from your Office 365 account to your cPanel email account.

Prerequisites

Before starting the migration, gather the following information:

  • Office 365 email account, username, and password
  • cPanel email account username and password
  • Access to your cPanel server terminal

How to Migrate

  1. Step 1: Install imapsync

    If you don't have the imapsync tool installed on your cPanel server, install it using the following command:

    sudo yum install imapsync
  2. Step 2: Create password files

    Create two files to store your passwords securely. Replace shnikarts with your actual cPanel account username:

    /home/shnikarts/pass1

    Save your Office 365 account password in this file.

    /home/shnikarts/pass2

    Save your cPanel account password in this file.

  3. Step 3: Run the migration command

    Execute the imapsync command on your cPanel server. Replace the example values with your actual account details:

    imapsync --host1 outlook.office365.com --port1 993 --ssl1 --user1 nusrat@thatisfun.in --passfile1 /home/shnikarts/pass1 --host2 eternity.herosite.pro --port2 993 --ssl2 --user2 nusrat@thatisfun.in --passfile2 /home/shnikarts/pass2

    Where:

    • --host1: Office 365 IMAP server (outlook.office365.com)
    • --user1: Your Office 365 email address
    • --passfile1: Path to file containing Office 365 password
    • --host2: Your cPanel server hostname
    • --user2: Your cPanel email address
    • --passfile2: Path to file containing cPanel password
  4. Step 4: Monitor the migration

    The imapsync tool will display progress information as it transfers your emails. Wait for the process to complete. The duration depends on the amount of email data being migrated.