How to Migrate Email to a New Host Without Losing Mail

Learn a safe email migration order: create mailboxes, copy mail with IMAP, switch MX records, run a final sweep, update devices and verify delivery.
, How to Migrate Email to a New Host Without Losing Mail

Email migration is safest when you copy the existing messages before changing where new mail is delivered. Create the same mailboxes on the new host, copy every folder over IMAP, switch the MX records, then run one more sync while the old host is still available.

Short answer: the safe order of steps

Use this order for a domain such as you@example.com:

  1. List every mailbox, alias, forwarder, filter and autoresponder.
  2. Create matching mailboxes on the new host and test their passwords.
  3. Add the old and new accounts to Thunderbird, then copy all IMAP folders.
  4. Lower the DNS TTL if your DNS provider allows it, and prepare the new MX record.
  5. Change the MX record to the new mail server. Do not close the old mailbox yet.
  6. Run a final IMAP sync, test sending and receiving, and update phones and desktop apps.
  7. Keep the old service available until the old mailbox is empty of new messages and your tests pass.

An MX record tells sending mail servers which host accepts mail for your domain. It does not copy the old Inbox, Sent folder or archive, so the mailbox copy and the DNS change are two separate jobs.

What you need before starting

Prepare these items before you touch DNS:

  • Access to the old hosting panel, old webmail and your domain’s DNS manager.
  • The new hosting panel, the new mail server hostname and the new mailbox passwords.
  • The full email address and password for each mailbox on both hosts.
  • A list of aliases, forwarders, shared addresses, autoresponders, filters and catch-all rules.
  • Enough free storage on the new account for the largest mailbox, including Sent and custom folders.
  • A laptop or desktop with Thunderbird, or an IMAP migration tool for larger mailboxes.

Do not use the domain’s MX name as the new IMAP hostname unless the new provider specifically tells you to. During the migration, the domain may still resolve to the old server. Use the source and destination hostnames given by each provider. For the usual ports and security choices, see IMAP, POP3 and SMTP port settings.

Step 1: List mailboxes and save the migration details

Why: a migration can look successful while an alias, forwarder or old archive is still missing.

Write one row for every address, for example:

AddressTypeOld mailboxNew mailboxExtra items
sales@example.comMailboxYesTo createSent, 2024 archive
info@example.comAliasNoTo recreateForwards to sales
billing@example.comMailboxYesTo createAutoresponder

Then record, in a password manager rather than a plain text file:

  • The old IMAP hostname and the new IMAP hostname.
  • The old and new usernames, normally the complete email address.
  • The old and new passwords or app passwords.
  • The current MX, SPF, DKIM and DMARC records, if your domain uses them.
  • The mailbox size and the number of important messages or folders.

Keep this checklist until the migration is finished. Do not cancel the old hosting account after the first copy.

Success looks like: every address has a clear destination, and you can log in to each old mailbox through webmail without guessing which password belongs to it.

Step 2: Create the same mailboxes on the new host

Why: the destination must exist before you copy messages or switch delivery.

In HostKarle DirectAdmin, open E-mail Accounts, choose Create Account, and create each mailbox with the same address part before @. Set a strong, unique password and record it securely. Repeat this for each mailbox; then recreate aliases, forwarders, autoresponders and filters using the new panel’s email tools.

Before changing DNS, sign in to the new webmail or use the provider’s test method. Send a test from one new mailbox to another mailbox that is already outside the domain, if possible. A test from one mailbox to another on the same domain is useful, but it does not prove that external delivery is working.

Do not delete the old mailbox to make room. You need it for the initial copy and the final sweep.

Success looks like: every destination mailbox opens, accepts a test message, has enough quota, and has the same address and basic forwarding behaviour as the old setup.

Step 3: Copy mail with IMAP in Thunderbird

Why: IMAP keeps the messages and folders on the servers, so you can copy old mail into the new mailbox without changing the email address.

Thunderbird can add both accounts at once. Mozilla documents the process in its automatic account configuration guide, and it generally prefers IMAP for an account that should keep messages on the server.

