mirror of
https://github.com/chatmail/relay.git
synced 2026-09-20 22:30:09 +00:00
fix(logs): Log correct address for outbound messages (#70)
Fixes #68 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
@@ -73,7 +73,10 @@ impl SmtpHandler for OutgoingBeforeQueueHandler {
|
|||||||
let from_addr = extract_address(&from_header)
|
let from_addr = extract_address(&from_header)
|
||||||
.ok_or(format!("500 Invalid FROM header: {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) {
|
if !envelope.mail_from.eq_ignore_ascii_case(&from_addr) {
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
|
|||||||
Reference in New Issue
Block a user