From 7d3e612faf7c2236c2f2778ed57013f5c218161a Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 1 Jul 2024 20:44:15 +0000 Subject: [PATCH] fix(imap): reset new_mail if folder is ignored This prevents skipping IDLE in infinite loop if folder is not fetched. This happens on the INBOX when OnlyFetchMvbox setting is enabled. --- src/imap.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/imap.rs b/src/imap.rs index 632cb258a3..8c2dcb1501 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -540,6 +540,7 @@ impl Imap { ) -> Result { if should_ignore_folder(context, folder, folder_meaning).await? { info!(context, "Not fetching from {folder:?}."); + session.new_mail = false; return Ok(false); }