Finish the external IMAP mailbox import workflow #283

Merged
parkel merged 2 commits from feature/complete-mailbox-import into main 2026-12-04 02:08:24 +01:00
Owner

New features

  • Start an external IMAP import with the source credentials alone. Existing mailbox passwords stay unchanged, whether the destination is local or on a linked Coulobre mail node.
  • Run the import in short background batches. Continue from saved UID checkpoints, retry interrupted connections, and reconcile a lost append acknowledgement before retrying a message.

Improvements

  • Refresh progress and the final report automatically without refreshing the form. Show copies from this run, previous copies, recorded bytes, elapsed time, and per-folder status.
  • Search bounded UID ranges rather than listing all remaining messages in a large folder on every pass.

Security

  • Limit receiver requests to a managed, active mailbox and authorize linked panels against their DNS-name scope. The narrow import protocol cannot return message bodies, change credentials, or delete mail.
  • Keep only the encrypted source credential until the run ends or expires.

Verification

  • Django test suite (759 tests, one skipped), installer tests (37), Ruff, migration check, and shell syntax.
  • Built and inspected the Debian package and verified the worker's installed socket-access drop-in.
  • On an isolated Ubuntu 26.04 LTS VM, verified a real TLS source and a managed Dovecot destination, an interrupted batch followed by automatic continuation, a second pass without duplicates, and rejection of an unassigned domain for a scoped peer.

Upgrade notes

  • Finish any active imports before upgrading. The migration clears old two-password credentials and keeps checkpoints, so an interrupted legacy job can resume with only the source password.
  • A linked mail receiver must be upgraded to the matching release and use a domain-scoped connection. APT replaces the worker's socket-access drop-in automatically. For a wheel-only upgrade, refresh the optional import worker unit as documented.

Closes #281
Closes #282

## New features - Start an external IMAP import with the source credentials alone. Existing mailbox passwords stay unchanged, whether the destination is local or on a linked Coulobre mail node. - Run the import in short background batches. Continue from saved UID checkpoints, retry interrupted connections, and reconcile a lost append acknowledgement before retrying a message. ## Improvements - Refresh progress and the final report automatically without refreshing the form. Show copies from this run, previous copies, recorded bytes, elapsed time, and per-folder status. - Search bounded UID ranges rather than listing all remaining messages in a large folder on every pass. ## Security - Limit receiver requests to a managed, active mailbox and authorize linked panels against their DNS-name scope. The narrow import protocol cannot return message bodies, change credentials, or delete mail. - Keep only the encrypted source credential until the run ends or expires. ## Verification - Django test suite (759 tests, one skipped), installer tests (37), Ruff, migration check, and shell syntax. - Built and inspected the Debian package and verified the worker's installed socket-access drop-in. - On an isolated Ubuntu 26.04 LTS VM, verified a real TLS source and a managed Dovecot destination, an interrupted batch followed by automatic continuation, a second pass without duplicates, and rejection of an unassigned domain for a scoped peer. ## Upgrade notes - Finish any active imports before upgrading. The migration clears old two-password credentials and keeps checkpoints, so an interrupted legacy job can resume with only the source password. - A linked mail receiver must be upgraded to the matching release and use a domain-scoped connection. APT replaces the worker's socket-access drop-in automatically. For a wheel-only upgrade, refresh the optional import worker unit as documented. Closes #281 Closes #282
parkel added 2 commits 2026-12-04 01:28:57 +01:00
Continue mailbox imports in batches and show live copy statistics
Coulobre Panel CI / Checks (Python 3.12) (pull_request) Successful in 1m49s
Coulobre Panel CI / Checks (Python 3.14) (pull_request) Successful in 2m1s
5b0dfff8e7
parkel added the area/mail
kind
feature
labels 2026-12-04 01:28:57 +01:00
parkel merged commit 831efec530 into main 2026-12-04 02:08:24 +01:00
parkel deleted branch feature/complete-mailbox-import 2026-12-04 02:08:24 +01:00
Sign in to join this conversation.