Skip to main content
Prism MigrationPrism Migration
Cloud Migration

Migrate cPanel Webmail to Microsoft 365 Directly (2026 Guide)

D
David Vance Author

Senior Cloud Infrastructure Architect

8 min read · Published August 16, 2026
Executive Summary & Key Takeaway

Moving from shared cPanel webmail hosting to Microsoft 365? Learn how to migrate Roundcube/Horde mailboxes directly to M365 tenants with full OAuth 2.0 PKCE.

On This Page (10 sections) ▾
✦Tip

Quick Answer (Migrating cPanel Webmail to Microsoft 365):

Exporting mailboxes larger than 2GB through Roundcube triggers PHP 300s socket timeouts. To migrate cleanly to Microsoft 365:

  1. Direct IMAP Sync: Run Prism IMAP Backup Tool connecting to cPanel on Port 993 (SSL), exporting directly to PST or streaming to M365 via Modern Auth.
  2. Exchange Admin Center (EAC): In Microsoft 365 admin center, create an IMAP migration batch using CSV mapping (EmailAddress,UserName,Password).
  3. Lower TTL 48h Ahead: Drop DNS MX/SPF TTL to 300 seconds before cutover to ensure minimal propagation delay during domain transfer.

Upgrading shared cPanel webmail hosting (Roundcube or Horde) to Microsoft 365 (Exchange Online) forms the backbone of countless corporate IT modernization projects.

Executing a clean migration without dropping messages or creating extended MX record downtime requires structured preparation.

CODE / SCRIPTCode / Script
┌────────────────────────────────┐       ┌────────────────────────────────┐
│   cPanel Webmail Server        │ ───>  │   Microsoft 365 Cloud          │
│  (Roundcube / Maildir Storage) │       │   (Exchange Online Primary /   │
│  Port 993 (SSL)                │       │    In-Place Online Archive)    │
└────────────────────────────────┘       └────────────────────────────────┘

Here is a practical guide to streaming single mailboxes or multi-user cPanel domains straight into Exchange Online.


Pre-Migration Checklist: Gathering Server Parameters

Gather your cPanel connection parameters before beginning:

  • cPanel Server Hostname: mail.yourdomain.com or serverXX.web-hosting.com
  • IMAP Port: 993 (SSL/TLS enforced)
  • Authentication: Standard cPanel email address and mailbox password
  • Microsoft 365 Tenant: Admin access with Exchange Administrator privileges

The Critical Gotcha: cPanel Email Routing (Local vs. Remote Exchanger)

A common challenge during cPanel to Microsoft 365 cutovers occurs with website contact forms and automated billing scripts running on the same cPanel server.

By default, cPanel sets Email Routing to Local Mail Exchanger. When a contact form on your WordPress site sends an email to sales@yourdomain.com, the local Exim mail transfer agent sees that the domain exists locally and drops the message into the local cPanel inbox, bypassing your new Microsoft 365 MX records.

How to Fix in cPanel:

  1. Log into your cPanel Dashboard.
  2. Navigate to Email > Email Routing.
  3. Select your domain.
  4. Change the routing setting from Automatically Detect Configuration or Local Mail Exchanger to Remote Mail Exchanger.
  5. Click Change.

This forces the local server to route all outgoing emails through external public DNS, ensuring inquiries reach Microsoft 365.


Method 1: Direct Cloud-to-Cloud Automated Streaming (Live Background Sync)

For multi-mailbox deployments, staging through local PST files can be time-consuming. Using the Prism IMAP Backup Tool streams mailboxes directly to Microsoft 365 without saving intermediate files to disk:

CODE / SCRIPTCode / Script
┌───────────────────────────┐      ┌──────────────────────────────┐      ┌───────────────────────────┐
│     cPanel Host Server    │ ───> │   Prism IMAP Stream Relay    │ ───> │  Microsoft 365 Tenant     │
│   (mail.domain.com:993)   │      │  (Multi-Threaded REST Stream)│      │  (Direct M365 Mailboxes)  │
└───────────────────────────┘      └──────────────────────────────┘      └───────────────────────────┘
  1. Launch the migration engine, select cPanel / Webmail, and enter mail.yourdomain.com along with a CSV list of user credentials for batch runs.
  2. Select Microsoft 365 as the destination and authenticate via Microsoft Graph OAuth 2.0 PKCE.
  3. Map each cPanel account to its target M365 user or Shared Mailbox.
  4. Click Migrate to stream messages, nested folders, and attachments directly into Exchange Online.
ℹNote

Free Trial Evaluation: The demo edition migrates up to 50 items per folder, allowing administrators to verify connection parameters, OAuth 2.0 authentication, and folder mapping before licensing.


Method 2: Native Microsoft 365 EAC IMAP Migration Batch

The built-in Exchange Admin Center (EAC) gives administrators a native IMAP engine.