For one mailbox, use this method:

  1. Open Thunderbird and choose New Account → Existing Email.
  2. Add the old email address first. Enter the old IMAP hostname, username and password if automatic setup does not find them.
  3. Add the same email address as a second account, but use the new IMAP hostname and new password.
  4. Set both accounts to IMAP. For a typical secure setup, use IMAP port 993 with SSL/TLS. Use the SMTP hostname and port supplied by the provider for sending; common secure choices are 465 with SSL/TLS or 587 with STARTTLS.
  5. Wait for the old account to finish downloading its folder list. Expand it and check Inbox, Sent, Drafts, Archive, Spam and every custom folder.
  6. Select the folders in the old account, right-click and choose Copy To, then select the matching folder under the new account. For a single mailbox, you can also drag folders while holding the copy modifier shown by your operating system.
  7. Leave Thunderbird open until the activity indicator shows that copying and synchronisation have finished. Large folders may take time.

Use the provider’s hostname when a certificate warning or login error appears. The full email address is usually the username, but the provider’s instructions take priority. Mozilla’s account setup instructions explain where to edit the server name, port, connection security and outgoing SMTP server.

Do not copy only the Inbox. Sent mail, Drafts, folders created by staff and old archives are often the messages people need most after the move. Also check Thunderbird’s Local Folders. Mail stored only there is not on the old server and needs a separate local backup or copy into the old IMAP account before it can reach the new server.

Success looks like: the new account shows the expected folders, old messages open with their dates and attachments, and the newest message in each important folder is present.

Step 4: Copy larger or multiple mailboxes with an IMAP sync tool

Why: a sync tool is easier to repeat for several accounts and can preserve a full folder hierarchy without repeated drag-and-drop work.

imapsync is an IMAP transfer tool for moving mailboxes between two IMAP servers. Its documentation says that transfers are incremental and recursive: you can restart a transfer efficiently and copy folders and subfolders. It does not move contacts or calendars, so export those separately if your mail service stores them outside IMAP.

After installing it on a computer that can connect to both servers, start with one small mailbox. Replace every placeholder with the hostnames and credentials from your checklist:

imapsync \
  --host1 old-mail.example.com \
  --user1 you@example.com \
  --password1 'OLD_MAILBOX_PASSWORD' \
  --host2 new-mail.example.com \
  --user2 you@example.com \
  --password2 'NEW_MAILBOX_PASSWORD'

Avoid pasting real passwords into a shared terminal, screenshot or public script. Use the tool’s supported secure password options or a protected environment on your own computer. Read the current imapsync instructions for your operating system and for any required SSL or authentication flags.

Run the first transfer while the old host is still receiving mail. Check the output for authentication, quota and folder errors. Repeat the transfer for each mailbox, then run it again after the MX change as the final sweep. An incremental sync should be faster because most messages are already present.

Success looks like: the tool reports no unresolved errors, the new webmail shows the expected folder tree, and a sample of old and recent messages opens correctly.

Step 5: Prepare and switch the MX records

Why: the MX change moves new incoming mail; it must happen only after the destination mailboxes and first copy are ready.

If your DNS provider supports TTL editing, reduce the current MX record’s TTL before the planned switch. A shorter TTL can reduce the time resolvers cache the old answer, but it cannot force every network to refresh immediately. Cloudflare’s email DNS guide notes that the exact MX value comes from the email provider and explains the caching effect of TTL.

At the scheduled change time:

  1. Open the DNS manager that is authoritative for your domain. This may not be the same company as your website host.
  2. Identify the current MX record or records and save a screenshot or export of the old values.
  3. Replace them with the new provider’s MX hostname and priority. Do not invent a value from the webmail URL.
  4. Keep the new provider’s required SPF, DKIM and DMARC records. If the provider gives a new SPF or DKIM value, add or update it exactly as supplied.
  5. Save the zone and note the time of the change.

Do not remove the old mailbox immediately. During DNS caching, some senders may still deliver to the old server. Leave it accessible and continue checking both old and new webmail until the final sweep is complete. For background, see what DNS records do.

Success looks like: a public DNS lookup shows the new MX record, a message sent from an external account reaches the new mailbox, and no new message is still arriving at the old mailbox after the normal caching window.

Step 6: Run the final sweep and update every device

Why: messages can arrive at the old host while DNS caches are changing, and existing apps still point to the old server.

After the MX change has had time to be seen by different networks:

  1. Run Thunderbird’s copy again, or rerun the same imapsync command for every mailbox.
  2. Open the old mailbox and copy any messages received after the first transfer.
  3. Send a test message from an outside address to each important mailbox.
  4. Reply from the new mailbox to an outside address and confirm the reply arrives.
  5. Check Inbox, Sent, Drafts, Archive and custom folders on the new webmail.
  6. Update the incoming IMAP and outgoing SMTP hostnames on every phone, tablet, Outlook profile and other mail app.
  7. Keep the old service active for at least 48 hours, and longer if messages are still arriving there. Do not close it until the checklist is complete.

If the email address did not change, staff can continue using the same address. The server settings do change, so an app that still authenticates against the old hostname may stop sending or receiving even though webmail works.

Success looks like: external send and receive tests work, all users can open old mail, and every device is connected to the new IMAP and SMTP servers.

Verify the migration before closing the old host

Use this short sign-off checklist:

  • Every mailbox, alias, forwarder and autoresponder exists on the new host.
  • The first IMAP copy and the final sweep completed without unresolved errors.
  • At least one old message, one attachment and one recent message were opened from the new mailbox.
  • New incoming mail arrives after the MX change.
  • New outgoing mail reaches an outside address and does not show an authentication error.
  • SPF, DKIM and DMARC records match the new provider’s instructions.
  • Phones and desktop apps use the new server names.
  • No mail has appeared only on the old host during the final observation period.

If you are moving the website as well as email, keep the email checklist separate from the website files and database. The website migration guide covers the WordPress side of that job.

Common problems

New mail still arrives at the old host

Check the authoritative DNS zone, not just the DNS page in your hosting panel. Confirm that the old MX record was removed or given the intended priority, then query the domain again from a public DNS checker. Keep the old mailbox available and perform another sweep while caches update.

Thunderbird says the password is wrong

Confirm that the account uses the complete email address as the username and that you selected the correct old or new hostname. Check the port and connection security, remove a stale saved password, and test the same credentials in that provider’s webmail. A successful webmail login does not prove that the IMAP hostname or authentication method is correct, so compare each setting with the provider’s current instructions.

Only the Inbox was copied

IMAP folders are separate from the Inbox. Expand the old account, subscribe to or display hidden folders, and copy Sent, Drafts, Archive and custom folders. With imapsync, confirm that the destination folder hierarchy was created and read the log for folders that were skipped.

Sent messages or old attachments are missing

The first copy may have been interrupted, the source folder may be stored locally, or the destination quota may be too small. Open a few messages on the old server, check their folders and sizes, then repeat the copy and verify the destination before closing the old account.

A message appears twice after the sweep

Do not repeat a Thunderbird drag-and-drop operation over the same folder if the first one completed. A migration tool that supports incremental syncing is a better choice for the final pass; review the tool log before trying again and keep the original old mailbox untouched until you are satisfied.

FAQ

Can I migrate email without changing the email address?

Yes. Create the same mailbox name on the new host, copy the old messages over IMAP and change the domain’s MX records. The address can stay the same, but every mail app may need the new IMAP and SMTP server names.

Does changing the MX record move my old emails?

No. MX records control where new incoming messages are delivered. Old messages remain on the old mailbox until you copy them with Thunderbird, imapsync or another supported migration method.

Is IMAP or POP better for an email migration?

IMAP is usually the safer choice because folders and messages remain on the server and can be copied to another IMAP account. POP may have downloaded messages only to one device, so first check whether important mail exists locally rather than on the old server.

How long should I keep the old email host?

Keep it available through the first copy, the MX change and the final sweep. A 48-hour observation period is a practical minimum for a small business, but wait longer if public DNS checks or mailbox logs show that senders are still reaching the old server.

Will IMAP also move contacts and calendars?

Not normally. IMAP migration covers mailbox messages and folders; contacts, calendars, signatures, rules and some address-book data may need their own export and import process. Check the source and destination provider before treating the migration as complete.

Want to partner with us, suggest a resource or advertise on this blog? Email partnerships@hostkarle.in

Samrat Ghosh
Written by

Samrat Ghosh

Writer

Samrat Ghosh writes hands-on guides about web hosting, WordPress, domains and email for Indian small businesses, students and freelancers - the practical documentation he wishes had existed when he set up his first website.

Previous Article

How to Make Money Blogging in India: 2026 Guide

Next Article

DNS Propagation Time: How Long It Takes and How to Check

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy