From 06b2a890da4d84e57468e38a06eb99e8b2bb5786 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Tue, 9 Dec 2025 14:42:24 +0100 Subject: [PATCH] fix: multi-transport: all transports were shown as "inbox" in connectivity view, now they are shown by their hostname (#7582) closes #7580 --- src/scheduler.rs | 10 ++++++++++ src/scheduler/connectivity.rs | 16 +++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/scheduler.rs b/src/scheduler.rs index 54be6f7bc..b8bfd7b75 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -325,6 +325,8 @@ impl Drop for IoPausedGuard { #[derive(Debug)] struct SchedBox { + /// Hostname of used chatmail/email relay + host: String, meaning: FolderMeaning, conn_state: ImapConnectionState, @@ -881,7 +883,14 @@ impl Scheduler { let ctx = ctx.clone(); task::spawn(inbox_loop(ctx, inbox_start_send, inbox_handlers)) }; + let host = configured_login_param + .addr + .split("@") + .last() + .context("address has no host")? + .to_owned(); let inbox = SchedBox { + host: host.clone(), meaning: FolderMeaning::Inbox, conn_state, handle, @@ -897,6 +906,7 @@ impl Scheduler { let meaning = FolderMeaning::Mvbox; let handle = task::spawn(simple_imap_loop(ctx, start_send, handlers, meaning)); oboxes.push(SchedBox { + host, meaning, conn_state, handle, diff --git a/src/scheduler/connectivity.rs b/src/scheduler/connectivity.rs index 169c2a44d..36b364107 100644 --- a/src/scheduler/connectivity.rs +++ b/src/scheduler/connectivity.rs @@ -373,7 +373,13 @@ impl Context { InnerSchedulerState::Started(ref sched) => ( sched .boxes() - .map(|b| (b.meaning, b.conn_state.state.connectivity.clone())) + .map(|b| { + ( + b.host.clone(), + b.meaning, + b.conn_state.state.connectivity.clone(), + ) + }) .collect::>(), sched.smtp.state.connectivity.clone(), ), @@ -396,7 +402,7 @@ impl Context { let watched_folders = get_watched_folder_configs(self).await?; let incoming_messages = stock_str::incoming_messages(self).await; ret += &format!("

{incoming_messages}