Expand description
Email-domain DNS health checks for postmasters.
Given a domain, check_domain runs the full battery of DNS-level
checks any mail-server operator needs at deploy time and during
incident response: MX, SPF, DKIM, DMARC, MTA-STS, TLS-RPT, BIMI,
DANE, PTR / FCrDNS.
Every check returns a CheckResult with a Status, a
human-readable message, and structured details. The full report
(DomainCheckReport) is Serialize so you can ship it straight
to JSON / Prometheus / a CLI table.
§Example
use hickory_resolver::TokioResolver;
use mailrs_postmaster::check_domain;
let resolver = TokioResolver::builder_tokio()?.build()?;
let report = check_domain(&resolver, "example.com", Some("default"), "mail.example.com").await;
for check in &report.checks {
println!("{}: {:?} — {}", check.name, check.status, check.message);
}Structs§
- Check
Result - One individual check inside a
DomainCheckReport. - Domain
Check Report - Full domain-health report returned by
check_domain.
Enums§
- Status
- Outcome bucket for a single
CheckResult.
Functions§
- check_
domain - Run every health check this crate knows against
domain. - extract_
bimi_ logo_ url - extract the logo URL from a BIMI record (l=https://…)
- lookup_
bimi_ logo - look up BIMI record for a domain and return the logo URL if found