EasyCloudify
Solutions
  • Cloud PlatformImprove team productivity and integrate popular workflow applications.
  • Cloud Servers (VPS)NVMe SSD servers deployed in under 60 seconds.
  • Object StorageS3-compatible storage with built-in global CDN.
  • Managed DatabasesManaged PostgreSQL, MySQL, MongoDB, Valkey, Kafka & OpenSearch.
  • Managed WordPressManaged WordPress hosting, so you can focus on your business.
  • MarketplaceFind an app that suits you, then spin it up in 60 seconds or less.
  • Mail HostingPrivacy First Email Hosting for your business.
  • SEO & AI Visibility AuditAudit your site for SEO and AI answer engine visibility.
  • SecurityRock-solid application security for your peace of mind.
  • Register DomainsRegister your domain with us and get started.
Company
  • About
  • Legal
Resources
  • Blog
  • Guides
  • Status
Get Started
  • Contact Sales
  • Pricing
  • Dashboard
EasyCloudifyEasyCloudify
PricingContact
Log inStart deploying
EasyCloudify logoEasyCloudify

Fully managed cloud infrastructure — deploy in minutes, not days.

Newsletter

The latest news, articles, and resources — delivered weekly.

Product

  • Cloud Platform
  • Marketplace
  • Managed WordPress
  • Mail Hosting
  • Security

Support

  • Open a Ticket
  • Documentation
  • Contact Sales
  • System Status

Company

  • About
  • Global Infrastructure
  • Blog
  • Pricing

Legal

  • Terms of Service
  • Privacy Policy
  • Acceptable Use
  • All Legal Docs

  • Cloud Platform
  • Marketplace
  • Managed WordPress
  • Mail Hosting
  • Security

  • Open a Ticket
  • Documentation
  • Contact Sales
  • System Status

8 The Green, Suite A, Dover DE 19901, USA
+1 (302) 534-3122

© 2026 EasyCloudify LLC. All rights reserved.

Rated on Trustpilot
Terms of ServicePrivacy PolicyAcceptable Use
EasyCloudifyDocs
⌘K
App Emails — Transactional Email Setup and Statistics on EasyCloudifyEmail Hosting — Manage Mailboxes, Aliases, and Forwardings on EasyCloudifySet Up Desktop Email Clients — Thunderbird, Apple Mail, Outlook & MoreSet Up Mobile Email Clients — iPhone, iPad & AndroidWebmail Access — Read Your EasyCloudify Email in Any BrowserEmail Aliases, Identities, Plus & Subdomain AddressingEmail Forwarding & Auto-Reply (Out-of-Office)Migrate Email to EasyCloudify with IMAPSyncEmail Folders & Auto-Deletion — Trash, Spam & Plus Addressing
HomeDocsEmailMigrate Email to EasyCloudify with IMAPSync
6 min read·Updated 2026-05-19

Migrate Email to EasyCloudify with IMAPSync

TL;DR — Use IMAPSync to copy your entire mail archive from any IMAP provider into your new EasyCloudify mailbox. Folders, read/unread status, flags, and message dates are all preserved. The tool is safe to re-run as many times as you like — it only copies messages that are not already at the destination.

When to Migrate

You are moving from another email provider (Gmail, Microsoft 365, Outlook.com, Fastmail, cPanel, Zoho, Proton with Bridge, your old hosting provider…) and you want your historical mail to live in your new EasyCloudify mailbox alongside new messages.

Before You Start

  • An active mailbox on EasyCloudify with the destination address you want (see Email Hosting)
  • IMAP access enabled at the source provider. Most providers have an IMAP toggle in account settings.
  • App password at the source if it uses two-factor authentication (Gmail, Outlook, Fastmail, etc.). Use the app password, not your account password.
  • A computer with Linux, macOS, or Windows (WSL works on Windows) and roughly the same amount of free disk as your old mailbox

💡 Source-side accounts that need extra steps:

  • Gmail — enable IMAP in Settings → Forwarding and POP/IMAP, and generate an app password under your Google Account → Security → App passwords.
  • Microsoft 365 / Outlook.com — enable IMAP in Outlook on the web → Settings → Mail → POP and IMAP. Generate an app password if 2FA is on.

