Files
kumomta/crates/dkim
kay ozaki 1109639c0d enrich props for dkim and dmarc
Surface the underlying DKIM signature tags and the published DMARC
policy tags as auth-result props, so callers (and downstream
Authentication-Results headers) can see what was actually checked.

DKIM (crates/dkim):

* Factor populate_props() over the parsed tagged-header and emit
  header.d, header.i, header.a, header.s, header.c, header.t and
  header.x. The previous code only emitted d/i/a/s on the success
  path.
* On DKIMHeader::parse failure, fall back to a generic TaggedHeader
  parse so the resulting permerror AuthenticationResult still carries
  whatever tags were extractable (e.g. for expired signatures we now
  surface header.d and header.x). Covered by a new roundtrip test.

DMARC (crates/kumo-dmarc, crates/kumod):

* Record now retains the raw key=value tags it parsed, exposed via
  Record::tags().
* DispositionWithContext carries a new props map. Record::evaluate
  initialises it empty; drop the no-longer-relevant ToXml derive.
* DmarcContext::check copies the matched record's tags into the
  result props as policy.<tag> via a new policy_tags() helper.
* kumod's dmarc.rs threads result.props through into the
  AuthenticationResult returned to Lua (rather than starting empty),
  preserving the existing policy.published-domain-policy insertion
  for Quarantine/Reject.
2026-05-06 13:29:15 +00:00
..
2025-10-08 10:43:12 +01:00
2024-04-10 13:26:49 -07:00
2026-05-06 13:29:15 +00:00
2025-10-31 12:16:31 +00:00
2023-06-15 09:10:39 -07:00
2026-03-28 07:20:28 +00:00
2023-06-15 09:10:39 -07:00
2023-08-25 08:55:30 -07:00

kumo-dkim

DKIM (RFC6376) implementation

Features

Verifying email signatures

Example:

let res: DKIMResult = kumo_dkim::verify_email(&from_domain, &parsed_email).await?;

if let Some(err) = &res.error() {
  error!(logger, "dkim verify fail: {}", err);
}

println!("dkim={}", res.with_detail());

Signing an email

Example:

let private_key =
    rsa::RsaPrivateKey::read_pkcs1_pem_file(Path::new("./test/keys/2022.private"))?;

let signer = SignerBuilder::new()
    .with_signed_headers(["From", "Subject"])?
    .with_private_key(private_key)
    .with_selector("2020")
    .with_signing_domain("example.com")
    .build()?;
let signature = signer.sign(&email)?;

println!("{}", signature); // DKIM-Signature: ...

See the SignerBuilder object documentation for more information.

Generate a test DKIM key

Using OpenDKIM:

opendkim-genkey \
    --testmode \
    --domain=example.com \
    --selector=2022 \
    --nosubdomains