mirror of
https://github.com/chatmail/relay.git
synced 2026-09-13 10:53:15 +00:00
feat: Log disabled recipients (#113)
Logs disabled recipient addresses when removing them from RCPT TO. Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
2450d1d9c7
commit
ec0413bd5f
@@ -101,7 +101,13 @@ impl SmtpHandler for IncomingBeforeQueueHandler {
|
|||||||
envelope.rcpt_to = envelope
|
envelope.rcpt_to = envelope
|
||||||
.rcpt_to
|
.rcpt_to
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|s| !self.config.is_disabled(s))
|
.filter(|s| {
|
||||||
|
let disabled = self.config.is_disabled(s);
|
||||||
|
if disabled {
|
||||||
|
log::warn!("Disabled recipient: {s}; removing from RCPT TO");
|
||||||
|
}
|
||||||
|
!disabled
|
||||||
|
})
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,13 @@ impl SmtpHandler for OutgoingBeforeQueueHandler {
|
|||||||
envelope.rcpt_to = envelope
|
envelope.rcpt_to = envelope
|
||||||
.rcpt_to
|
.rcpt_to
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|s| !self.config.is_disabled(s))
|
.filter(|s| {
|
||||||
|
let disabled = self.config.is_disabled(s);
|
||||||
|
if disabled {
|
||||||
|
log::warn!("Disabled recipient: {s}; removing from RCPT TO");
|
||||||
|
}
|
||||||
|
!disabled
|
||||||
|
})
|
||||||
.cloned()
|
.cloned()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user