Table of Contents

Class TrustedSenderEntry

Namespace
MailFathom.Domain.Emails.Authentication
Assembly
MailFathom.Domain.dll

One author an account's owner said this deployment recognizes.

public sealed record TrustedSenderEntry : IEquatable<TrustedSenderEntry>
Inheritance
TrustedSenderEntry
Implements
Inherited Members

Remarks

An entry names either a whole domain or a single address, and the two are different claims. A domain entry says that an author established as writing from that domain is recognized, which is the right shape for a counterparty whose mail all comes from one organization and the wrong one for a correspondent at a provider everybody else uses too. An address entry narrows that to one mailbox, at the cost described on Matches(SenderDomain, EmailAddress?).

Reaching under a domain is opt-in per entry rather than a mode the whole list runs in, because both answers are defensible and a deployment needs both: an organization signing everything as one name wants its subdomains, and a single host trusted inside a domain full of untrusted ones must not drag the rest in with it.

An entry is personal data — it names who somebody corresponds with — so nothing here may be logged.

Properties

Domain

Gets the domain this entry recognizes, which for an address entry is that address's domain.

IncludesSubdomains

Gets whether the entry reaches the names beneath Domain as well as the domain itself.

NormalizedLocalPart

Gets the comparison form of the address's local part, or null for a domain entry.

Methods

Matches(SenderDomain, EmailAddress?)

Answers whether this entry recognizes one message's authenticated author.

ToPolicyStatement()

Writes the entry as the one line the policy revision is derived from.

TryCreateForAddress(string?, out TrustedSenderEntry?)

Builds an entry that recognizes one mailbox.

TryCreateForDomain(string?, bool, out TrustedSenderEntry?)

Builds an entry that recognizes a whole domain.