Migration Guide: Microsoft Exchange Server cPanel Mail Server
At a glance#
- Purpose: Migrate mailboxes from an on-premises Microsoft Exchange server to cPanel-hosted email.
- Applies to: Exchange 2013+ to cPanel & WHM.
- Risk: High - mail is in flight during migration; incorrect DNS causes delivery failures.
- Time: Plan for several days including DNS propagation.
1. Overview#
This document outlines the process for migrating all mail services, user accounts, and DNS configurations from an on-premises Microsoft Exchange Server to a cPanel-based mail server. It also covers pre-migration checks, required tools, step-by-step migration tasks, and post-migration validation.
The goal is to complete the migration with minimal downtime and avoid data loss.
Recommended Method#
IMAP Migration (Mailbox-by-Mailbox) using:
- cPanel’s Email Account Importer
- or an external tool such as imapsync
- or manual mailbox export/import using PST → IMAP upload
What Will Migrate#
- Emails (Inbox, Sent, Folders)
What Will NOT Migrate Automatically#
Exchange-specific features:
- Contacts
- Calendars
- Rules
- Tasks
- Shared mailboxes
- Public folders
If needed, I can give steps for exporting/importing Contacts/Calendars as .CSV/.ICS.
You need access to:#
- Exchange admin account
- cPanel admin account (WHM access if possible)
- DNS panel for domain
- IMAP enabled on Exchange
- User list from Exchange
Tools (choose one):#
- imapsync (most reliable, especially for 250 users)
- cPanel Email Migration Tool
- Outlook desktop for PST exports (fallback method)
Server Checks#
- Exchange server is stable, reachable externally via IMAP
- All mailboxes functioning
- IMAP service enabled on Exchange
- No database errors
- No size limits blocking export
- Enough disk space on cPanel
User/Account Checks#
- List all users with mailbox sizes
- Disable inactive or unnecessary accounts
- Inform users about the migration
- Set a migration window
DNS & Network#
- Document current DNS:
- MX
- SPF
- DKIM
- Autodiscover
- Make sure you know where DNS is controlled
- Gather public IP of cPanel mail server
Data Protection#
- Full Exchange backup
- Export at least 3 random mailbox PSTs to verify integrity
Step 1 — Create Mail Accounts in cPanel#
Two methods:
Option A: WHM Create Email Accounts (Bulk)#
Upload CSV to create 250 users automatically.
Option B: Manually in cPanel#
cPanel → Email Accounts → Add
Important:
Use the same usernames as Exchange (before @domain.com).
Step 2 — Prepare Exchange for IMAP Migration#
Enable IMAP on Exchange#
In PowerShell:
Set-Service MSExchangeIMAP4 -StartupType Automatic
Start-Service MSExchangeIMAP4
Start-Service MSExchangeIMAP4BE
Allow IMAP externally#
Firewall rules:
- Port 143 (IMAP)
- Port 993 (IMAPS)
Test using:
telnet mail.domain.com 993
Step 3 — Choose Migration Method#
Install imapsync on Linux server or locally#
Command format:
imapsync \
--host1 exchange.domain.com \
--user1 user@domain.com --password1 "password" \
--host2 mail.newserver.com \
--user2 user@domain.com --password2 "newpassword" \
--ssl1 --ssl2
You run this per mailbox.
To automate 250 users, prepare a CSV and script.
(I can generate the script if you want.)
Advantages:
- Zero downtime
- Multi-pass sync (can sync again before final cutover)
In cPanel:
Email Accounts → Migrate Email Accounts
Enter:
- Source server: Exchange IMAP hostname
- Port: 993
- User credentials
cPanel auto-copies the mailbox.
Use Outlook:
- Export mailbox as PST
- Add new IMAP account (cPanel)
- Drag/drop folders to sync
This is labor-intensive and not ideal for 250 accounts.
After at least one full IMAP sync…
Step 1 — Lower DNS TTL (1 hour or less)#
Step 2 — Final Sync#
Run imapsync again to catch new emails.
Step 3 — Change DNS Records#
Update:
MX Record → cPanel Mail Server
SPF → include:cPanel
DKIM → Enable in cPanel
DMARC → Optional but recommended
Step 4 — Disable Exchange#
- Stop IIS
- Disable mail flow connectors
- Shutdown IMAP service
Email Delivery Tests#
- Send inbound email
- Send outbound email
- Test from external networks
Functionality Tests#
- Webmail (Roundcube)
- SMTP Authentication
- IMAP login
- Folder structure
DNS Review#
- MX pointing correctly
- SPF passes
- DKIM signing emails correctly
- DMARC reporting enabled
User-Side Actions#
- Reconfigure Outlook/Phone
- Recreate signatures
- Export/Import calendars and contacts if needed
Decommissioning Exchange (Optional)#
Only after 7–14 days of stable operations:
- Remove send connectors
- Disable services
- Remove from domain
- Document shutdown
| Phase | Duration |
|---|---|
| Planning & Pre-Checks | 1–2 days |
| Create cPanel users | 1 day |
| First IMAP sync | 1–3 days (depends on size & bandwidth) |
| Final sync + DNS cutover | 2–4 hours |
| User refactoring | 1 day |
| Monitoring | 3–7 days |
Total estimated time: ~5–10 days depending on mailbox size & speed.
Risk: Large mailbox hangs / timeout#
→ Use imapsync with multiple passes
Risk: Password mismatch#
→ Reset passwords in cPanel first
Risk: DNS propagation delays#
→ Lower TTL before migration
Risk: Contacts/Calendars lost#
→ Export all users’ CSV (contacts) and ICS (calendar) before cutover
Risk: Users complaining email missing#
→ Keep Exchange online (IMAP) for a week after cutover