Tooling

imapsync without the command line

Let us be blunt: we did not write our own migration engine. Underneath is imapsync — the same one that has been around for two decades and has moved more mail than any commercial alternative. We gave it an interface.

Why imapsync, and why it is awkward

imapsync solves exactly one problem and solves it well: it synchronises two IMAP mailboxes, checking what the destination already has and copying only what is missing. Hence its best property — a repeat run creates no duplicates and costs almost nothing.

The awkwardness starts at installation. It is a Perl script with dozens of dependencies; on Linux a package manager handles it, on macOS with caveats, and on Windows it has always been rough: there is no official build, and the ones floating around were assembled by someone from something.

The second half is the command itself. imapsync has well over a hundred options, and a typical migration is an eight-line invocation in which source and destination are easy to swap by accident.

An ordinary imapsync command
imapsync \
  --host1 imap.old.com --port1 993 --ssl1 \
  --user1 anna@old.com --passfile1 /run/secrets/p1 \
  --host2 imap.new.com --port2 993 --ssl2 \
  --user2 anna@new.com --passfile2 /run/secrets/p2 \
  --exclude "^\[Gmail\]/All Mail$" --automap --skipcrossduplicates

What the interface adds

Exactly the same run, with the parameters typed into two forms instead of assembled into a string. The difference is not cosmetic: most failed migrations are not software faults, they are a typo in a flag.

What it does not change

Speed. Provider limits set it, and no wrapper gets around them.

Protocol capability. If IMAP cannot do something — calendars and contacts, for instance — neither can imapsync, and neither can we.

Responsibility for exclusions. Whether to migrate Gmail All Mail stays a human decision: the tool can hint, but it cannot know whether you want the archive or the structure.

Local or online

The local client is that same imapsync with an interface, running on your machine. Neither messages nor passwords go anywhere, and there is no size cap. It is the default choice for company mail and for mailboxes of tens of gigabytes.

An online migration makes sense when installing anything on the work machine is not an option. Then the mail passes through our server, which is a deliberate trade of convenience for trust — so we state plainly what happens to the credentials.

FAQ

Common questions

Is it really the same imapsync?

Yes. We did not rewrite the engine and do not pretend otherwise: this is a wrapper with an interface, pre-flight checks and readable errors.

Do I need Perl on Windows?

No. The Windows client is a self-contained executable with its dependencies already inside.

Can I see the command being run?

Yes, the parameters are visible in full — handy if you later want to repeat the same run from a terminal.

Does it move calendars and contacts?

No. IMAP is a mail protocol; calendars and contacts live in CalDAV and CardDAV and need separate tools.

Where to next

Move your mail with MoveMailbox

More posts

Find out how big your mailbox is. It costs nothing.

Connect two servers, look at the size and decide. Or take the client and keep everything on your side.

Code on GitHub · built on imapsync · no sign-up