Quick answer: Mailbox contents move with imapsync — it copies every folder and message between two IMAP servers while both stay online. Create the accounts on the destination first, sync, then move the DNS MX record. If you are leaving self-hosted mail behind, migration day is also the best moment to switch to a dedicated email provider.
Overview
Email is often the scariest part of a hosting move because users notice missing mail instantly. The good news: IMAP migration is a solved problem, and because mail servers retry delivery for days, a properly sequenced MX switch loses nothing. The decision to make first is where mail should live afterwards — on your VPS or with a specialist provider (comparison here).
Before you start
- A list of all mailboxes with their passwords (or admin credentials on both sides).
- The destination mail service ready: mailboxes created, quotas set.
- DNS access for MX, SPF, DKIM and DMARC records.
Step-by-step guide
- Create all accounts on the destination server or provider with the same addresses.
- Sync each mailbox:
imapsync --host1 old.example.com --user1 [email protected] --password1 'oldpass' \ --host2 new.example.com --user2 [email protected] --password2 'newpass' - Update DNS: switch the MX record to the new server, and update SPF/DKIM/DMARC to match the new sender.
- Re-run imapsync after the MX change to catch messages delivered to the old server during propagation.
- Reconfigure clients: update server names in mail apps, or use a hostname like mail.example.com that already points to the new service.
Common issues
- Missed folders: some servers name Sent/Trash differently — imapsync maps common cases, but spot-check special folders.
- Deliverability drop: a new sending IP without SPF/DKIM/PTR alignment lands in spam — set the records before users resume sending.
- Propagation stragglers: keep the old mail server accepting mail for a few days, then run one final sync.
When to contact support
Ask us to include mailboxes in your free migration request, or for help setting the PTR record for your new server's IP — reverse DNS is configured through Cloud2Y and matters for deliverability.
Frequently asked questions
Does imapsync delete mail from the old server?
No, by default it only copies messages and folders to the destination mailbox. The source stays intact, so you can re-run the sync safely as many times as needed.
Will I lose emails that arrive during the switch?
No. Mail servers retry delivery for days, and keeping the old server accepting mail during DNS propagation plus one final imapsync run catches every straggler.
Should I host email on my VPS or use a provider?
Self-hosting gives control but demands deliverability upkeep: PTR, SPF, DKIM, reputation. Many teams migrate mailboxes to a specialist provider and keep the VPS for the website.
Related articles
- How to use third-party email providers
- How to avoid downtime during migration
- Migration checklist
- Common migration issues
Need a hand with your move? Contact Cloud2Y support →
