Crates.io | dmarc |
lib.rs | dmarc |
version | 0.1.8 |
source | src |
created_at | 2022-01-20 20:53:05.258509 |
updated_at | 2023-09-21 12:50:39.126628 |
description | DMARC (RFC7489) implementation |
homepage | |
repository | https://github.com/cloudflare/dmarc |
max_upload_size | |
id | 517858 |
size | 29,749 |
DMARC (RFC7489) implementation
let policy: Option<dmarc::Policy> = dmarc::load_policy(&logger, &from_domain).await?;
The load_policy
arguments are the following:
let dkim_result: cfdkim::DKIMResult = ...;
let spf_result: SPFResult = ...;
let ctx = dmarc::PolicyContext {
from_domain: &from_domain,
logger: &logger,
dkim_result,
spf_result,
};
let res: DMARCResult = policy.apply(&ctx);
println!("dmarc={}", res.to_str());
dkim_result
is the result of verifying DKIM using the cfdkim crate. In the future it should be a trait.
spf_result
is the result of verifying SPF.
Not planned yet.