Some mails can't be moved out of the junk folder (fixes #670)
Some checks failed
trivy / Check (push) Has been cancelled

This commit is contained in:
mdecimus 2024-11-22 19:15:35 +13:00
parent 6d26cb5d66
commit 2a110f385d

View file

@ -121,7 +121,9 @@ impl EmailIngest for Server {
// Check for Spam headers // Check for Spam headers
let mut is_spam = false; 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] if params.mailbox_ids == [INBOX_ID]
&& message.root_part().headers().iter().any(|header| { && message.root_part().headers().iter().any(|header| {
&header.name == header_name &header.name == header_name