Add resumable external IMAP mailbox imports #268

Merged
parkel merged 2 commits from feature/imap-mailbox-import into main 2026-12-03 22:52:18 +01:00
Owner

New features

  • Add Import mail for provisioned mailboxes. Customers can import into their own mailboxes and authorized operators can run an import on their behalf. The same workflow works with local and linked Coulobre mail nodes.
  • Copy folders, messages, original internal dates and supported flags over verified IMAPS. The worker does not delete mail, change DNS or modify the source account.
  • Display per-folder progress and allow incremental reruns with the same source. Keep a checkpoint for each folder and reconcile an interrupted APPEND before retrying it.

Security

  • Require public source addresses, pin the resolved address during the TLS connection, and only use the configured destination IMAP hostname.
  • Isolate imports in a dedicated worker. Queue only the job ID and encrypt the passwords in the panel database until the job finishes or expires.

Documentation

  • Document worker setup, supported sources, retry behavior, and when to run the final pass during a mail cutover.

Verification

  • 735 Django tests run with one skip, plus 37 installer tests. Ruff and migration consistency checks passed.
  • Built and inspected the source, wheel, and local Debian package.
  • Verified a populated Dovecot destination on Ubuntu 26.04 using MariaDB and a private network link to the configured IMAP endpoint. Tested TLS hostname rejection, folder and flag preservation, original dates, unchanged source flags, and incremental imports without duplicates. Automated tests also cover tenant isolation, quota errors, and a disconnect after an accepted write.

Operational notes

The feature is off by default. Enable the dedicated worker on a panel that provisions mailboxes. A linked mail node needs no new provisioning endpoint. No deployment or release is included.

Closes #258.

## New features - Add **Import mail** for provisioned mailboxes. Customers can import into their own mailboxes and authorized operators can run an import on their behalf. The same workflow works with local and linked Coulobre mail nodes. - Copy folders, messages, original internal dates and supported flags over verified IMAPS. The worker does not delete mail, change DNS or modify the source account. - Display per-folder progress and allow incremental reruns with the same source. Keep a checkpoint for each folder and reconcile an interrupted APPEND before retrying it. ## Security - Require public source addresses, pin the resolved address during the TLS connection, and only use the configured destination IMAP hostname. - Isolate imports in a dedicated worker. Queue only the job ID and encrypt the passwords in the panel database until the job finishes or expires. ## Documentation - Document worker setup, supported sources, retry behavior, and when to run the final pass during a mail cutover. ## Verification - 735 Django tests run with one skip, plus 37 installer tests. Ruff and migration consistency checks passed. - Built and inspected the source, wheel, and local Debian package. - Verified a populated Dovecot destination on Ubuntu 26.04 using MariaDB and a private network link to the configured IMAP endpoint. Tested TLS hostname rejection, folder and flag preservation, original dates, unchanged source flags, and incremental imports without duplicates. Automated tests also cover tenant isolation, quota errors, and a disconnect after an accepted write. ## Operational notes The feature is off by default. Enable the dedicated worker on a panel that provisions mailboxes. A linked mail node needs no new provisioning endpoint. No deployment or release is included. Closes #258.
parkel added 2 commits 2026-12-03 22:47:57 +01:00
Document mailbox import setup and mail cutover
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Successful in 1m46s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Successful in 1m58s
9a53cf625a
parkel added the area/mail
kind
feature
labels 2026-12-03 22:47:58 +01:00
parkel merged commit 4c6400af32 into main 2026-12-03 22:52:18 +01:00
parkel deleted branch feature/imap-mailbox-import 2026-12-03 22:52:18 +01:00
Sign in to join this conversation.