How to migrate email accounts to UnderHost
Migrate email accounts, mailbox content, and forwarders from your old host to UnderHost. Methods for cPanel-to-cPanel transfers and IMAP sync using your emai...
On this page
Email has two parts: setting up the accounts on UnderHost (empty mailboxes), then copying existing email content from the old server. Do both before changing MX records so mail continues to flow during the transition.
Create email accounts on UnderHost
- Log in to UnderHost cPanel → Email Accounts
- Click Create for each account
- Use the same email address and a new secure password
- Set the storage quota (or 0 for unlimited)
- Click Create
Repeat for each mailbox. If you have many accounts, note them in a spreadsheet before starting.
Sync mailbox content via IMAP (imapsync)
imapsync copies emails between two IMAP servers. Run from a Linux VPS or server (or a local Linux/Mac machine):
imapsync \
--host1 mail.oldhost.com --user1 user@yourdomain.com --password1 OldPassword \
--host2 mail.underhost.com --user2 user@yourdomain.com --password2 NewPassword
Replace hostnames and credentials with your actual values. imapsync copies all folders, messages, and read/unread status. Run it once before DNS change, then again after to sync any mail received during the transition.
Install imapsync: apt install imapsync (Ubuntu) or dnf install imapsync (AlmaLinux)
Migrate via email client
If you only have a few accounts, use an email client (Thunderbird, Outlook) to copy messages:
- Add both the old and new email accounts to Thunderbird
- Drag and drop folders from the old account to the new account
- Wait for the copy to complete
This is slower than imapsync but works without command-line access.
Migrate forwarders
Email forwarders are not automatically transferred. Log in to your old cPanel and note all forwarder rules, then recreate them in UnderHost cPanel → Email → Forwarders.
Update MX records last
Updating MX records before accounts are set up on UnderHost causes incoming mail to bounce. Create all accounts and test them first, then update MX records as the final step. Mail sent while MX is propagating may go to the old or new server-run a final imapsync sync after propagation completes to catch any messages that arrived at the old server.
To update MX records, change your domain's nameservers to UnderHost and the MX records will automatically point to your UnderHost mail server. If managing DNS externally, update the MX record to mail.yourdomain.com (which should have an A record pointing to your UnderHost server IP).
Need email migration help?
Request a free migration and our team will transfer your email for you.





















