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
- 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.
- 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.
- Install imapsync:
brew install imapsyncon macOS, your distribution's package manager on Linux (for exampleapt 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:
--automapmatches similarly named folders across providers (for example, an old "Sent Items" folder onto Mila's "Sent").--syncinternaldatespreserves each message's original received date instead of stamping it with the sync time.--justfolderson its own, as a first pass, replicates the folder structure without copying any messages yet -- useful for a quick sanity check before the full transfer.
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.