iSMAIL

A from-scratch Rust rewrite of imapsync — same command line, same log output, plus a web API, a UI and a scheduler, in one 4.7 MB static binary.

Why

imapsync is the de-facto standard for mailbox-to-mailbox IMAP migration and sync. It is Perl, it has no API, and scheduling means hand-written shell loops. iSMAIL keeps the exact behaviour you depend on and adds what never existed: a single-binary Rust engine, an HTTP API covering every CLI option, and a web UI with an in-process scheduler — all in one deployable image.

Any IMAP server works (password/app-password auth) — the engine speaks standard IMAP4rev1 over TLS and STARTTLS, exactly like imapsync: Dovecot, Stalwart, Courier, Gmail, GMX, iCloud… Gmail/Outlook quirks are covered by the same presets (--gmail1, --office1). XOAUTH2 token login — what MS Exchange and Fastmail now demand — is on the roadmap. The live verification set just happens to be Gmail + GMX + iCloud → Stalwart.

What you get

1:1 CLI & log compatibility325 accepted option spellings extracted from the live imapsync 2.326 option spec; identical exit codes (0 / 1 / 64 / 101); imapsync-style transcripts with the same statistics keys, so existing log consumers keep working.
Web APIEvery CLI option and operation reachable over HTTP: start a dry-run or sync, follow its transcript live, manage schedules. Reference.
Web UI & schedulerAd-hoc runs and scheduled operations — the production shell loop replaced by something you can watch, pause and audit. Walkthrough.
Push, not polling--idle1 rides IMAP IDLE (RFC 2177): the source server pushes EXISTS the moment mail lands and the next sync starts ~1 s later — with renew, reconnect and backoff. Schedules become the safety net. imapsync never had this.
One fat imageEngine, API, UI (Tabler dashboard, v0.9), scheduler and push watcher in one 4.9 MB static musl binary on a scratch base: embedded TLS roots, non-root, no dependencies.

CLI, exactly as you know it

# drop-in: same flags, same semantics, --dry plans without touching mail
ismail --host1 imap.gmail.com --user1 you@gmail.com --password1 'app-pass' \
       --ssl1 --gmail1 \
       --host2 mail.example.com --user2 you@example.com --password2 'secret' --ssl2 \
       --delete1 --syncinternaldates --dry

No dependencies (pure-Rust TLS), no Perl, no CPAN. --optionsfile, negations (--nofoldersizes), repeated options (--exclude a --exclude b), presets (--gmail1, --office1) and --f1f2/--regextrans2 folder mapping all behave like the original. Quickstart →

Verified against the real thing

Bugs the original still ships — fixed here

Status

AreaState
CLI contract: 325 spellings, exit-code paritydone
Engine: TLS, presets, automap, include/exclude, dedup, dry plansdone
Real (non-dry) sync parity: 12/12 identical on live test accounts, idempotent rerundone
Production parity: 4/4 live mailboxes MATCH on --dry (vs imapsync 2.326)done
Log-output parity: statistics, folder loop, automap linesdone
Web API (all CLI options over HTTP)done
Web UI + in-app schedulerdone
Fat image: 4.9 MB musl binary on scratch, OCI-labelled, CI size budget (6.5 MB)done
IDLE push mode --idle1 (v0.5.0, mock-tested incl. drop/reconnect)done
UI login (v0.7): classic user/password and OIDC SSO (Keycloak/Authentik/Entra), session cookie; bearer token stays the script pathdone
Replacing a live production imapsync deploymentyour call — run it beside your current setup with --dry first

Links