Table of Contents

Class StoredMailRederivation

Namespace
MailFathom.Application.Mail.Maintenance
Assembly
MailFathom.Application.dll

Re-reads the raw MIME a deployment already stores into the properties a newer release records from it.

public sealed class StoredMailRederivation
Inheritance
StoredMailRederivation
Inherited Members

Remarks

The cheap half of filling in properties a newer release added, and the one that answers wherever the property is already in the payload this deployment stored — the sender identity a receiving server authenticated is today's example. No mailbox session is opened, nothing is fetched, and no stored content is rewritten: what the pass costs is a read of local bytes, a parse, and an update of the row's own columns.

It says nothing about state that lives only on a server. Flags, keywords, and the internal date are the mailbox's answers rather than the message's, so a property drawn from one of those needs MailSynchronizationRewind and the fetch that comes with it.

One invocation is one bounded pass, and it reports whether the scope still holds mail it has not reached. A batch commits its re-readings together with the position they reached, so an interrupted pass resumes at the next email rather than repeating or stepping over one, and re-running over an email this pass already reached simply writes the same reading of the same immutable bytes. Repeating the pass until the scope is exhausted belongs to StoredMailRederivationHandler, which is the durable work an operator's request enqueues.

Constructors

StoredMailRederivation(IStoredMailRederivationStore, IStoredMailRederivationRunStore, IEmailContentStore, IEmailMimeReader, OptimisticConcurrencyRetryPolicy, TimeProvider, AccessAuthorization)

Initializes the re-derivation.

Methods

RunAsync(StoredMailRederivationRunId, StoredMailScope, CancellationToken)

Runs one bounded pass over the scope's stored mail, for the run that asked for it.