Skip to content

Conversation

@link2xt
Copy link
Collaborator

@link2xt link2xt commented Oct 24, 2025

Tracking issue: #7357

Based on (already merged) #7424, #7413, #7406, #7392

Adding second transport is only allowed with bcc_self disabled for now, synchronization of transports will be a separate PR. This PR is fine for adding multiple transports on a single-device setup already and switching between them.

Connectivity view will display something, but extending it for multi-transport is out of scope for this PR, this is in the tracking issue.

  • move resync_request from Context to Imap (already merged in refactor(imap): move resync request from Context to Imap #7406)
  • add transport_id column to imap table
  • add transport_id column to imap_sync table
  • set mvbox_move to 0 when the first transport is created, even if it is not chatmail
  • do not allow to create a second transport if mvbox_move or only_fetch_mvbox is enabled
  • do not allow to enable mvbox_move or only_fetch_mvbox if more than one transport is configured
  • test that current ConfiguredAddr transport cannot be deleted
  • do not allow to set ConfiguredAddr to the address that does not belong to any transport
  • run IMAP connections for all transports at once when I/O is started. For SMTP we only run selected transport, this works already
  • test that vCards contain the current primary address
  • Fix migration 73 to use direct SQL queries
  • restart I/O automatically when configured_addr is set
  • delete corresponding imap and imap_sync entries when the transport is deleted
  • fix flaky legacy examples/test_examples.py::test_echo_quit_plugin (disabled it, want to finish this PR instead of debugging legacy CFFI test)
  • do not create imap_sync entries for transport_id 0 during configuration
  • clean up SMTP queue when configured_addr is changed or keep multiple SMTP connections until SMTP queue for non-primary transports is empty

@link2xt link2xt self-assigned this Oct 24, 2025
@link2xt link2xt force-pushed the link2xt/multitransport branch 4 times, most recently from 9ca5385 to d3a4eee Compare October 26, 2025 09:12
@link2xt link2xt mentioned this pull request Oct 26, 2025
5 tasks
@link2xt link2xt force-pushed the link2xt/multitransport branch 4 times, most recently from a288b16 to d538e8f Compare October 31, 2025 18:03
@link2xt link2xt force-pushed the link2xt/multitransport branch 7 times, most recently from b866d3e to 5d66931 Compare November 3, 2025 14:33
@link2xt link2xt changed the base branch from main to link2xt/transport-module November 3, 2025 14:39
@link2xt link2xt force-pushed the link2xt/multitransport branch from 5d66931 to cbdae22 Compare November 3, 2025 14:40
@link2xt link2xt force-pushed the link2xt/transport-module branch from e2a6579 to 098c134 Compare November 3, 2025 18:14
@link2xt link2xt force-pushed the link2xt/multitransport branch from cbdae22 to 91c3957 Compare November 3, 2025 18:14
Base automatically changed from link2xt/transport-module to main November 3, 2025 18:58
@link2xt link2xt force-pushed the link2xt/multitransport branch from 91c3957 to 933903f Compare November 3, 2025 19:05
@link2xt link2xt changed the base branch from main to link2xt/query_and_then November 3, 2025 19:13
Base automatically changed from link2xt/query_and_then to main November 3, 2025 23:02
@link2xt link2xt force-pushed the link2xt/multitransport branch from 590cf06 to 22cdb13 Compare November 3, 2025 23:04
@link2xt link2xt force-pushed the link2xt/multitransport branch 2 times, most recently from 5f75474 to a2416ed Compare November 3, 2025 23:45
@link2xt link2xt force-pushed the link2xt/multitransport branch 2 times, most recently from d90ed64 to 7fa3a69 Compare November 13, 2025 11:31
@link2xt link2xt marked this pull request as ready for review November 13, 2025 11:36
@link2xt link2xt force-pushed the link2xt/multitransport branch from 7fa3a69 to 8bdc29d Compare November 13, 2025 11:36
@link2xt link2xt requested a review from Copilot November 13, 2025 11:37
Copilot finished reviewing on behalf of link2xt November 13, 2025 11:40

This comment was marked as resolved.

@link2xt link2xt force-pushed the link2xt/multitransport branch 2 times, most recently from 9bc7b8f to 61d132d Compare November 13, 2025 11:56
@link2xt link2xt force-pushed the link2xt/multitransport branch 6 times, most recently from 26af266 to 6151afc Compare November 13, 2025 13:48
@link2xt link2xt force-pushed the link2xt/multitransport branch from 6151afc to c97938e Compare November 13, 2025 15:18
@link2xt
Copy link
Collaborator Author

link2xt commented Nov 13, 2025

This is now ready for review.

It is a minimal support for multi-transport, allowing to add transports and switch between them while being connected to all of them over IMAP. It does not support synchronization, so adding transports should only be allowed when multi-device is not enabled ("bcc_self" is false).

Most important to review is the SQL migration, everything else can be changed later.

@link2xt link2xt requested review from Hocuri and iequidoo November 13, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants