diff --git a/apps/mail/crates/mail-submit/README.md b/apps/mail/crates/mail-submit/README.md index 9427d45b..b81518b1 100644 --- a/apps/mail/crates/mail-submit/README.md +++ b/apps/mail/crates/mail-submit/README.md @@ -12,7 +12,7 @@ server source. Licence: MIT. | Field | Value | |---|---| -| Host | `mail.scribase.com` | +| Host | `smtp.scribase.com` | | Port | `587` (STARTTLS) or `465` (TLS) | | Username | `scribase` (`resend` also works, for migrations) | | Password | an `sk_` API key | diff --git a/apps/mail/crates/mail-submit/src/config.rs b/apps/mail/crates/mail-submit/src/config.rs index 5ca119cb..4d418851 100644 --- a/apps/mail/crates/mail-submit/src/config.rs +++ b/apps/mail/crates/mail-submit/src/config.rs @@ -2,7 +2,7 @@ //! //! | Var | Meaning | Default | //! |-----|---------|---------| -//! | `SUBMIT_HOSTNAME` | name in the 220 banner / EHLO reply | `mail.scribase.com` | +//! | `SUBMIT_HOSTNAME` | name in the 220 banner / EHLO reply | `smtp.scribase.com` | //! | `SUBMIT_STARTTLS_ADDR` | port 587 listener (plain + STARTTLS); empty disables | `0.0.0.0:587` | //! | `SUBMIT_TLS_ADDR` | port 465 listener (implicit TLS); empty disables | `0.0.0.0:465` | //! | `SUBMIT_TLS_CERT` / `SUBMIT_TLS_KEY` | PEM certificate chain + private key | *required* | @@ -53,7 +53,7 @@ impl SubmitConfig { key_path: PathBuf::from(required("SUBMIT_TLS_KEY")?), }; let cfg = Self { - hostname: env_or("SUBMIT_HOSTNAME", "mail.scribase.com"), + hostname: env_or("SUBMIT_HOSTNAME", "smtp.scribase.com"), starttls_addr: optional_addr("SUBMIT_STARTTLS_ADDR", Some("0.0.0.0:587"))?, implicit_tls_addr: optional_addr("SUBMIT_TLS_ADDR", Some("0.0.0.0:465"))?, tls, diff --git a/apps/mail/docs/content/api-reference.md b/apps/mail/docs/content/api-reference.md index 93de5623..c929b187 100644 --- a/apps/mail/docs/content/api-reference.md +++ b/apps/mail/docs/content/api-reference.md @@ -419,6 +419,6 @@ No authentication; these are the URLs embedded in your emails. | GET | `/track/open/{id}/{sig}.gif` | open-tracking pixel | | GET | `/track/click/{id}?u=&s=` | click tracking, `307` to the original link | -## SMTP {soon} +## SMTP -`smtp.scribase.com`, ports `587` (STARTTLS) and `465` (TLS), `AUTH PLAIN`/`LOGIN` with username `scribase` and password = API key. Messages are DKIM-signed and queued like an API send and appear in `GET /emails`. Setup for Supabase Auth is on [Use as Supabase's mail server](../supabase/). +`smtp.scribase.com`, ports `587` (STARTTLS) and `465` (TLS), `AUTH PLAIN`/`LOGIN` with username `scribase` and password = API key. `AUTH` is only accepted after TLS. The `From` address must be on one of your verified domains (or the key's domain restriction). On success the server answers `250 2.0.0 Ok `; the same id works with `GET /emails/{id}`. Messages are DKIM-signed and queued like an API send and appear in `GET /emails` tagged `source=smtp`; the same plan limits, suppression list and content checks apply (a blocked message gets `550 5.7.1`). Setup for Supabase Auth is on [Use as Supabase's mail server](../supabase/). diff --git a/apps/mail/docs/content/supabase.md b/apps/mail/docs/content/supabase.md index 2e9e8dff..4e816d1e 100644 --- a/apps/mail/docs/content/supabase.md +++ b/apps/mail/docs/content/supabase.md @@ -10,10 +10,10 @@ There are two ways to connect. Both settings live in the Supabase dashboard unde | Method | Supabase setting | Status | Best for | |---|---|---|---| -| Custom SMTP | Project Settings → Authentication → SMTP Settings (`/auth/smtp`) | {soon} | Zero code. Supabase keeps rendering its own templates; we deliver them. | +| Custom SMTP | Project Settings → Authentication → SMTP Settings (`/auth/smtp`) | Live | Zero code. Supabase keeps rendering its own templates; we deliver them. | | Send Email Hook | Authentication → Hooks → Send Email (`/auth/hooks`) | {soon} | You want our templates, our logs per `email_action_type`, or no SMTP at all. | -> Both paths are being finished right now. The HTTP API, webhooks and domains below are live; the SMTP listener (`mail-smtpd`) and the public hook receiver are the last two pieces. The settings documented here are final, so you can prepare them today. +> Custom SMTP is live: `smtp.scribase.com`, port `465` (TLS) or `587` (STARTTLS), username `scribase`, password = your API key. The hook receiver is the last piece being finished; its settings below are final, so you can prepare them today. ## Before either method: verify your domain @@ -22,7 +22,7 @@ There are two ways to connect. Both settings live in the Supabase dashboard unde 3. Run `POST /domains/{id}/verify` until `status` is `verified`. 4. Create an API key: `POST /api-keys` with `{ "name": "supabase", "permission": "sending_access", "domain_id": "..." }`. A sending-only key restricted to the domain is the right shape for a setting that lives in another vendor's dashboard. -## Method A: custom SMTP {soon} +## Method A: custom SMTP In the Supabase dashboard open **Project Settings → Authentication**, scroll to **SMTP Settings** and turn on **Enable Custom SMTP**. Fill the fields exactly like this: