mail-server serves apps/mail/dashboard at /dashboard/ (tower-http fs,
DASHBOARD_DIR, mock/ and MOUNT.md never served). New account-scoped,
Resend-shaped endpoints the dashboard reads: GET /emails/{id}/events
(status history with timestamps and a one-line detail from the stored
payload), GET /emails/{id}/webhook-deliveries and
GET /webhooks/{id}/deliveries (delivery log joined with event + endpoint),
GET /emails?test=true|false and GET /suppressions?q= server filters.
GET /billing now carries description, next_plan, upgrade_label,
current_period_end/renews_at; POST /billing/checkout accepts success_url
(own origin only) and returns url. mail-auth: a bad, used or expired link
opened in a browser redirects to <redirect_to>#error=invalid_token (or a
plain HTML page when the token was never ours); the dashboard shows the
message on the login form. Dashboard uses the server-side test filter,
portal via POST /billing/portal, docs updated.
Verified live against local Postgres mail_e2e + fake relay + webhook
listener: curl of every endpoint (404 for another account's ids, 401
without auth, 422 on test=maybe), and a headless-browser pass through the
real magic-link login, email timeline, webhook delivery log, usage card
and the expired-link redirect.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
51 lines
2.0 KiB
TOML
51 lines
2.0 KiB
TOML
[package]
|
|
name = "mail-server"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "axum HTTP service exposing the Resend-compatible Scribase Mail API (multi-tenant accounts, API keys or mail-auth session JWTs), the mounted mail-auth login router, and the send + webhook workers. Independent implementation, written without reference to useSend source."
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "mail-server"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
mail-core = { path = "../mail-core" }
|
|
mail-auth = { path = "../mail-auth" }
|
|
# Mounted routers and embedded services (one binary, one Postgres).
|
|
mail-hooks = { path = "../mail-hooks" }
|
|
mail-submit = { path = "../mail-submit" }
|
|
mail-inbound = { path = "../mail-inbound" }
|
|
mail-mta = { path = "../mail-mta" }
|
|
mail-oci = { path = "../mail-oci" }
|
|
mail-types.workspace = true
|
|
async-trait.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
thiserror.workspace = true
|
|
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "signal", "time"] }
|
|
axum = { version = "0.8", features = ["json", "query", "form"] }
|
|
# `fs` serves the static customer dashboard (`apps/mail/dashboard`).
|
|
tower-http = { version = "0.6", features = ["trace", "fs"] }
|
|
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio-rustls", "postgres"] }
|
|
anyhow = "1"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
time = { version = "0.3", features = ["serde", "formatting", "parsing", "macros"] }
|
|
# `since` timestamps for the OCI suppression mirror (mail-oci speaks chrono).
|
|
chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
|
|
sha2 = "0.10"
|
|
# Standard Webhooks verification of Dodo Payments billing webhooks.
|
|
hmac = "0.12"
|
|
|
|
# Dashboard session JWTs (EdDSA / Ed25519, RFC 8037) verified against mail-auth's JWKS.
|
|
ed25519-dalek = "2"
|
|
base64 = "0.22"
|
|
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json"] }
|