Table of Contents

Class ContactCollectionPolicy

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

Decides which of the addresses one account's mail carries collection may ever record.

public sealed class ContactCollectionPolicy
Inheritance
ContactCollectionPolicy
Inherited Members

Remarks

The policy is the whole of what an account is willing to have written into the collected origin, and it answers two questions rather than one. A message may say of itself that no person wrote it, in which case none of its addresses is considered at all; and an address may name something other than a person to correspond with, in which case it is not considered whatever message carried it. Both are refusals rather than scores, so an address the policy declines is never recorded by any later reading.

Three rules refuse an address, and they are deliberately of different kinds. AutomatedMailboxName is structural and every deployment gets it, because it names what nobody corresponds with. The Exclusions are the owner's, because only they know which of their real correspondents they would rather not have written down. And the deployment's own mailbox addresses are refused because a contact book holding its owner is a book that answers "who is this from" with the person asking.

Everything the policy holds is personal data: an exclusion names somebody, and an own address names the owner. Nothing here may be logged, and the policy carries no identity of its own for a log line to name instead.

Fields

NothingExcluded

A policy narrowing nothing, which is what an account that never reaches collection at all carries.

Properties

Exclusions

Gets what the owner excluded, in the order they wrote it.

Methods

Admits(EmailAddress)

Answers whether one address may be recorded as somebody the owner corresponds with.

Admits(EmailAutomation)

Answers whether a message carrying this claim about itself contributes any address at all.

Create(IReadOnlyList<ContactCollectionExclusion>, IReadOnlyCollection<EmailAddress>)

Builds the policy one account collects under.