Step 1 — Install IMAPSync

macOS

brew install imapsync

Linux (Debian / Ubuntu)

sudo apt-get update
sudo apt-get install imapsync

Linux (Fedora / RHEL)

sudo dnf install imapsync

Windows

Use the pre-built Windows binary or run IMAPSync from a Linux distribution under WSL.

Verify the install:

imapsync --version

Step 2 — Gather Connection Details

You need four pieces of information for each side.

Source (the provider you are leaving)

FieldExample
Hostimap.gmail.com
Port993 (SSL/TLS)
Username[email protected]
PasswordApp password or account password

Common source hosts:

ProviderIMAP host
Gmail / Google Workspaceimap.gmail.com
Microsoft 365outlook.office365.com
Outlook.comoutlook.office365.com
Yahooimap.mail.yahoo.com
Fastmailimap.fastmail.com
iCloud Mailimap.mail.me.com
Most cPanel hostsmail.yourolddomain.com

Destination (your new EasyCloudify mailbox)

FieldValue
HostAuto-detected (use the value shown in /cloudpanel/mailboxes for your mailbox)
Port993 (SSL/TLS)
UsernameYour full email address (e.g. [email protected])
PasswordYour EasyCloudify mailbox password

Step 3 — Test the Connection

Always run IMAPSync once with --dry first. This connects to both sides, lists folders, and reports what would be copied — without moving a single message.

imapsync \
  --host1 imap.gmail.com \
  --user1 [email protected] \
  --password1 'YOUR_SOURCE_APP_PASSWORD' \
  --ssl1 \
  --host2 imap.easycloudify.example \
  --user2 [email protected] \
  --password2 'YOUR_EASYCLOUDIFY_PASSWORD' \
  --ssl2 \
  --dry

Replace imap.easycloudify.example with the destination IMAP hostname shown for your mailbox in /cloudpanel/mailboxes.

You should see a summary like:

Folders source/destination found: 12
Messages source/destination: 4231 / 0
Would copy 4231 messages, total size XX MB.

If you see authentication errors, double-check the passwords (app passwords on the source, mailbox password on the destination).


Step 4 — Run the Real Migration

Once the dry run is clean, remove --dry to run the actual sync.

imapsync \
  --host1 imap.gmail.com \
  --user1 [email protected] \
  --password1 'YOUR_SOURCE_APP_PASSWORD' \
  --ssl1 \
  --host2 imap.easycloudify.example \
  --user2 [email protected] \
  --password2 'YOUR_EASYCLOUDIFY_PASSWORD' \
  --ssl2 \
  --automap

IMAPSync prints progress message-by-message. Large mailboxes (several GB) can take hours — leave the terminal open or run it inside screen / tmux.

When it finishes, you'll see a summary of messages copied, skipped (already present), and any errors.

Useful Flags

FlagPurpose
--automapMatch standard folders (Sent, Drafts, Trash, Spam) across providers automatically
--regextrans2 's/\[Gmail\]\///g'Strip Gmail's [Gmail]/ folder prefix
--exclude 'All Mail'Skip Gmail's "All Mail" view (avoids duplicating every message)
--noresyncflagsDon't keep re-syncing read/unread flags on subsequent runs
--delete2duplicatesRemove duplicate messages on the destination
--skipsizeFaster for very large mailboxes when source/destination report sizes differently

Gmail-Specific Recommended Command

imapsync \
  --host1 imap.gmail.com --user1 [email protected] --password1 'APP_PASSWORD' --ssl1 \
  --host2 imap.easycloudify.example --user2 [email protected] --password2 'PWD' --ssl2 \
  --automap \
  --exclude '\[Gmail\]/All Mail' \
  --exclude '\[Gmail\]/Important' \
  --regextrans2 's/\[Gmail\]\///g' \
  --regextrans2 's/\[Gmail\].(.*)/$1/'

