Skip to main content

Module actions

Module actions 

Source
Expand description

Action definitions and execution helpers. Actions are value types that describe what to do; the host application translates them into its own mail operations. Evaluation and planning here are pure: no I/O.

Structs§

FilterMatch
The result of evaluating a rule: which message and what actions to apply.
VacationReply
An evaluated automated reply (RFC 5230 vacation), ready for the host’s SMTP layer. The engine computes routing and defaults; the host sends it and tracks the respond period (see VacationTracker).
VacationTracker
In-memory ledger for vacation respond-once-per-sender-per-period semantics (RFC 5230). Record a reply when one is sent; query with seen_before to decide whether another is due. Thread-safe; usable directly as an EvalContext::seen_before predicate.

Enums§

PlannedAction
A single planned action ready for execution by the host application.

Functions§

apply_flag_plan
Fold flag mutations (RFC 5232 addflag/removeflag/setflag) onto a current flag set, in plan order. AddFlags appends without duplicates, RemoveFlags drops every listed flag, SetFlags replaces the set. MarkRead is a host-level concern and is ignored here. Keywords compare exactly (hosts may normalize case).
build_action_plan
Translate a list of actions into a plan that the host can execute.
collect_matches
Collect the actions from the first rule matching a message (in the given rule order — use sort_rules_by_priority to order by priority first).