emailauth

package
v0.714.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package emailauth is the unified front-end for the email-authentication record decoders — the email-security analogue of the project's secret_identify / hash_identify routers. Paste any email-auth DNS TXT record (SPF, DKIM, or DMARC) and it detects the kind and dispatches to the matching in-tree decoder, so an operator (or an agent) pulling records from a bulk DNS dump / a config / a capture need not pre-classify them.

Detection is by the record's `v=` version tag (the unambiguous discriminator that SPF and DMARC both require, and which DKIM uses when present); a DKIM key record that omits the optional `v=` is recognised by its `p=`/`k=` tags.

Wrap-vs-native: native orchestration over the already-verified internal/spf, internal/dkim, and internal/dmarc decoders — no new go.mod dependency, no new parsing logic, no new external trust. Each underlying decoder is independently spec-/oracle-anchored and fuzzed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	// Kind is "spf", "dkim", or "dmarc".
	Kind string `json:"kind"`
	// SPF is populated when Kind == "spf".
	SPF *spf.Result `json:"spf,omitempty"`
	// DKIM is populated when Kind == "dkim".
	DKIM *dkim.Result `json:"dkim,omitempty"`
	// DMARC is populated when Kind == "dmarc".
	DMARC *dmarc.Result `json:"dmarc,omitempty"`
}

Result is the routed decode: Kind names the detected record type and exactly one of the typed sub-results is populated.

func Decode

func Decode(record string) (*Result, error)

Decode detects the email-auth record kind and dispatches to the matching decoder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL