Expand description
http-smtp-rele: minimal, secure HTTP-to-SMTP submission relay.
§Architecture
External Client
| HTTPS POST /v1/send
Reverse Proxy / TLS Endpoint
| HTTP localhost
http-smtp-rele
| SMTP localhost:25
OpenSMTPD / SMTP ServerResponsibility: auth, validation, sanitization, rate limit, SMTP submission.
Re-exports§
pub use request_id::RequestId;
Modules§
- api
- HTTP API router and middleware wiring.
- auth
- Authentication and access control.
- config
- Configuration loading and validation.
- error
- Application error types, ErrorCode enum, and HTTP response mapping.
- logging
- Logging initialization using
tracingandtracing-subscriber. - Safe plain text mail construction.
- metrics
- Prometheus metrics instrumentation.
- policy
- Recipient domain and API key permission policy.
- rate_
limit - Three-tier token bucket rate limiting: global, per-IP, per-key.
- request_
id - Application-owned request identifier.
- sanitize
- Header injection detection and sanitization.
- security
- Platform security hardening.
- smtp
- SMTP relay transport.
- status
- Submission status tracking — types, errors, and store abstraction.
- status_
memory - In-memory submission status store (RFC 087).
- validation
- Request validation pipeline.
Structs§
- AppState
- Shared application state, cloned into every Axum request via
Arc.