Log into the Exchange Admin Center (https://admin.exchange.microsoft.com). Head into Migration > Endpoints > Add Endpoint, pick IMAP, name it cPanel-Endpoint, and set the server to mail.yourdomain.com on port 993 using Basic auth and SSL encryption.

Build a CSV file named cpanel_users.csv structured like this:

CODE / SCRIPTCSV
EmailAddress,UserName,Password
john.doe@company.com,john.doe@company.com,UserPassword123!
jane.smith@company.com,jane.smith@company.com,UserPassword456!

Head to Migration > Add Migration Batch inside EAC, upload that CSV, pick your endpoint, and start the job. Keep an eye on the dashboard until every mailbox hits the Synced status.

⚠Warning

Limitations of Native EAC IMAP Sync:

  • Does not migrate contacts or calendars.
  • Microsoft throttles third-party IMAP endpoints to ~1GB per hour per mailbox.
  • If passwords fail or change during cutover, the entire batch halts.

Shared Mailboxes: Saving Microsoft 365 Licensing Fees

When migrating generic addresses like info@company.com, billing@company.com, or support@company.com, do not purchase expensive $6 to $22/month user licenses.

In Exchange Online, Shared Mailboxes do not require a separate user license up to 50 GB of storage:

CODE / SCRIPTPowerShell
# Create a free shared mailbox for generic departmental accounts
New-Mailbox -Shared -Name "Billing Inquiries" -PrimarySmtpAddress billing@company.com

# Grant members full access to open the mailbox alongside their personal inbox
Add-MailboxPermission -Identity billing@company.com -User admin@company.com -AccessRights FullAccess -InheritanceType All
Add-RecipientPermission -Identity billing@company.com -Trustee admin@company.com -AccessRights SendAs

During migration in the Prism engine, target these shared mailboxes directly to ingest historical cPanel archives without consuming paid licenses.


Post-Migration: Switching DNS MX, SPF, and DKIM Records

Cutover time arrives once the baseline sync finishes.

Lower your DNS Time-to-Live (TTL) down to 300 seconds a full day beforehand.

Point your domain's MX Record squarely at Microsoft 365:

CODE / SCRIPTCode / Script
Priority: 0
Host: @
Points to: yourdomain-com.mail.protection.outlook.com

Patch up your SPF entry to authorize Microsoft 365 mail servers:

CODE / SCRIPTDNS
v=spf1 include:spf.protection.outlook.com -all

Configure DKIM by adding Microsoft 365 selector CNAMEs in your cPanel Zone Editor:

CODE / SCRIPTDNS
selector1._domainkey.yourdomain.com CNAME selector1-yourdomain-com._domainkey.tenant.onmicrosoft.com
selector2._domainkey.yourdomain.com CNAME selector2-yourdomain-com._domainkey.tenant.onmicrosoft.com

Run one final delta sync to sweep up any stray messages that landed during DNS propagation.


Method 3: Manual Export via Roundcube Webmail (Single Mailbox Fallback)

If you are only migrating a single mailbox or an executive user who cannot share their password, you can export directly from the Roundcube web interface:

  1. Log into your cPanel Webmail (https://yourdomain.com:2096) and open Roundcube.
  2. Click on the folder you need (e.g., Inbox).
  3. Select the messages you wish to download (or click Select All).
  4. Click the More icon (three dots) in the top action toolbar and choose Download (.eml) or Download as .zip.
  5. To export an entire folder as an MBOX file, click the Folder Actions gear icon at the bottom of the folder list and select Export folder.

Once downloaded, import the resulting .eml or .mbox files into Microsoft Outlook or batch convert them using the EML Converter Tool.


Migration Architecture Comparison

Feature / CapabilityPrism Direct Stream RelayNative EAC IMAP BatchManual Roundcube Export
Speed / ThroughputMulti-threaded StreamingThrottled by M365 (~1 GB/hr)Manual, folder-by-folder
AuthenticationModern OAuth 2.0 PKCEBasic Auth (Plaintext CSV)Web Session Cookie
Preserves Folder TreeYes (Exact nested hierarchy)Flat or partial subfoldersNo (Requires re-sorting)
User Password HandlingSecure token / Admin relayRequires cleartext user passwordsHandled by user
Downtime ImpactMinimal (Pre-cutover sync)Low (DNS cutover required)High manual overhead

Frequently Asked Questions

Will migrating cPanel webmail delete my original emails from the hosting server?

No. The migration processes read message streams via IMAP port 993 and duplicate them into Exchange Online. Original messages remain untouched on your cPanel server until you choose to terminate your hosting package.

How do I handle cPanel email addresses that don't match Microsoft 365 usernames?

Map them using a migration mapping CSV. For example, assign info@yourdomain.com on cPanel to an Exchange Online Shared Mailbox so you don't burn an expensive Microsoft 365 Business license on a generic alias.

Why does native EAC IMAP migration fail with timeout errors on cPanel?

Most shared web hosts (GoDaddy, Bluehost, Hostinger) enforce strict connection concurrency limits per IP address (often capping connections at 10 simultaneous IMAP sessions in dovecot.conf). Microsoft's cloud servers flood the host with connections, triggering a temporary IP ban.

How do I migrate Roundcube calendars and address books to Microsoft 365?

IMAP only synchronizes emails. To move Roundcube contacts and calendars, go into Roundcube Contacts > Export (vCard .vcf), and Calendar > Export (.ics). Import these files directly into the user's Outlook Web App (OWA).

What happens to email forwarders created in cPanel?

cPanel forwarders do not transfer automatically over IMAP. Recreate required forwarding rules in Microsoft 365 Admin Center under Mail flow > Rules or by adding email aliases directly to the appropriate user mailboxes.


Summary & Next Steps

Migrating cPanel webmail over to Microsoft 365 gives your organization enterprise high availability, shared mailbox collaboration, and modern spam filtering.

Related Guides: Migrating raw Linux mail directories? See How to Convert cPanel Maildir to Outlook PST. Calculate total cloud transfer times with our Mailbox Size Calculator.

Recommended Automated Utility Windows 11 & 10 (64-bit) & macOS

IMAP Backup Tool

Backup, convert, export, and migrate any IMAP mailbox — cPanel, Gmail, Yahoo, Zoho, Zimbra, Exchange — to local and cloud formats (PST, PDF, MBOX, EML, Office 365, Gmail). Standalone 64-bit engine with SQLite resume, Port 993 SSL/TLS, and zero Outlook required. Free trial for Windows 11 & Mac.

Windows 11 & 10 (64-bit) & macOS 1, 2 & 3-Year License Options Free Trial (50 items/folder)