Skip to main content

Crate mailrs_postmaster

Crate mailrs_postmaster 

Source
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§

CheckResult
One individual check inside a DomainCheckReport.
DomainCheckReport
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