Skip to content

Moving mail off cPanel

cPanel or WHM tells the connector who exists — mailboxes, quotas, forwarders, autoresponders and filters — and the mail itself comes across over IMAP, so you are not exporting anything by hand.

Read this part first

What this connector cannot do. These are the facts that decide how long your weekend is.

  • Every mailbox gets a new password, and the token cannot open a mailbox. cPanel stores passwords hashed, so nothing recovers them. Unless the old host has a Dovecot master user, you collect each mailbox’s password to copy its mail.
  • A filter that cannot be expressed exactly is skipped, not approximated: regex matches, SpamAssassin spam-score rules, a mix of “and” and “or”, “any header”, piping to a program. A filter over 20 conditions or 10 actions — the limits of one rule here — is refused and named like the rest, because cutting an “or” of 21 senders to fit would silently stop filing mail from the 21st. Each is listed with its reason, and a filter that was imported but lost something on the way is listed apart, under “filters imported with something left out”. (At 0.3.0 an over-limit filter was imported cut to fit, without a note in the console; check long filters imported by that version by hand.)
  • Filters are read for the first 200 mailboxes only, and discovery says when it stopped.
  • Autoresponder placeholders such as %subject% and %from% come across literally — Sieve does not expand them — and a responder whose window has closed is imported switched off.
  • A near-full mailbox may not fit its copied quota. The two servers do not count bytes identically, so a mailbox at about 100% of its quota on the source fails on quota here before the last messages land. Raise the destination quota and re-run; the re-run copies only what is missing.

How it goes

  1. 1

    Add the domain here first

    Add the domain in MailDock and publish its DNS records apart from the MX. Everything can be verified before any mail moves. The migration will not create a domain, and mailboxes on a missing one are skipped.

  2. 2

    Read the source

    Every mailbox with its size and quota, plus counts of forwarders, autoresponders and filters. Anything the connector could not see is a warning rather than an empty list — a silent omission is how a mailbox gets left behind.

  3. 3

    Create the mailboxes and import the rules

    Missing mailboxes are created with new passwords, shown once. Forwarders, autoresponders and filters are imported; a filter that cannot be expressed exactly is skipped and listed with the reason.

  4. 4

    Run the full copy

    Mail, folders and flags over IMAP, mailbox by mailbox, resumable. This is the long part and it happens while the old server is still live.

  5. 5

    Change the MX, then sync the delta

    Switch the MX to your new host and run the delta. Mail that arrived at the old server during the copy comes across now.

  6. 6

    Walk the checklist

    Clients reconfigured, new passwords handed out, skipped filters recreated, old accounts left in place until you are sure.

What you need

  • A cPanel account token (port 2083) or a WHM token (port 2087) — a token, never the account password.
  • A way to open each mailbox over IMAP: a Dovecot master user if the old host added one (cPanel does not ship one), or each mailbox’s own password. The token only discovers; a job with nothing else fails every mailbox on auth.
  • Network access from your new server to the panel — the copy runs from the new machine, not through us.

Moving from somewhere else

Where these claims come from

  • mailserver · docs/feature-docs/migration-cpanel.md
  • mailserver · docs/feature-docs/migration.md