Commit
+9 -6 +/-1 browse
1 | diff --git a/src/dmarc/mod.rs b/src/dmarc/mod.rs |
2 | index 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 | } |