How to Migrate Your Email to a New Host

Email and Webmail | Updated July 2026

Moving your email to a new host means copying the messages sitting on the old mail server over to the new one, then switching the MX record so new mail arrives in the right place. This guide from Ultra Web Hosting walks through the three ways to copy your mail, how to cut over your DNS with zero lost messages, and the one rule that saves people from disaster: never delete the source mailbox until the new one is confirmed.

Do Not Skip This

Never Delete the Source First

The one mistake that turns a routine migration into a data-loss ticket: deleting or closing the old mailbox before confirming the new one holds every message. IMAP copies can stall, skip folders, or hit a full quota partway through. Keep the source mailbox live and untouched until you have logged in to the new host and verified the count.

  • Symptom: folders or date ranges missing after a rushed cutover
  • Cause: the source was wiped before the copy finished verifying
  • Fix: leave the old box read-only until the new one is confirmed

01. What an Email Migration Actually Moves

When people say "migrate my email," they usually picture their whole setup lifting and shifting in one click. It does not work that way. An email migration moves exactly one thing: the messages stored on the old mail server. That is the mail sitting in your Inbox, Sent, Drafts, and any folders you made, held server-side over IMAP.

Here is what does not move on its own, so you know what to expect:

  • Client settings - the account you set up in Outlook, Apple Mail, or your phone is just a connection to the server. Migrating the mail does not reconfigure your apps. You add the new account to each device afterward.
  • Forwarders, filters, and autoresponders - these live in the server's mail config, not in the message store, so an IMAP copy skips them entirely. You recreate them by hand on the new host (Section 07).
  • POP3-only mail - if your mail was pulled down by POP3 and deleted from the server, it is on your computer, not the server, and there is nothing on the old host to copy. See POP3 vs IMAP for the difference and why IMAP is the right choice going forward.
Coming From cPanel to cPanel?

If you are moving between two cPanel accounts, a full cPanel account transfer carries the mailboxes, forwarders, and filters together in one step. Ask us about a transfer before doing a manual IMAP migration. The manual methods below are for moving between different mail platforms (for example cPanel to Google Workspace or Microsoft 365), or when only the email is moving and the website stays put.

02. Before You Start: Access, Mailbox List, Quotas

A clean migration is mostly preparation. Get these lined up before you copy a single message:

  • Working access to BOTH mail systems - you need to log in to the old mailboxes and the new ones at the same time. For IMAP that means the hostname, port, username (usually the full email address), and password for each side.
  • A list of every mailbox and its password - one row per address. If you do not have the old passwords, reset them in the old cPanel first, because you cannot copy mail out of a mailbox you cannot log in to.
  • The new mailboxes created and empty - create each address on the new host before copying so there is somewhere to land the mail. On Ultra Web Hosting, see How to Create Email Accounts and Aliases.
  • Quota headroom on the destination - note the size of each source mailbox and make sure the matching new mailbox has at least that much space, plus a little slack. A copy that fills the destination halfway through leaves you with a partial migration.
Note

Write the IMAP server settings for both sides on the same sheet as your mailbox list. The old host's incoming IMAP server is often mail.yourdomain.com on port 993 (SSL). Ultra Web Hosting mailboxes use your server's mail.yourdomain.com hostname on port 993 as well, which you can confirm in cPanel under the mail account's "Connect Devices" page.

03. Lower Your DNS TTL a Day Ahead

The MX record has a TTL (time to live) that tells other mail servers how long to cache it. If your MX TTL is set to 14400 (four hours) or 86400 (a day), then after you cut over, some senders keep delivering to the old host for that whole window. Lowering the TTL in advance shrinks that window to minutes.

  1. The day before your migration, open cPanel Zone Editor for the domain (under the Domains section).
  2. Find the MX record and edit its TTL down to 300 (five minutes). Save.
  3. If you have SPF, DKIM, or autodiscover records that will also change, drop their TTLs to 300 as well.
  4. Wait out the old TTL. If it was 86400, give it a full day before cutover so the short value has fully propagated.
Tip

You can confirm the live TTL and MX value with our DNS Lookup tool before and after the change. For why DNS changes are not instant and how caching works, read DNS Changed But Site Not Showing. After the migration is done and stable, raise the TTL back to 3600 or higher so you are not hammering the nameservers.

04. Method 1: IMAP Copy in a Desktop Client

The simplest method, and the one I reach for when there are only a handful of mailboxes, is a drag-and-drop copy in a desktop mail client. You add both the old and new accounts as IMAP, then drag folders from one to the other. Thunderbird handles this cleanly and is free; Outlook works too.

  1. In Thunderbird, add the old mailbox as an IMAP account (Account Settings > Account Actions > Add Mail Account). Use the old host's IMAP settings, port 993, SSL/TLS.
  2. Add the new Ultra Web Hosting mailbox as a second IMAP account the same way.
  3. Wait for both accounts to finish syncing so every folder and message is visible in the folder pane. This can take a while for large boxes; let it finish.
  4. On the new account, right-click and create any folders that exist on the old side (Thunderbird will also create them as you copy).
  5. Select the messages in an old folder (Ctrl+A for all), then drag them onto the matching folder in the new account. Do this folder by folder: Inbox, Sent, and each custom folder.
  6. Watch the activity indicator and let each folder copy finish before starting the next. Copying uploads every message to the new server, so it is bound by your upload speed.
