From 2a110f385ddf5f5251a3649b139c6f1d1bf34baa Mon Sep 17 00:00:00 2001 From: mdecimus Date: Fri, 22 Nov 2024 19:15:35 +1300 Subject: [PATCH] Some mails can't be moved out of the junk folder (fixes #670) --- crates/jmap/src/email/ingest.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/jmap/src/email/ingest.rs b/crates/jmap/src/email/ingest.rs index 3a608113..e287332c 100644 --- a/crates/jmap/src/email/ingest.rs +++ b/crates/jmap/src/email/ingest.rs @@ -121,7 +121,9 @@ impl EmailIngest for Server { // Check for Spam headers let mut is_spam = false; - if let Some((header_name, header_value)) = &self.core.jmap.spam_header { + if let (IngestSource::Smtp, Some((header_name, header_value))) = + (params.source, &self.core.jmap.spam_header) + { if params.mailbox_ids == [INBOX_ID] && message.root_part().headers().iter().any(|header| { &header.name == header_name