Class OutgoingRecipientRule
- Namespace
- MailFathom.Domain.Delivery.Governance
- Assembly
- MailFathom.Domain.dll
One mailbox or one organization an operator named on a recipient policy.
public sealed record OutgoingRecipientRule : IEquatable<OutgoingRecipientRule>
- Inheritance
-
OutgoingRecipientRule
- Implements
- Inherited Members
Remarks
An entry names either a whole domain or a single address, and the two are different claims. A domain entry describes a counterparty an instance corresponds with as an organization, which is the shape an operator restricting their instance to their own team writes; an address entry narrows that to one mailbox, which is what a single correspondent at a provider everybody else uses too needs.
A domain entry reaches the names beneath it as well as the domain itself, on both lists and without an opt-in. That is one rule rather than two because the two lists are read together and the reading has to stay legible: on the denied list it is the stricter answer outright, and on the allowed list it is what an operator writing their own organization down means, since a mailbox at a department's subdomain is that organization's mailbox.
A recipient is somebody who is not this mailbox's owner, so an entry is personal data of theirs and reaches no log line, metric dimension, span attribute, or exception message.
Properties
- Domain
Gets the domain this entry names, which for an address entry is that address's domain.
- NormalizedLocalPart
Gets the comparison form of the address's local part, or null for a domain entry.
Methods
- Matches(EmailAddress)
Answers whether this entry names one recipient of an outgoing message.
- TryCreateForAddress(string?, out OutgoingRecipientRule?)
Builds an entry naming one mailbox.
- TryCreateForDomain(string?, out OutgoingRecipientRule?)
Builds an entry naming a whole organization.