Mila

PricingGuidesAbout
Sign inSign up

Migration

Migrating from another provider with imapsync

Copy existing mail into a Mila mailbox from your old host, safely and re-runnably.

What imapsync does

imapsync is a well-established open-source command-line tool that connects to two IMAP accounts at once -- your old provider and your new Mila mailbox -- and copies messages and folders between them. It's read-only on the source account by default, skips messages it's already copied on repeat runs, and reports exactly what it did per folder, which makes it safe to run more than once while you're still deciding when to fully cut over.

Before you start

  1. Create the destination mailbox in the panel first (Domain > Mailboxes > New) and note its address and password. IMAP access is on by default for new mailboxes, so there's nothing extra to enable.
  2. Gather the old provider's IMAP hostname and your login credentials there -- check that provider's own documentation for the exact host, since it varies by provider.
  3. Install imapsync: brew install imapsync on macOS, your distribution's package manager on Linux (for example apt install imapsync), or the project's Docker image if you'd rather not install it directly.

Do a dry run first

imapsync \
  --host1 <old-provider-imap-host> --user1 you@old-domain.com --password1 '<old-password>' \
  --host2 imap.mila.cx --port2 993 --ssl2 \
  --user2 you@yourdomain.com --password2 '<mila-password>' \
  --dry

The --dry flag simulates the whole sync without copying anything, which is enough to confirm both accounts authenticate correctly and to see roughly how many messages and folders you're about to move.

Run the real sync

Drop --dry and run the same command again. A large mailbox can take a while the first time; imapsync prints progress folder by folder as it goes. A few flags worth knowing about:

After the sync

Point your mail clients at Mila's settings (see Email client settings) instead of the old provider. Because imapsync skips what it's already copied, it's safe to run the same command again right before cutover to pick up anything that arrived on the old account in between. Once you're satisfied, update your domain's MX record to route new incoming mail to Mila -- see DNS setup for mail.

If something goes wrong

An SSL-related error on the source account usually means it needs --ssl1 added explicitly. An authentication failure against Mila almost always means the username wasn't the full email address, or IMAP access is disabled for that mailbox. If the old provider starts throttling or disconnecting you mid-sync, scope the run to one folder at a time with --folder instead of copying everything in a single pass.