Copy, Do Not Move

Dragging in most clients copies by default and leaves the source intact, which is what you want. Confirm the old messages are still there after each folder. Do not use any "move" option or delete anything on the old side until the entire migration is verified. If a copy is interrupted, you may get duplicates on the new side, which is annoying but recoverable. A premature delete on the old side is not.

05. Method 2: imapsync Over SSH

When you have more than a few mailboxes, dragging folders by hand gets tedious and error-prone. imapsync is a command-line tool that copies one mailbox to another over IMAP, folder structure and all, and it is restartable: run it again and it only transfers what is missing. This is the right tool for ten, fifty, or a hundred mailboxes.

You run it from a machine that can reach both mail servers over IMAP. On a VPS or dedicated server with SSH, install it and run one command per mailbox:

imapsync \
  --host1 mail.olddomain.com --user1 [email protected] --password1 'OLDPASS' \
  --host2 mail.yourdomain.com --user2 [email protected] --password2 'NEWPASS' \
  --ssl1 --ssl2

For many mailboxes, put the credentials in a file and loop. A simple approach is one line per mailbox in a text file (host1;user1;pass1;host2;user2;pass2) read by a short shell loop that calls imapsync for each:

while IFS=';' read -r h1 u1 p1 h2 u2 p2; do
  imapsync --host1 "$h1" --user1 "$u1" --password1 "$p1" \
           --host2 "$h2" --user2 "$u2" --password2 "$p2" \
           --ssl1 --ssl2
done < mailboxes.txt
Tip

imapsync is safe to re-run. Because it skips messages that already exist on the destination, you can run it once well before cutover to move the bulk of the mail, then run it a second time right after you switch the MX to catch anything that landed on the old server in between. That second pass is the trick that gets you to zero lost messages. If you are on shared hosting without SSH, open a ticket and we can run the sync for you.

06. Method 3: Provider Bulk Migration Tools

If your new home is Google Workspace or Microsoft 365, both have built-in bulk IMAP importers in their admin consoles. These pull mail from the old server without you touching a desktop client, and they handle many mailboxes at once from a spreadsheet.

  • Google Workspace - the Data Migration service in the Google Admin console imports from any IMAP server. You supply the old server details and a CSV of mailboxes with passwords. See How to Set Up Google Workspace With Your Domain for the DNS side of that move.
  • Microsoft 365 - the Exchange admin center has an IMAP migration batch that does the same: a CSV of source mailboxes plus the old IMAP endpoint. Our companion guide "How to Set Up Microsoft 365 Email With Your Domain" covers the records and the cPanel routing switch for the Microsoft side.
Note

Provider importers connect to the old server as each user, so you still need every source password, and the old mailboxes must stay reachable over IMAP for the duration of the import. Run the importer while the old MX is still live, then cut the MX once the initial import completes. Both tools can be re-run to pick up mail that arrived after the first pass, same as imapsync.

07. Recreate Forwarders, Filters, and Autoresponders

This is the part people forget until a customer complains that a forwarding address stopped working. Forwarders, filters (server-side rules), and autoresponders (vacation replies) are stored in the mail server's configuration, not in the message store. No IMAP copy, imapsync run, or provider importer moves them. You recreate them by hand on the new host.

  1. On the old cPanel, open Forwarders and write down every forwarding rule: source address and where it points.
  2. Open Email Filters (both account-level and global) and note each rule's conditions and actions.
  3. Open Autoresponders and copy the text, subject, and schedule of each one.
  4. On the new host, recreate each forwarder, filter, and autoresponder to match. On Ultra Web Hosting these are all under the Email section of cPanel.
Watch the Forwarders

Forwarders are the most common silent failure after a migration. A forward from [email protected] to a personal Gmail will simply stop the moment the MX moves if you did not recreate it on the new host. Make your forwarder list part of the pre-migration checklist in Section 02, not an afterthought.

08. Switch the MX Record and Email Routing

Once the mail is copied and the forwarders are rebuilt, you move the MX record so new mail is delivered to the new host. This is the actual cutover. Because you lowered the TTL in Section 03, it takes effect quickly.

  1. In cPanel Zone Editor for the domain, delete the old MX record pointing at the previous mail server.
  2. Add the new MX record your new host gave you (for a cPanel destination this is usually mail.yourdomain.com at priority 0; for Google or Microsoft it is their supplied hostname).
  3. Update SPF to authorize the new sender, and add DKIM for the new platform, so outbound mail is not marked as spam.
  4. Set cPanel Email Routing for the domain to Remote Mail Exchanger if mail now lives off this server. Leave it on Local Mail Exchanger only if the destination mailboxes are on this same cPanel account.
