From 7f14693b31fa8f0abab411342865e48728ff0cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jagoda=20Estera=20=C5=9Al=C4=85zak?= <128227338+j-g00da@users.noreply.github.com> Date: Wed, 1 Jul 2026 02:00:13 +0900 Subject: [PATCH] feat(logs): Log incoming mailer-daemon message sources (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Logs mailer-daemon messages separately from other unencrypted mails. Signed-off-by: Jagoda Ślązak --- filtermail/src/inbound.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filtermail/src/inbound.rs b/filtermail/src/inbound.rs index d0ea23ed..7272dc6f 100644 --- a/filtermail/src/inbound.rs +++ b/filtermail/src/inbound.rs @@ -136,15 +136,16 @@ where return self.verify_origin(&transaction.envelope, &from_addr).await; } - log::info!("Incoming: Filtering unencrypted mail."); - // Allow cleartext mailer-daemon messages if let Some(auto_submitted) = message.headers.get_first_value("Auto-Submitted") && !auto_submitted.is_empty() && from_addr.to_lowercase().starts_with("mailer-daemon@") && message.ctype.mimetype == "multipart/report" { + log::info!("Incoming: Filtering mailer-daemon message from <{from_addr}>"); return self.verify_origin(&transaction.envelope, &from_addr).await; + } else { + log::info!("Incoming: Filtering unencrypted mail."); } for recipient in &transaction.envelope.rcpt_to {