This skips Gmail's virtual "All Mail" and "Important" labels (which would otherwise duplicate every message) and strips the [Gmail]/ prefix from folder names.


Step 5 — Cut Over Your DNS / MX Records

When the IMAPSync run is complete, switch the MX records for your domain so new mail starts arriving at EasyCloudify. Until that switch, new messages will continue landing at the old provider — re-run IMAPSync after the cut-over to pick up the last few messages.

DNS for EasyCloudify-hosted domains is managed automatically — you don't need to change MX records yourself unless your domain is not on EasyCloudify DNS. See DNS Management.


Step 6 — Final Re-Sync

After MX is switched and a few hours have passed (give old senders time to retry), run IMAPSync one final time with the same command. It will pick up only the messages that arrived after the previous run.

You're now fully migrated. You can close the old mailbox at the source provider.


Troubleshooting

"AUTHENTICATIONFAILED" on the source

Use an app password instead of your main password. Two-factor authentication on Gmail, Microsoft 365, Yahoo, and Fastmail requires an app-specific password for IMAP.

"AUTHENTICATIONFAILED" on the destination

Use your EasyCloudify mailbox password (set in /cloudpanel/mailboxes), not your dashboard login password.

IMAPSync is too slow / connection drops

Add --useuid --usecache to skip already-copied messages quickly. Run inside tmux or screen so a network blip doesn't kill the migration.

Folder hierarchy looks wrong on the destination

Re-run with --automap and the relevant --regextrans2 rules above. IMAPSync is idempotent — re-running is safe and only copies missing messages.

Some messages didn't transfer

Check the IMAPSync output for individual errors. The most common cause is messages over the destination provider's per-message size limit (rare for normal email; common for messages with very large attachments). Forward or download those manually.


Migration FAQ

Will my read/unread status be preserved?

Yes. IMAPSync preserves \Seen, \Flagged, \Answered, \Draft, and \Deleted flags.

Will message dates be preserved?

Yes. IMAPSync uses each message's INTERNALDATE so they sort in the correct chronological order.

Will Gmail labels survive?

Gmail labels are translated into IMAP folders. A message with two labels appears in two folders. Use --exclude '\[Gmail\]/All Mail' to avoid duplicating everything.

Can I migrate calendars and contacts too?

IMAPSync only handles mail. Export calendars (ICS) and contacts (vCard) from the old provider and import them into the new mailbox via webmail (Settings → Calendar / Address Book → Import).

How long should I keep the old mailbox open?

Keep it open for at least one full DNS TTL cycle (typically 24–48h) after switching MX, so any in-flight messages can be picked up by a final IMAPSync run.


Related Guides

  • Email Hosting — Mailboxes, Aliases & Forwardings
  • Webmail Access
  • Set Up Desktop Email Clients
  • DNS Management
PreviousEmail Forwarding & Auto-Reply (Out-of-Office)NextEmail Folders & Auto-Deletion — Trash, Spam & Plus Addressing
On this page
  • When to Migrate
  • Before You Start
  • Step 1 — Install IMAPSync
  • macOS
  • Linux (Debian / Ubuntu)
  • Linux (Fedora / RHEL)
  • Windows
  • Step 2 — Gather Connection Details
  • Source (the provider you are leaving)
  • Destination (your new EasyCloudify mailbox)
  • Step 3 — Test the Connection
  • Step 4 — Run the Real Migration
  • Useful Flags
  • Gmail-Specific Recommended Command
  • Step 5 — Cut Over Your DNS / MX Records
  • Step 6 — Final Re-Sync
  • Troubleshooting
  • "AUTHENTICATIONFAILED" on the source
  • "AUTHENTICATIONFAILED" on the destination
  • IMAPSync is too slow / connection drops
  • Folder hierarchy looks wrong on the destination
  • Some messages didn't transfer
  • Migration FAQ
  • Will my read/unread status be preserved?
  • Will message dates be preserved?
  • Will Gmail labels survive?
  • Can I migrate calendars and contacts too?
  • How long should I keep the old mailbox open?
  • Related Guides

Was this helpful?

AI Tools