Migrating Your Old Inbox to cPanel Without Losing Mail
You've created your new mailbox in cPanel and pointed MX records at Getwebup - good. But your old inbox has three years of client threads, invoices, and receipts sitting on the previous host, and none of that follows the DNS change automatically. MX records route new mail. They do nothing for the mail already sitting in your old mailbox. If you don't move it separately, it stays exactly where it is - on a server you're about to stop paying for.
Why This Catches People Off Guard
Most hosting migration guides focus on getting new mail flowing to the new server, which is the DNS/MX part. That's necessary but it's not the same problem as history. A mailbox is really two things: a delivery address (controlled by MX records) and a folder of stored messages (sitting on whichever mail server you were using). Cutting over MX fixes delivery. It leaves storage untouched.
So when someone tells us "I moved my email to Getwebup and all my old mail is gone," it's rarely gone - it's still sitting on the old server, which they usually still have access to for a few more days or weeks depending on when the old hosting expires. The fix is to copy it across before that access disappears.
Two Ways to Move the Actual Messages
Which one you use depends on how much mail you're moving and whether you (or we, on your behalf) have SSH access.
Option 1: Manual drag-and-drop with a desktop mail client
Good for a few hundred messages, no SSH needed, works on any shared hosting plan.
- Install Thunderbird (free) or use Outlook.
- Add your old mailbox as an IMAP account - keep the old host's mail server active until this is done, don't cancel it yet.
- Add your new Getwebup mailbox as a second IMAP account. Server settings are in cPanel > Email Accounts > Connect Devices:
mail.yourdomain.com, IMAP port 993, SMTP port 465, both SSL/TLS. - In Thunderbird's folder pane, select all messages in the old account's Inbox (Ctrl+A), then drag them onto the new account's Inbox folder.
- Repeat per folder - Sent, Archive, any custom folders. Do this in batches of a few hundred if the client stalls on large drags.
This is slow for big mailboxes (it copies over your own internet connection, not server-to-server) but it's the only option when you don't have root or SSH on either end.
Option 2: imapsync over SSH (for VPS/root access, or large mailboxes)
If you're on a Getwebup VPS, or you have SSH access to a machine that can reach both mail servers, imapsync is the right tool. It syncs server-to-server, skips duplicates on re-runs, and can resume if it drops midway - none of which a drag-and-drop can do.
sudo apt install imapsync # Debian/Ubuntu
# or: yum install imapsync # AlmaLinux/CentOS
imapsync \
--host1 mail.oldhost.com --user1 'you@yourdomain.com' --password1 'OLD_PASSWORD' --ssl1 \
--host2 mail.yourdomain.com --user2 'you@yourdomain.com' --password2 'NEW_PASSWORD' --ssl2 \
--automap --syncinternaldates
Run it once as a dry run first with --dry added to the command, so you can see the message count and catch a wrong password before it touches anything. Drop --dry for the real sync. For mailboxes in the tens of thousands of messages, run it inside screen or tmux so it survives an SSH disconnect:
screen -S mailsync
imapsync --host1 ... --host2 ... --automap --syncinternaldates
# Ctrl+A then D to detach, screen -r mailsync to reattach later
Don't have SSH access yourself? Open a ticket with our support team with both mailboxes' details (old host's IMAP settings and your new Getwebup credentials) and we can run this migration for you.
The Timing Problem Nobody Warns You About
Here's the part that actually loses mail: if you cut MX over to Getwebup on day one and only start copying old messages on day five, that's fine for history - but any mail addressed to you during those five days landed on whichever server was live at delivery time. Mixing that up is how people end up with a gap.
The safe order is:
- First, create the new mailbox in cPanel and get it working.
- Then, run the sync while the old mailbox is still receiving mail (MX not switched yet). imapsync copies everything currently there - re-run it once more right before cutover to grab anything that arrived since your first pass.
- Only then switch MX records to Getwebup.
- Keep the old mailbox active (don't delete the account or cancel that hosting) for at least 7-10 days after cutover, in case any DNS caches out there are still resolving old servers and delivering stray messages there.
This way you never have a window where mail could land somewhere you're not checking.
Common Errors and What They Actually Mean
| Error | Cause | Fix |
|---|---|---|
Authentication failed on host1 or host2 | Wrong password, or old host requires the full email as username while your command used just the local part | Test login via the old host's webmail first; always pass the full user@domain.com as username |
Could not connect: Connection refused | Old host firewalled IMAP to specific IPs, or the mail server has already been decommissioned | Ask the old host to whitelist your sync machine's IP, or check if the old hosting already expired |
| Duplicate messages after re-running | Normal on a partial re-sync - imapsync dedupes by Message-ID and date by default | Nothing to fix; if you see real duplicates, add --skipcrossduplicates |
| Sync stops partway through a large mailbox | SSH session dropped, or the old server rate-limits IMAP connections | Re-run inside screen/tmux; add --maxsleep 5 to slow requests if the old server is rate-limiting |
| Folders missing after sync (only Inbox came across) | --automap wasn't set, or folder names differ between the two IMAP servers (e.g. "Sent" vs "Sent Items") | Re-run with --automap --domain2 yourdomain.com, or manually map folders with --folder |
Prevention: What to Do Differently Next Time
- Never let old hosting lapse before confirming the mail sync finished and you can see the full history in the new mailbox's webmail.
- Lower your MX record's TTL to 300-600 seconds a day or two before cutover, so the switch propagates fast and the risky window is short.
- Do a final imapsync pass right before flipping MX, not days before - that closes the gap between "last sync" and "actual cutover."
- Keep a screenshot or exported count of the old mailbox's message total before you decommission it, so you can sanity-check the new mailbox landed the same number.
Moving hosts doesn't have to mean losing history - it just needs the copy step to happen on purpose, in the right order, before the old server disappears.
Frequently asked questions
Do I need root or SSH access to migrate my old email?
No. If you're on shared hosting without SSH, the Thunderbird drag-and-drop method works fine for a few hundred messages. For thousands of messages or full automation, imapsync over SSH is faster and safer - our support team can run it for you if you don't have SSH access.
Will migrating overwrite anything already in my new cPanel mailbox?
No. imapsync adds messages to the destination folders; it doesn't delete anything already there. Running it more than once is safe too - it skips messages it already copied instead of duplicating them.
What happens to mail that arrives during the migration itself?
As long as you haven't switched MX records yet, all new mail still lands on the old server, exactly where imapsync is reading from. Run one final sync pass right before you cut MX over so anything that arrived mid-migration gets copied too.
How long does migrating years of email actually take?
It depends on mailbox size and both servers' speed, not just message count. A typical few-thousand-message mailbox with attachments usually finishes in 30-90 minutes over imapsync. Drag-and-drop through a desktop client is much slower since it routes through your own internet connection.
Can I use this same process to move email between two cPanel accounts on Getwebup?
Yes - the imapsync command works the same way whether host1 is a competitor's server or another Getwebup account. Just point host1 and host2 at the respective mail.yourdomain.com addresses and use each account's IMAP credentials.