aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data_structures.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/data_structures.rs b/src/data_structures.rs
new file mode 100644
index 0000000..a90b7b0
--- /dev/null
+++ b/src/data_structures.rs
@@ -0,0 +1,35 @@
+enum DMARCPolicy {
+ None,
+ Quarantine,
+ Reject
+}
+
+enum DMARCAlignment {
+ Relaxed,
+ Strict
+}
+
+enum DMARCFailureOption {
+ AlignedPassFailure,
+ OtherAlignedPassFailure,
+ SignatureAlignmentFailure,
+ SPFFailure
+}
+
+struct DMARCRecord {
+ domain: String,
+ adkim: DMARCAlignment,
+ aspf: DMARCAlignment,
+ policy: DMARCPolicy,
+ subdomain_policy: DMARCPolicy,
+ percentage: u64,
+ failure_opt: DMARCFailureOption
+}
+
+pub struct DMARCReport {
+ id: String,
+ org: String,
+ record: DMARCRecord,
+ dkim_pass: bool,
+ spf_pass: bool
+}