Class EmailAttachmentTextBounds
- Namespace
- MailFathom.Application.Emails.AttachmentText
- Assembly
- MailFathom.Application.dll
What reading a whole message's attachments, and a whole account run's, may consume.
public sealed record EmailAttachmentTextBounds : IEquatable<EmailAttachmentTextBounds>
- Inheritance
-
EmailAttachmentTextBounds
- Implements
- Inherited Members
Remarks
The third and fourth of the four ceilings ADR 0029 names. AttachmentTextExtractionOptions bounds one attachment; these bound the message it arrived on and the run that met it, because the cost of a message stopped being predictable from its text length the moment attachments were parsed at all — a ten-line covering note with a two-hundred-page report attached is an expensive message, and a mailbox full of them is an expensive run.
Both are counted in octets read rather than in characters sent, which is the distinction the record draws between this budget and the embedding one: what a provider is paid for is characters, and what a parser costs is the bytes it was handed. A message that runs out records the reason against the attachments it never opened, so the ceiling is answerable to a user rather than silent; a run that runs out leaves the message it was on untouched, because nothing about that message has been decided and the next run should reach it.
The three ceilings are ordered, and configuration refuses a deployment that writes them otherwise: what one attachment may cost is at most what its message may, and what a message may is at most what its run may. The ordering is what stops a run from meeting an attachment it could never afford — such a message would be passed over by every run for ever, having been refused by a budget that starts full each time. With the ordering held, a refusal only ever happens to a run that has already spent, and the next run reaches that message first.
Constructors
- EmailAttachmentTextBounds(bool, int, long, long)
What reading a whole message's attachments, and a whole account run's, may consume.
Fields
- DefaultMaxAttachmentsPerEmail
How many of one message's attachments are read where a deployment declares no ceiling of its own.
- DefaultMaxInputOctetsPerAccountRun
The octets one account run may read where a deployment declares no ceiling of its own.
- DefaultMaxInputOctetsPerEmail
The octets one message's attachments may be read from where a deployment declares no ceiling of its own.
Properties
- Disabled
Gets what a deployment that declared nothing is bounded by, which reads no attachment at all.
- IsEnabled
Whether this deployment reads its mail's attachments at all, which is off unless an operator turned it on. It rides with the ceilings rather than arriving as a switch of its own because it is the same answer at zero: what a deployment may read out of an attachment, before any of the numbers below are reached.
- MaxAttachmentsPerEmail
How many of one message's attachments are read at all, counted in walk order.
- MaxInputOctetsPerAccountRun
How many octets one account run may read across every message it reaches.
- MaxInputOctetsPerEmail
How many octets one message's attachments may be read from together.