Migrate cPanel email by copying mail over IMAP before you touch MX, creating matching ArawaMail mailboxes on a Cloudflare domain, cutting MX to ArawaMail only after one successful copy, then setting WHM Email Routing to Remote Mail Exchanger so the old Exim stack stops accepting new local delivery. Historical Maildir does not move when DNS changes. ArawaMail has no documented cPanel importer.
The mailbox that still fills after you “changed MX”
The distinctive cPanel failure is not the first IMAP copy. It is the hosting box that keeps writing new messages under /home/user/mail because the domain is still listed as a local mail exchanger. Public MX already points at ArawaMail. Some senders still hit the old IP from cached DNS. Other mail is generated locally by PHP contact forms, cron, or Exim filters. Until WHM marks the domain as a remote exchanger, cPanel will keep accepting that traffic.
Treat the project as two tracks that only meet at cutover: data copy and mail routing.
What this runbook covers (and what it does not)
This is the cPanel/WHM-specific path onto ArawaMail. The generic operator checklist is a sibling topic; Google Workspace cutover is already documented in how to move business email off Google Workspace.
Out of scope:
- An ArawaMail Maildir importer (it does not exist as a documented product).
- Horde webmail export. Horde was removed from cPanel around version 108.
- Placeholder IMAP/SMTP hostnames from unfinished device docs. Use the live values shown in your ArawaMail account after mailboxes exist.
- Zero-downtime claims if you flip MX before ArawaMail mailboxes exist.
How we analyzed this
Constraints come from how cPanel actually stores and routes mail, and from ArawaMail’s documented domain order:
- cPanel stores mail as Maildir (or mdbox after a WHM conversion). Conversion is not required for an ArawaMail move.
- Typical source IMAP is the cPanel server hostname or
mail.example.comon port 993, username = full email address. - imapsync or a desktop client with both accounts open is the practical copy path.
- IMAP copies messages and folders. It does not reliably copy filters, forwarders, autoresponders, or hosting-panel calendars.
- ArawaMail requires Cloudflare. Nameservers-to-Cloudflare is separate from MX-to-ArawaMail. Cloudflare Email Routing can lock MX and block Activate receiving—disable or unlock Routing first. See connect a Cloudflare domain.
- Documented ArawaMail order: add domain → active Cloudflare zone → Activate receiving → Enable sending → create accounts. Activate receiving warns before replacing existing MX. Confirm only when mailboxes exist and the first copy has succeeded.
- Catch-all evaluation order on ArawaMail is exact mailbox → catch-all → discard. Recreate that policy on purpose; do not assume the old default address follows you. See should you use a catch-all inbox?.
- There is no documented coexistence mode that leaves cPanel MX in parallel with ArawaMail MX. Dual delivery, if you need it, is an operator-built forward during transition.
Track A — inventory and copy
1. Inventory the hosting panel before you touch DNS
Export or screenshot:
- Every mailbox and quota.
- Aliases and plus-address habits (recreate with aliases and shared inboxes).
- Forwarders and the default address / catch-all.
- Autoresponders and server-side filters.
- Any app SMTP that uses the hosting box (WordPress, billing, monitoring). Those must move to ArawaMail sending after cutover—port choice is covered in SMTP ports 25, 465, and 587.
2. Cloudflare without flipping MX yet
If the website still lives on the old host, you can point nameservers at Cloudflare and leave the current MX untouched while you prepare ArawaMail. Mail routing and site hosting do not have to move on the same afternoon. Snapshot current MX, SPF, and DKIM before anyone edits records. Reference: ArawaMail DNS records.
3. Create the destination mailboxes
Add the domain in ArawaMail. Plan the Activate receiving window. Create matching mailboxes after receiving can be turned on. Do not confirm MX replacement until the first IMAP pass looks right on a sample account.
4. First IMAP copy while MX still points at cPanel
Yes, you should copy mail before changing MX. Users keep receiving on the old server while history lands in ArawaMail.
Practical methods:
- A desktop client that adds both the cPanel account and the ArawaMail account, then copies folders. Prefer IMAP on both sides so nothing is deleted from the source. See IMAP vs POP3.
- imapsync run from a machine you control. Treat it as an operator tool, not as ArawaMail support. Do not paste passwords into a shared shell history. Rotate the cPanel mailbox password after the final sync if the password appeared in a command line.
Verify folders, sent mail, and unread state on at least one busy mailbox before you call the pass successful.
Track B — cutover and Remote Mail Exchanger
5. Lower MX TTL, then activate ArawaMail receiving
When the copy looks good, lower MX TTL if you still control it. Activate receiving and confirm the MX replacement warning. Enable sending. Send an inbound test to a real mailbox and an outbound test from that mailbox. Apps that used the hosting SMTP user must switch credentials after sending is on.
6. Stop cPanel from accepting new local mail
In WHM, set Email Routing for the domain to Remote Mail Exchanger. That is the step that moves the domain from localdomains toward remotedomains so Exim stops treating the box as the final destination.
If you skip this, two inboxes diverge: ArawaMail gets whatever the public MX attracts, and cPanel keeps whatever still arrives locally. That is why “we already changed MX” is not the same as “the old server stopped being a mail server.”
7. Final incremental copy, then wait out the tail
Run one more IMAP pass for messages that arrived during cutover. Keep the cPanel account readable for several days through the DNS cache window. Cancel hosting mail only after that tail is quiet. Recreate forwarders and catch-all policy on ArawaMail instead of hoping panel features copied.
What does not travel with IMAP
- cPanel forwarders, default addresses, and account-level filters.
- Autoresponders and most calendar/contact side products on the hosting panel.
- Website forms that call
mail()on the old server. Those need a proper sending integration, not the leftover Exim local user.
FAQ
Can I copy mail before changing MX?
Yes, and you should. That is how you avoid a dark mailbox on day one.
Why is mail still appearing in cPanel after the MX change?
Cached DNS, local generation, and the domain still being a local exchanger. Set Remote Mail Exchanger and keep the old account online for a final sync.
What is Remote Mail Exchanger?
WHM routing that tells Exim the domain’s mail is delivered elsewhere. Without it, cPanel continues to accept mail it should only relay or refuse.
Do I have to move the website to Cloudflare the same day as mail?
No. ArawaMail needs the zone on Cloudflare for mail DNS. The web origin can stay on the old host while you prepare MX.
Does ArawaMail import Maildir from the hosting account?
Not as a documented product. Use IMAP copy.
Will filters and forwarders appear automatically?
No. Rebuild them after cutover.