The Email Routing Trap

If mail moved to Google, Microsoft, or another external host but cPanel Email Routing is left on Local Mail Exchanger, cPanel keeps delivering to a local mailbox and ignores your new MX. The symptom is that mail from your own domain, or from other sites on the same server, vanishes. Set it to Remote Mail Exchanger. For the mechanics of MX records, see How Do I Change My MX Records.

09. Overlap the Cutover: Dual Delivery

During the hours it takes the new MX to propagate everywhere, some senders still deliver to the old server. If you tear the old mailbox down at the moment you flip DNS, those in-flight messages are lost. The fix is to overlap: keep the old mailbox live and collecting mail through the whole propagation window.

  1. After switching the MX, leave the old mailbox running for at least 48 to 72 hours. Do not close the old account or change its password.
  2. Keep the old account added in a mail client so you can watch for any stragglers that still land there.
  3. Run a final imapsync pass (or re-run the provider importer) a day or two after cutover to sweep any mail that arrived on the old server post-switch into the new mailbox.
  4. Only once several hours pass with no new mail hitting the old box, and your final sync comes back empty, is the overlap done.
Tip

For a belt-and-suspenders overlap, set a forwarder on the old mailbox that copies anything it receives to the new address during the switchover. That way even mail delivered to the old server during propagation lands in the new inbox in real time. Remove the forwarder once you retire the old box.

10. Verify and Troubleshoot

Before you call the migration finished and retire the old mailbox, verify. Log in to the new mailbox over Webmail or a client and spot-check that the counts and folders match the old side.

Folders are missing on the new side. A drag-and-drop copy only moves the folders you dragged. Go back and copy any folder you skipped, and confirm subfolders came across (some clients do not recurse automatically). imapsync copies the full tree, so a re-run fixes gaps.

Duplicate messages. Usually caused by an interrupted copy that was restarted, or by running two methods against the same box. imapsync de-duplicates on re-run; in a desktop client, most tools offer a "remove duplicates" add-on. Duplicates are cosmetic and safe to clean up later, so do not let them block the cutover.

The copy stops partway with a quota or "over quota" error. The destination mailbox filled up. This is why you noted source sizes in Section 02. Raise the mailbox quota on the new host (or trim large attachments on the source), then re-run. Do not respond by deleting from the source to make room.

Mail still arrives at the old server after cutover. DNS has not fully propagated, which is normal for up to 48 hours. This is exactly what the overlap in Section 09 is for. Confirm the live MX with our DNS Lookup tool and keep the old box collecting until it goes quiet.

New client will not connect or keeps asking for the password. Double-check the new IMAP hostname, port 993, and SSL/TLS, and that you are using the full email address as the username. For anything email-related this guide does not cover, see the Email Troubleshooting Guide. To connect Outlook to the new mailbox, see How to Set Up Email in Microsoft Outlook.

Want Us to Run the Migration?

Send us the old and new IMAP details and your mailbox list, and we will copy every message with imapsync, rebuild your forwarders and filters, and handle the MX cutover with a proper overlap so nothing is lost. We migrate mail onto shared, VPS, and dedicated plans, and to Google Workspace or Microsoft 365.

Open a Support Ticket

Quick Recap: Migrating Email in Six Steps

If you only do six things from this guide, do these:

  1. Gather access and a mailbox list for both the old and new hosts, with passwords and source mailbox sizes.
  2. Lower the MX TTL to 300 a day before cutover so the DNS switch takes effect in minutes.
  3. Copy the mail with a desktop client for a few boxes, imapsync for many, or a Google/Microsoft importer.
  4. Recreate forwarders, filters, and autoresponders by hand, because no copy method moves them.
  5. Switch the MX and set Email Routing to Remote Mail Exchanger if mail now lives off this server.
  6. Overlap the cutover, run a final sync, verify the counts, and only then retire the old mailbox.

Last updated July 2026 · Browse all Email and Webmail articles

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Cannot write to cache directory /tmp/horde

Email & Webmail | Updated 2026 If you see the error "Cannot write to cache directory...

Sent Emails Not Showing in Sent Folder

Email & Webmail | Updated March 2026 If you send an email from your desktop or phone but...

Webmail Access Denied

Email & Webmail | Updated March 2026 Getting "access denied" or a blank page when trying...

What is a email mailing list?

Email & Webmail | Updated 2026 A mailing list lets you send one email to a single address...

Folders in Roundcube Are Missing

Email & Webmail | Updated March 2026 If you log into Roundcube Webmail and your Sent,...



Save 30% on web hosting - Use coupon code Hosting30