Table of Contents

Class ContactCollectionExclusion

Namespace
MailFathom.Domain.Contacts.Collection
Assembly
MailFathom.Domain.dll

One address, or one whole domain, an account's owner said collection never records.

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

Remarks

An entry names a domain or writes a pattern over the address, and the two answer different questions. A domain entry is the shape for correspondence that all arrives from one place an owner wants nothing kept from — a ticketing system, a newsletter provider, an employer's automation. A pattern is the shape for a name rather than a place: *+noreply@* and bot-*@example.test select on how an address is spelled, wherever it is hosted.

Reaching under a domain is opt-in per entry rather than a mode the list runs in, for the reason TrustedSenderEntry gives: one host excluded inside a domain full of correspondents must not take the rest of the domain with it, and an organization whose automation lives on names beneath its own domain must be excludable in one entry.

A pattern is held against the address's own comparison form, so it is the same matching rule the book stores and looks addresses up under and a sender's casing decides nothing. Two wildcards are read: * stands for any run of characters including none, and ? for exactly one. Everything else in the pattern is the literal text of an address, so an entry that writes no wildcard at all excludes exactly one mailbox.

An entry is personal data — it names who an owner does not want recorded — so nothing here may be logged.

Fields

MaximumPatternLength

The greatest length a pattern may carry.

Properties

AddressPattern

Gets the comparison form of the pattern, or null when the entry names a domain.

Domain

Gets the domain this entry excludes, or the default value when the entry writes a pattern instead.

IncludesSubdomains

Gets whether a domain entry also reaches the names beneath Domain.

Methods

Excludes(EmailAddress)

Answers whether this entry excludes one address from ever being collected.

TryCreateForAddressPattern(string?, out ContactCollectionExclusion?)

Builds an entry that excludes every address one pattern selects.

TryCreateForDomain(string?, bool, out ContactCollectionExclusion?)

Builds an entry that excludes every address at one domain.