Class SenderTrustPolicy
- Namespace
- MailFathom.Domain.Emails.Authentication
- Assembly
- MailFathom.Domain.dll
Decides whether one account recognizes the author a message authenticated as.
public sealed class SenderTrustPolicy
- Inheritance
-
SenderTrustPolicy
- Inherited Members
Remarks
The rule is deliberately narrow. An author is recognized when their domain belongs to an account this deployment synchronizes, or when an entry on the receiving account's trusted-sender list names them. Everything else is unknown, including most legitimate mail, because the claim being published is this deployment does not know who wrote this rather than this is suspicious.
Every configured account's domain counts, not only the receiving one. An instance synchronizing a work mailbox and a personal one is synchronizing one person's correspondence, and mail sent from the first to the second is the least suspicious mail in the mailbox; recognizing it only against the receiving account's own domain would leave the owner's own mail unrecognized. Whether the set is consulted at all is the deployment's choice, and a policy built without it simply receives no domains.
The trusted-sender list has two halves and this is the one matcher over both. Configuration holds what an operator declared when they set the deployment up and a store holds what somebody added while it was running, an entry in either recognizes, and neither can undo the other — configuration is not editable at runtime and the store is not editable by a configuration reload. The configured half is consulted first, so where both name one sender the verdict reports the deployment's declared trust rather than something added later.
Properties
- RecognizingNobody
Gets the policy that recognizes nobody, which is what an account this deployment no longer serves has.
- Revision
Gets the revision that names this policy, which every verdict it reaches is stored with.
Methods
- Create(IEnumerable<SenderDomain>, IEnumerable<TrustedSenderEntry>, IEnumerable<TrustedSenderEntry>)
Builds the policy one account judges its mail by.
- Evaluate(SenderAuthentication, EmailAddress?)
Decides what this deployment makes of one message's author.