API Reference MailglassInbound v#0.2.0

Copy Markdown View Source

Modules

Public contract root for the mailglass_inbound sibling package.

Validated configuration accessor for the :mailglass_inbound app env (D-49-02).

Code-built inbound payload fixtures for adopter tests (ITEST-07).

Canonical normalized inbound message passed to routing and mailbox code.

Framework-derived, read-only signals about an inbound message.

Package-local persistence boundary for canonical inbound rows, raw evidence, and execution lineage.

Append-only execution lineage row shared by fresh ingress and replay.

Raw evidence row linked to one canonical inbound record.

Canonical normalized inbound row.

Append-only replay execution history row.

Package-local Plug.Parsers body reader for inbound provider verification.

Public inbound ingress plug for mailglass_inbound.

DNS-free pre-deploy config check runner for mix mailglass.inbound.doctor (IOPS-01, MIME-03). All checks are pure reflection — no DB, no DNS, no network — so the doctor is fast, offline, and CI-friendly (D-49-06).

Oban-independent batched retention sweep for inbound tables (IOPS-03, D-49-25..30). This is the workhorse: mix mailglass.inbound.prune and the optional MailglassInbound.Prune.Worker cron both call prune/0.

Standalone, never-raising RFC 5322 MIME parser.

Structured error for raw RFC 5322 MIME parse failures (MailglassInbound.MIME).

Behaviour for adopter-defined inbound mailboxes.

The shipped ExUnit.CaseTemplate adopters use to test inbound mailboxes (ITEST-05) — the inbound analog of outbound's Mailglass.MailerCase, and the keystone that ties the inbound Testing helpers together.

Shared human and JSON renderers for inbound operator results (D-49-04).

Namespace for package-local optional dependency gateway modules.

Gateway for the optional ex_aws / ex_aws_s3 dependencies ({:ex_aws, "~> 2.7"} + {:ex_aws_s3, "~> 2.5"}).

Gateway for the optional Oban dependency ({:oban, "~> 2.21"}).

Optional Oban cron worker that runs the inbound retention sweep (IOPS-03, D-49-28). The batched workhorse lives in MailglassInbound.Internal.Prune; this worker's perform/1 just delegates to prune/0.

Typed topic builder for mailglass_inbound PubSub broadcasts (TELE-07, D-45-07).

Inbound-local multi-bucket ETS token-bucket rate limiter (IOPS-04, D-49-11).

Init-and-idle GenServer owning the :mailglass_inbound_rate_limit ETS table (cloned from Mailglass.RateLimiter.TableOwner, D-22 crash semantics). Owns nothing beyond ETS table creation — no handle_call/3, handle_cast/2, or handle_info/2. Hot-path reads/writes happen directly from caller processes via :ets.update_counter/4 — NO GenServer mailbox serialization.

Thin facade over the host-configured repo for mailglass_inbound.

Thin router DSL for compiling inbound mailbox routes into pure route data.

Structured error for AWS SES inbound S3-object fetch failures.

Stamps mailglass_inbound schema conventions onto internal persistence modules.

Structured, no-recovery error for inbound provider signature failures (Mailgun HMAC, AWS SES SNS X.509, and SNS SubscribeURL trust-policy checks).

The single span surface for mailglass_inbound (D-45-01).

The inbound test driver (ITEST-06): drives the real synchronous persist + route + execute write path and captures the outcome in the current test process's mailbox.

Inbound test assertions (ITEST-01..04) — the inbound mirror of Mailglass.TestAssertions.

Mix Tasks

Run DNS-free pre-deploy configuration checks for inbound mail (IOPS-01).

Manually run the inbound retention sweep (IOPS-03).

Replay previously-received inbound records through their mailboxes (IOPS-02).