mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2024-12-01 01:43:38 +00:00
Avoid sending reports for DMARC/delivery reports (closes #173)
This commit is contained in:
parent
be8f23296d
commit
af89725d20
1 changed files with 3 additions and 2 deletions
|
@ -239,6 +239,7 @@ impl<T: SessionStream> Session<T> {
|
|||
}
|
||||
|
||||
// Verify DMARC
|
||||
let is_report = self.is_report();
|
||||
let (dmarc_result, dmarc_policy) = match &self.data.spf_mail_from {
|
||||
Some(spf_output) if dmarc.verify() => {
|
||||
let dmarc_output = self
|
||||
|
@ -301,7 +302,7 @@ impl<T: SessionStream> Session<T> {
|
|||
}
|
||||
|
||||
// Send DMARC report
|
||||
if dmarc_output.requested_reports() {
|
||||
if dmarc_output.requested_reports() && !is_report {
|
||||
self.send_dmarc_report(
|
||||
&auth_message,
|
||||
&auth_results,
|
||||
|
@ -330,7 +331,7 @@ impl<T: SessionStream> Session<T> {
|
|||
};
|
||||
|
||||
// Analyze reports
|
||||
if self.is_report() {
|
||||
if is_report {
|
||||
self.core.analyze_report(raw_message.clone());
|
||||
if !rc.analysis.forward {
|
||||
self.data.messages_sent += 1;
|
||||
|
|
Loading…
Reference in a new issue