From 2e1c38466c5c72f7e96d6be662f861301b14f3f8 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, 25 Feb 2026 16:08:41 +0100 Subject: [PATCH] fix(logs): Log correct address for outbound messages (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #68 Signed-off-by: Jagoda Ślązak --- filtermail/src/outbound.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filtermail/src/outbound.rs b/filtermail/src/outbound.rs index 86cfe7b3..a654fe52 100644 --- a/filtermail/src/outbound.rs +++ b/filtermail/src/outbound.rs @@ -73,7 +73,10 @@ impl SmtpHandler for OutgoingBeforeQueueHandler { let from_addr = extract_address(&from_header) .ok_or(format!("500 Invalid FROM header: {from_header}"))?; - log::debug!("Processing DATA message from {from_addr}"); + // MAIL FROM is our source of truth for outbound messages, + // as this address is checked by postfix against the username before sending it + // to filtermail. + log::debug!("Processing DATA message from {}", envelope.mail_from); if !envelope.mail_from.eq_ignore_ascii_case(&from_addr) { return Err(format!(