Skip to main content

Module email_policy

Module email_policy 

Source
Expand description

Email allow/block list normalization and matching helpers. Email allow/block list normalization and matching helpers.

Product crates still decide which configuration keys contain allowlists or blocklists, which API error codes to return, and whether an empty allowlist means “allow everyone” or “deny everyone”. This module only owns the shared mechanics for parsing policy entries, normalizing them, deduplicating them in a stable order, and testing exact email/domain matches.

Structs§

EmailPolicyList
Normalized email policy list split into exact email and exact domain sets.

Enums§

EmailPolicyEntry
Normalized policy entry classified as either an exact email or an exact domain.

Functions§

normalize_email_policy_domain
Normalizes an exact email domain policy entry.
normalize_email_policy_email
Normalizes an exact email policy entry.
normalize_email_policy_items
Normalizes and deduplicates raw email policy entries into a stable vector.
normalized_email_and_domain
Normalizes an email and returns its exact-match domain.
parse_email_policy_item
Parses one raw policy entry.