Moving email from one hosting provider to another can be more delicate than moving a website. Website files can often be copied and tested before DNS changes take effect, while email depends on mailbox credentials, message folders, DNS records, mail-client settings, spam controls, and timing. A poorly planned change can cause missing messages, duplicate downloads, rejected mail, or a period in which new messages arrive at different providers.
This guide explains how to migrate email hosting without losing messages. It focuses on standard mailbox migrations using IMAP, which is supported by many shared hosting, VPS, managed hosting, and cloud email services. The same planning principles also apply when moving between hosting control panels or changing the mail service connected to an existing domain.
What Email Hosting Migration Means
Email hosting migration is the process of moving one or more mailboxes, their stored messages, and related mail settings from an existing mail server to a new provider. A typical migration has four separate parts:
- Mailbox data: Messages, folders, flags, and sometimes address books or calendars.
- Authentication: Usernames, passwords, aliases, forwarding rules, and account permissions.
- DNS routing: MX records that tell other mail servers where to deliver incoming messages.
- Sender authentication: SPF, DKIM, and DMARC records that help receiving systems evaluate outgoing mail.
Changing the MX record does not copy existing mail. It only changes the destination used for future delivery after DNS resolvers update their cached information. Existing messages therefore need to be copied separately, usually through IMAP, an administrative migration tool, or an export and import process.
Choose the Right Migration Method
IMAP migration
IMAP is usually the most practical method for ordinary mailboxes. It stores mail on the server and lets a migration tool connect to both the old and new accounts, then copy messages and folders. Because the original mailbox remains available, an IMAP copy can normally be repeated to capture messages that arrived during the first transfer.
IMAP migration usually includes mail stored in folders such as Inbox, Sent, Drafts, and custom folders. It may not include contacts, calendars, tasks, server-side filters, aliases, or forwarding rules. Those items often require separate export or manual recreation.
Provider migration tools
Large platforms may provide an administrative migration service. For example, Google publishes documentation for migrating data to Google Workspace, while Microsoft documents IMAP migration to Exchange Online. These tools can support batch imports, administrative permissions, progress tracking, or provider-specific workflows. Their supported data types and prerequisites differ, so the destination provider’s documentation should be checked before choosing this route.
Desktop export and import
A desktop email application can sometimes download mail from the old account and upload it to the new account. This can help with a small mailbox or a difficult server, but it introduces risks involving local storage, folder mapping, account synchronization, and incomplete downloads. It should be treated as a controlled fallback rather than the default method for many accounts.
Server-level synchronization
Administrators managing compatible servers may use server-side replication or synchronization tools. For example, Dovecot provides documentation for mailbox synchronization and replication features. This approach can be efficient for technically controlled environments, but it requires access to server configuration and should be tested against the exact Dovecot and hosting setup.
Before You Start: Inventory the Existing Service
Make a written inventory before changing anything. Record every mailbox, alias, forwarder, distribution address, shared mailbox, autoresponder, filter, and domain that uses the current mail service. Include mailbox sizes and the oldest message that must be retained.
Also document the current DNS records. At minimum, check:
- MX records for incoming mail
- SPF TXT records for authorized sending services
- DKIM records and the provider’s selector name
- DMARC policy and reporting address
- Autodiscover or automatic configuration records, if used
- Any custom records required by the provider
Do not assume that all DNS records are located at the same company as the website or registrar. Domain registration, DNS hosting, web hosting, and email hosting may be separate services. This distinction is also important in broader domain management work: changing a web host does not necessarily require changing mail records, and changing mail providers does not necessarily require moving the website.
Record the old server hostname, IMAP port, encryption mode, SMTP hostname, SMTP port, and authentication requirements. Common secure settings use IMAP over TLS and SMTP submission with authentication, but the correct values depend on the provider. Do not copy settings from a generic hosting guide without confirming them in the provider’s documentation.
Reduce DNS Confusion Before Migration
DNS caching can make the transition appear inconsistent. Some senders may continue using the old MX destination while others use the new one until cached records expire. Before the migration, review the existing MX time to live, or TTL. If the DNS provider permits it, a lower TTL can be set ahead of the change. The old provider must remain active during the overlap period because some mail may still be delivered there.
Lowering TTL does not force every resolver to refresh immediately. It also does not transfer messages. It simply reduces the intended caching period for future lookups. Plan for overlap rather than assuming that all senders will switch at one exact moment.
Prepare the New Mailboxes
Create the destination mailboxes before copying data. Use the same addresses where possible, and confirm the storage limits. A mailbox that is smaller than the source can stop a migration partway through. Check whether the new service limits message size, attachment size, folder count, or total mailbox storage.
Use unique, strong passwords for the new accounts. If the provider supports multi-factor authentication, enable it after the migration process is compatible with the required application passwords or administrative access. Avoid sharing mailbox passwords in email or storing them in plain text.
Create aliases and forwarding rules separately. An alias is not always a full mailbox, and a forwarder may not preserve a copy on the hosting account. Verify the intended behavior for each address before switching DNS.
Back Up Important Mail
An IMAP copy is not a substitute for an independent backup. Before migration, export a sample or complete archive using a mail client or a provider-supported export method. The exact format may be MBOX, Maildir, PST, or another supported format. Store the backup in a protected location and confirm that it can be opened or imported.
For high-value accounts, preserve the original service until the new mailbox has been checked and the overlap period has passed. Keep at least one known message from each important folder for verification. If legal, regulatory, or contractual retention requirements apply, consult the responsible administrator or adviser before deleting or altering the source data.
Copy the Messages with IMAP
A typical IMAP migration follows this sequence:
- Connect the migration tool to the source IMAP server using the provider-confirmed hostname, port, encryption, username, and password.
- Connect it to the destination IMAP server using the new mailbox credentials and secure connection settings.
- Run a small pilot with one non-critical mailbox or a test mailbox.
- Compare message counts, folder names, dates, attachments, flags, and unread status where the tool supports those features.
- Run the first copy for the remaining accounts.
- Review error logs and retry failed folders or messages.
- Keep the source mailbox available for a second synchronization after the DNS change.
Folder names may not map perfectly. One system may use a localized name for Sent or Trash, while another may use special folders with different internal names. Some tools copy messages but do not preserve every flag or folder attribute. Confirm how the tool handles duplicates before repeating a migration. A good tool should identify already-copied messages or provide a controlled duplicate policy.
Do not judge success only by the number of messages in the Inbox. Inspect Sent, Drafts, archived folders, nested folders, recent messages, old messages, and messages with attachments. Open several attachments and confirm that dates, senders, and recipients appear correctly.
Update DNS and Sender Authentication
When the destination has been prepared and the initial copy is complete, update the domain’s MX records to the new provider’s values. Enter the records exactly as documented, including priority values when multiple records are required. Remove obsolete MX records only when the provider says they are no longer needed. An unintended old MX record can cause some mail to continue reaching the previous server.
Update SPF to authorize the new outgoing mail service. SPF is published as a DNS TXT record, and a domain should normally have one effective SPF policy rather than multiple separate SPF records. If other systems send mail for the domain, such as a website form, help desk, CRM, or newsletter platform, keep their authorized mechanisms when constructing the new policy.
Configure DKIM using the destination provider’s selector and public key. DKIM signing happens on the sending service, while the corresponding public key is published in DNS. Then review DMARC. A cautious migration may begin with monitoring while messages are verified, but the correct policy depends on the domain’s sending sources and operational requirements. Avoid deleting an existing DMARC policy without understanding its reporting and enforcement effects.
DNS changes can take time to appear across different networks. During this period, monitor both old and new mailboxes. Send test messages from several external providers and reply to them. Test messages in both directions, including messages with attachments and messages sent from mobile or desktop clients.
Run a Final Synchronization
After MX records point to the new service, wait for the planned observation period, then run another IMAP synchronization from the old mailbox to the new one. This captures messages delivered to the old server while DNS caches were still using the previous records. Some migration tools call this an incremental, delta, or final pass.
Do not shut down the old mail service immediately. Keep it available long enough to identify delayed delivery, forgotten aliases, and applications still using the old SMTP settings. During this period, check mail logs or delivery reports if the provider exposes them. A bounce message or delayed message can reveal an overlooked DNS record or an address that was not included in the inventory.
Update Mail Clients and Applications
Users may need to update IMAP, SMTP, Exchange, or automatic configuration settings. If the email address stays the same but the provider changes, some clients may continue using cached server details. Remove and recreate the account only after confirming that local-only mail, contacts, and calendar data have been backed up.
Also update systems that send mail automatically. Common examples include WordPress contact forms, server monitoring, billing software, help desks, scanners, printers, and application notification services. For WordPress, use an authenticated SMTP method supported by the new provider instead of relying on the web server’s default mail function. Confirm that the new sending service is included in SPF and that DKIM signing works where available.
Common Failure Points and Their Limits
Messages are missing
The source account may use POP downloads, local folders, archive files, or a retention system that is not visible through IMAP. Check the user’s desktop and mobile clients for locally stored messages. Also inspect server-side quarantine and archive services.
Duplicate messages appear
Duplicates can result from repeated imports, different message identifiers, or a migration tool that does not recognize already-copied content. Stop repeated imports until the tool’s duplicate-handling behavior is clear. Remove duplicates only after preserving a backup.
Mail is rejected after the change
Rejection may be caused by incorrect MX records, missing SPF authorization, absent DKIM, a restrictive DMARC policy, a blocked IP address, or an invalid TLS or authentication setting. Check the exact SMTP error and the provider’s delivery logs instead of changing several DNS records at once.
Some messages still reach the old host
This is usually related to DNS caching or a forgotten MX record. Continue the overlap period and inspect DNS from more than one network. The old mailbox should remain active until the final synchronization confirms that no required data is stranded there.
IMAP itself has limits. It generally does not migrate calendars, contacts, tasks, mailbox permissions, transport rules, server-side filters, or every provider-specific label. It may also fail on corrupted messages, unsupported authentication, very large accounts, or a source server that restricts simultaneous connections. A separate plan is needed for each unsupported data type.
Pros and Cons of the Main Approaches
- IMAP migration: Broadly compatible and repeatable, but may require separate work for contacts, calendars, rules, and aliases.
- Provider migration tool: Often provides batch management and progress reporting, but may require administrative permissions and may support only selected source systems.
- Desktop export and import: Useful for a small account or special archive, but slower to manage and more dependent on local storage and client behavior.
- Server-level synchronization: Suitable for controlled technical environments, but complex for ordinary shared hosting customers and sensitive to server configuration.
Migration Checklist
- Inventory every mailbox, alias, forwarder, rule, and application sender.
- Record current MX, SPF, DKIM, DMARC, IMAP, and SMTP settings.
- Confirm destination storage, mailbox limits, and migration requirements.
- Back up important messages and local mail data.
- Create destination mailboxes and test secure login.
- Run a pilot migration and inspect folders and attachments.
- Perform the initial copy while the old service remains active.
- Change MX and sender-authentication records according to provider documentation.
- Test inbound, outbound, replies, attachments, mobile clients, and application mail.
- Run a final synchronization and keep the source service available during the overlap period.
- Remove old service settings only after delivery and data checks are complete.
Questions and Answers
Does changing MX records move old emails?
No. MX records route future incoming mail. Existing messages must be copied or exported separately.
Can email migration be done without downtime?
Often, yes. Keep the old mailbox active, copy data before changing MX, and perform a final synchronization after the DNS transition. Temporary delivery differences can still occur because of DNS caching.
Will IMAP copy contacts and calendars?
Usually not. IMAP is primarily for email messages and folders. Contacts, calendars, permissions, aliases, and rules require provider-specific exports or manual setup.
How long should the old email host remain active?
There is no universal period. Keep it available until DNS behavior has stabilized, the final synchronization is complete, and external delivery tests pass. The appropriate interval depends on TTL values, sender behavior, mailbox importance, and provider guidance.
Should the website be migrated at the same time?
Not necessarily. Web hosting and email hosting can be changed independently. Keeping those changes separate makes it easier to identify whether a problem comes from website DNS, mail routing, authentication, or mailbox data.
Final Guidance
The safest email migration is treated as a staged data and DNS change rather than a single switch. Inventory the service, back up important data, copy mail while the source remains available, prepare sender authentication, test from outside networks, and run a final synchronization before retiring the old host. This process applies across many hosting environments, including shared hosting, VPS hosting, managed email platforms, and cloud services, although the available migration tools vary.
Provider documentation should be the final authority for server names, ports, DNS values, authentication methods, and retention behavior. Microsoft Learn’s documentation for IMAP migration to Exchange Online, Google Workspace’s migration documentation, the Internet Engineering Task Force’s IMAP specifications such as RFC 3501 and RFC 9051, and Dovecot’s official synchronization documentation are useful reference points. They describe different systems, so compare their instructions with the exact source and destination services in use.
Informational notice: This guide describes general technical procedures and is not a substitute for provider-specific instructions, legal retention advice, or a tested backup and recovery plan. Before deleting a mailbox or ending a paid service, verify that required business, contractual, or regulatory records remain accessible.





Recent Comments