Constructor EmailAttachmentTextBounds
- Namespace
- MailFathom.Application.Emails.AttachmentText
- Assembly
- MailFathom.Application.dll
EmailAttachmentTextBounds(bool, int, long, long)
What reading a whole message's attachments, and a whole account run's, may consume.
public EmailAttachmentTextBounds(bool IsEnabled, int MaxAttachmentsPerEmail, long MaxInputOctetsPerEmail, long MaxInputOctetsPerAccountRun)
Parameters
IsEnabledboolWhether 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.
MaxAttachmentsPerEmailintHow many of one message's attachments are read at all, counted in walk order.
MaxInputOctetsPerEmaillongHow many octets one message's attachments may be read from together.
MaxInputOctetsPerAccountRunlongHow many octets one account run may read across every message it reaches.
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.