Commit
Author: Mauro D [mauro@stalw.art]
Hash: 939504a31805bd1fbd54a4768bde924ddd97acae
Timestamp: Tue, 07 Mar 2023 14:07:26 +0000 (1 year ago)

+9 -6 +/-1 browse
Fixes failure report options.
1diff --git a/src/dmarc/mod.rs b/src/dmarc/mod.rs
2index 00c307e..96c68da 100644
3--- a/src/dmarc/mod.rs
4+++ b/src/dmarc/mod.rs
5 @@ -185,13 +185,16 @@ impl DmarcOutput {
6 match &self.record {
7 Some(record)
8 if !record.ruf.is_empty()
9- && (self.dkim_result != DmarcResult::Pass
10+ && ((self.dkim_result != DmarcResult::Pass
11 && matches!(record.fo, Report::Any | Report::Dkim | Report::DkimSpf))
12- || (self.spf_result != DmarcResult::Pass
13- && matches!(record.fo, Report::Any | Report::Spf | Report::DkimSpf))
14- || (self.dkim_result != DmarcResult::Pass
15- && self.spf_result != DmarcResult::Pass
16- && record.fo == Report::All) =>
17+ || (self.spf_result != DmarcResult::Pass
18+ && matches!(
19+ record.fo,
20+ Report::Any | Report::Spf | Report::DkimSpf
21+ ))
22+ || (self.dkim_result != DmarcResult::Pass
23+ && self.spf_result != DmarcResult::Pass
24+ && record.fo == Report::All)) =>
25 {
26 Some(record.fo.clone())
27 }