← All documentation

ESP relay accounts (SES, SendGrid, Mailgun, Resend, Postmark, MailerSend)

ESP relay accounts (SES, SendGrid, Mailgun, Resend, Postmark, MailerSend)

Coldfeet workers deliver mail via direct MX by default (inbound gateway delivery and outbound without a verified ESP identity). For outbound mail whose header From domain is verified with an ESP, the platform opens an authenticated SMTP session to that ESP — workers are not involved. The same accounts can also terminate inbound MX — see INBOUND-PROVIDER-MX.md.

Inbound gateway delivery to the tenant’s mailbox host always uses the configured smart host (never ESP selection keyed on an external From).

Supported providers

ProviderOutboundInbound MXNotes
Amazon SESYesYesIAM for identity API + SMTP credentials. Region required. Receiving in 22 regions.
SendGridYesYesOne API key for SMTP (username=apikey) and identity API. Disable click/open tracking.
MailgunYesYesPer-domain SMTP credentials created via API and stored on DomainRelayIdentity. Tracking forced off.
ResendYesYesAPI key for SMTP (user=resend) and domain API. Svix-signed email.received webhook; raw MIME via Receiving API.
PostmarkYesYesAccount token + server token (JSON). SMTP uses server token for user+pass. Inbound: URL token + IP allowlist (no HMAC).
MailerSendYesYesPer-domain SMTP users. Inbound route HMAC secret. Domains via POST /v1/domains.
SparkPost / BirdNoNoMid-rebrand API, extra DNS gates.

Adding an account

Admin → Workers → Relay accounts → Add.

Optional: enable inbound MX so domains can point MX at this provider. How that webhook is authenticated differs per provider — only Mailgun needs a signing secret you paste; SES and SendGrid provision verification material automatically (see below).

SES

  1. Create an IAM user with SES identity + account read permissions
  2. Create SMTP credentials in the SES console
  3. Enter region, SMTP username/password, IAM access key id + secret
  4. Click Test connection — if sandbox is detected, request production access
  5. For inbound, run Provision inbound — there is no webhook signing secret to paste

SES has no inbound webhook signing secret. Each SNS message is signed with an Amazon X.509 certificate instead, which Coldfeet verifies. Because a valid signature only proves some AWS account's topic sent the message, ingest also pins the TopicArn, S3 bucket and object prefix to the values Provision inbound created for the account. Notifications from any other topic are rejected, and an account that has not been provisioned cannot receive at all.

SendGrid

  1. Create an API key with Domain Authentication + Mail Send + Inbound Parse
  2. Username is literally apikey; password is the API key
  3. Turn off click tracking and open tracking
  4. For inbound, enable inbound MX — there is no webhook signing secret to paste. Coldfeet auto-provisions a SendGrid security policy (Inbound Parse ECDSA) and enables the signed Event Webhook (bounce ECDSA). The two public keys are distinct and both live in inboundConfig; requests without a valid signature are rejected. Hourly reconcile self-heals missing keys.

Mailgun

  1. Create a private API key (US or EU)
  2. Region us or eu selects API/SMTP hosts
  3. Per-domain SMTP credentials and tracking-disable are handled automatically
  4. Paste the Webhook Signing Key if using inbound MX
  5. Test connection needs a domain with SMTP credentials already minted — pick the domain in the selector beside the button (account-level SMTP is not valid for Mailgun or MailerSend)

Resend

  1. Create an API key with domain + receiving permissions
  2. Username is resend; password is the API key (smtp.resend.com:587)
  3. Enable inbound MX — Coldfeet provisions an email.received webhook and stores the Svix signing secret automatically
  4. Receiving MX is inbound-smtp.<region>.amazonaws.com (see domain wizard)

Postmark

  1. Create an account token and a server token
  2. Paste both on the relay form (account token → apiKey, server token → apiSecret)
  3. SMTP username and password are both the server token
  4. Enable inbound MX — Coldfeet sets InboundHookUrl (with URL token) and InboundDomain on the server. Auth is URL token + Postmark IP allowlist only (weaker than HMAC — see INBOUND-PROVIDER-MX.md)
  5. One custom inbound domain per Postmark server — use separate relay accounts when many domains need provider MX

MailerSend

  1. Create an API token
  2. Per-domain SMTP credentials are created automatically on domain promote
  3. Enable inbound MX; route signing secret is stored when the inbound route is created
  4. Test connection needs a promoted domain (same as Mailgun)

Domain verification UX

When a tenant domain is added (or a relay account is enabled), Coldfeet calls the provider API to create an identity. Returned DKIM/CNAME records appear in the domain’s DNS wizard. Eligibility to send is gated on the provider’s verification status.

Selection

Asynchronous bounces

ESPs often rewrite the envelope return path. Coldfeet also ingests provider failure webhooks at POST /public/relay-events/:provider so ESP-relayed mail is not silently lost.

Cutover from Postfix

See WORKER-CUTOVER.md.