-
-
Notifications
You must be signed in to change notification settings - Fork 0
Security Model
Ra's al Ghul edited this page Aug 9, 2026
·
1 revision
- The Worker encrypts mail with a random AES-256-GCM data key.
- The data key is wrapped with the Mailbridge RSA public key using RSA-OAEP SHA-256.
- Only ciphertext is stored in R2.
- Only object references are sent through Cloudflare Queues.
- The private key remains on the Mailbridge host.
- Inbound webhook calls require
WEBHOOK_SECRET. - Cloudflare Email Service outbound calls use
CLOUDFLARE_SEND_WEBHOOK_SECRETwhen configured. - Keep the inbound and outbound secrets distinct.
- Queued message files are encrypted with AES-256-GCM.
- Each message has independent secret material stored in
secrets/secrets.db. -
QUEUE_MASTER_KEYis required to derive message keys. - The audit database stores hashes and event metadata rather than raw mail bodies.
- Disabled by default.
- Restricted by
SMTP_RELAY_ALLOWED_CIDRS. - STARTTLS is required by default.
- Plaintext operation requires an explicit insecure override.
- SMTP DATA is capped by
SMTP_RELAY_MAX_MESSAGE_BYTES. - The relay has no username/password authentication; network allowlisting is therefore a critical boundary.
- Spam-filter failures are fail-closed unless
SPAMC_FAIL_OPEN=trueis explicitly selected. - Spamhaus and AI screening are disabled by default.
- AI input scope defaults to headers, minimizing mail content sent to an optional provider.
Never commit .env, wrangler.toml with live settings, data/, secrets/, private keys, tokens, or provider credentials.
For vulnerability reporting, see the repository Security Policy.
Copyright (c) 2026 Voxvey Research LLC, a Helio company.