Add Zoho and Zimbra import sources as IMAP presets #83

Merged
jcoffey-dev merged 1 commits from feat/zoho-zimbra into main 2026-11-13 19:38:44 +00:00
Owner

Adds import zoho and import zimbra — the last of the remaining [post] sources. Both are IMAP presets, built exactly the way import fastmail is a JMAP preset: fill in the server so the command needs only an address and password.

inbuxa-migrate import zoho   [--region com|eu|in|au|jp] [--host <HOST>] --user <EMAIL> [--password <PASS>] <ARCHIVE>
inbuxa-migrate import zimbra  --host <HOST> --user <EMAIL> [--password <PASS>] [--starttls [--allow-cleartext]] <ARCHIVE>
  • Zoho fills in Zoho's IMAP host for the account's data center. --region maps to Zoho's own imap.zoho.<region> pattern (com, eu, in, com.au, jp); --host overrides it for a center not enumerated (a Zoho Workplace host like imappro.zoho.com, or another region). IMAPS on 993. App-specific password where the account has 2FA.
  • Zimbra points at the operator's own Zimbra server. IMAPS on 993 by default; --starttls connects on 143 and upgrades, and --allow-cleartext (only with --starttls) permits plain where STARTTLS is unavailable.

How it's built

  • Both resolvers produce an ordinary Action::ImportImap with a preset URL and ImapAuth::Basic, through a shared imap_preset_config that applies the IMAP defaults. So they reuse the whole IMAP pipeline — delta re-sync, --estimate, the archive format — and add no new Action, coordinator, main.rs arm, or schema change. Pure CLI.
  • For folder filters and the other IMAP knobs, import imap with the same URL still serves; the docs say so.
  • The source is recorded as kind imap (it is one), so nothing in the archive layer changes.

Why presets, not native APIs

Both Zoho and Zimbra primarily expose standard IMAP (+ CalDAV/CardDAV). Native clients — Zimbra SOAP/REST, Zoho's OAuth Mail API — would be far larger and aren't implied by "more sources". This matches the roadmap's "easy + good marketing" framing and the Fastmail precedent. (Chosen with John.)

Tests & verification

  • 4 CLI parse tests: Zoho region→host mapping and the US default, --host override beating --region, Zimbra IMAPS-993 default vs --starttls 143, and --allow-cleartext rejected without --starttls. cargo fmt --check, clippy -D warnings, cargo test --locked (1238) all green. import --help lists both; import zoho --help shows the region values and the --host escape hatch.

Documented in README (Sources), docs/usage.md (new Zoho and Zimbra sections), and CHANGELOG [Unreleased].

With this, POP3 (#82) and these two close out the migrate [post] import sources.

Adds `import zoho` and `import zimbra` — the last of the remaining `[post]` sources. Both are IMAP presets, built exactly the way `import fastmail` is a JMAP preset: fill in the server so the command needs only an address and password. ``` inbuxa-migrate import zoho [--region com|eu|in|au|jp] [--host <HOST>] --user <EMAIL> [--password <PASS>] <ARCHIVE> inbuxa-migrate import zimbra --host <HOST> --user <EMAIL> [--password <PASS>] [--starttls [--allow-cleartext]] <ARCHIVE> ``` - **Zoho** fills in Zoho's IMAP host for the account's data center. `--region` maps to Zoho's own `imap.zoho.<region>` pattern (`com`, `eu`, `in`, `com.au`, `jp`); `--host` overrides it for a center not enumerated (a Zoho Workplace host like `imappro.zoho.com`, or another region). IMAPS on 993. App-specific password where the account has 2FA. - **Zimbra** points at the operator's own Zimbra server. IMAPS on 993 by default; `--starttls` connects on 143 and upgrades, and `--allow-cleartext` (only with `--starttls`) permits plain where STARTTLS is unavailable. ### How it's built - Both resolvers produce an ordinary `Action::ImportImap` with a preset URL and `ImapAuth::Basic`, through a shared `imap_preset_config` that applies the IMAP defaults. So they **reuse the whole IMAP pipeline** — delta re-sync, `--estimate`, the archive format — and add **no new Action, coordinator, main.rs arm, or schema change**. Pure CLI. - For folder filters and the other IMAP knobs, `import imap` with the same URL still serves; the docs say so. - The source is recorded as kind `imap` (it is one), so nothing in the archive layer changes. ### Why presets, not native APIs Both Zoho and Zimbra primarily expose standard IMAP (+ CalDAV/CardDAV). Native clients — Zimbra SOAP/REST, Zoho's OAuth Mail API — would be far larger and aren't implied by "more sources". This matches the roadmap's "easy + good marketing" framing and the Fastmail precedent. (Chosen with John.) ### Tests & verification - 4 CLI parse tests: Zoho region→host mapping and the US default, `--host` override beating `--region`, Zimbra IMAPS-993 default vs `--starttls` 143, and `--allow-cleartext` rejected without `--starttls`. `cargo fmt --check`, `clippy -D warnings`, `cargo test --locked` (1238) all green. `import --help` lists both; `import zoho --help` shows the region values and the `--host` escape hatch. Documented in README (Sources), `docs/usage.md` (new Zoho and Zimbra sections), and CHANGELOG `[Unreleased]`. With this, POP3 (#82) and these two close out the migrate `[post]` import sources.
jcoffey-dev added 1 commit 2026-11-13 19:32:53 +00:00
Add Zoho and Zimbra import sources as IMAP presets
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 5m32s
ci / announce (pull_request) Skipped
1c33f4690a
import zoho and import zimbra import mail over IMAP, the same way import
fastmail imports over JMAP: a preset that fills in the server so the
command needs only an address and password.

zoho fills in Zoho's IMAP host for the account's data center (--region
com|eu|in|au|jp, or --host for one not listed, such as a Zoho Workplace
host); zimbra points at the operator's own Zimbra server, over IMAPS on
993 by default or STARTTLS on 143 with --starttls. Both build an
ordinary IMAP import, so they reuse the whole pipeline -- delta re-sync,
--estimate, the archive format -- and add no new action, coordinator or
schema. For folder filters and the other IMAP options, import imap with
the same URL still serves.

The Zoho region hosts follow Zoho's own imap.zoho.<region> pattern, with
--host as the escape hatch for data centers not enumerated.
jcoffey-dev force-pushed feat/zoho-zimbra from 13d3041092 to 1c33f4690a 2026-11-13 19:32:53 +00:00 Compare
jcoffey-dev merged commit 22b13f56bb into main 2026-11-13 19:38:44 +00:00
jcoffey-dev deleted branch feat/zoho-zimbra 2026-11-13 19:38:44 +00:00
Sign in to join this conversation.