Class OutgoingMailCeilings
- Namespace
- MailFathom.Domain.Delivery.Governance
- Assembly
- MailFathom.Domain.dll
How much mail one period may be asked to send, for one account and for the whole deployment.
public sealed class OutgoingMailCeilings
- Inheritance
-
OutgoingMailCeilings
- Inherited Members
Remarks
This is the bound that turns a fault above it into a refusal rather than into a provider suspending the account. A rule matching more mail than its author expected and a caller looping on a send both produce the same thing — more outgoing records than anybody meant — and a count per period is what stops that at a number an operator agreed to instead of at whatever the submission server tolerates.
The period is a fixed window anchored at the Unix epoch rather than a rolling one, which is the shape the embedding spend ceiling already uses and for the same reasons: a fixed window has a start an operator can name, a roll-over instant a refused caller can be told to come back after, and one bounded count to answer it with, while a rolling window would have to retain every send for the length of the window and would never name a moment at which the refusal lifts.
A ceiling of zero is no ceiling at all, which is what an operator gets by writing nothing. It is a supported posture rather than an unbounded one by omission: sending is off until an account is turned on, so an instance nobody enabled is bounded by that, and the documentation states what a deployment with sending on and no ceiling is exposed to.
Properties
- IsUnbounded
Gets whether these ceilings refuse nothing, which is what makes reading a period's usage unnecessary.
- MaxMessagesPerAccount
Gets the messages one account may be asked for in a period, or zero where the operator declared no ceiling.
- MaxMessagesPerDeployment
Gets the messages this deployment may be asked for in a period, or zero where the operator declared no ceiling.
- MaxRecipientsPerAccount
Gets the recipients one account may be asked to write to in a period, or zero where the operator declared no ceiling.
- MaxRecipientsPerDeployment
Gets the recipients this deployment may be asked to write to in a period, or zero where the operator declared no ceiling.
- Period
Gets the length of the window every count is taken over.
- Unbounded
Gets the ceilings of a deployment that declared none, which refuse nothing.
Methods
- Create(TimeSpan, long, long, long, long)
Builds the ceilings from what a deployment declared.
- FindReachedCeiling(OutgoingMailUsage, int)
Finds the ceiling one further message would carry a period past.
- PeriodEndAt(DateTimeOffset)
Finds when the period an instant falls in rolls over, which is when a refused send may be asked for again.
- PeriodStartAt(DateTimeOffset)
Finds the start of the period an instant falls in, which is the moment every count is taken since.