Skip to content
OpenPostDocs
OpenPostDocs

Email delivery

Configure authentication and notification email for self-hosted instances.

Self-hosted OpenPost can start without an email service. Add one before you depend on password resets, workspace invitations, email notifications, or required signup verification. Pick one of the transports below and use a sender address on a domain you control.

SMTP

Get the host, port, login, and TLS mode from your mail provider. Add them to the server .env file:

OPENPOST_EMAIL_PROVIDER=smtp
OPENPOST_SMTP_HOST=smtp.example.com
OPENPOST_SMTP_PORT=587
OPENPOST_SMTP_USERNAME=mailer
OPENPOST_SMTP_PASSWORD=replace-me
OPENPOST_EMAIL_FROM="OpenPost <no-reply@example.com>"
OPENPOST_SMTP_TLS_MODE=starttls

Use port 465 with OPENPOST_SMTP_TLS_MODE=tls when your provider uses implicit TLS. OpenPost rejects unencrypted SMTP to non-loopback hosts. If the provider requires a different certificate hostname, set OPENPOST_SMTP_SERVER_NAME to the name on the certificate.

Resend

Verify a sending domain in Resend, then create a key with Sending access. Set a sender on the verified domain:

OPENPOST_EMAIL_PROVIDER=resend
OPENPOST_EMAIL_FROM="OpenPost <no-reply@example.com>"
OPENPOST_RESEND_API_KEY=your-resend-key

Cloudflare Email Service

Onboard your domain in Cloudflare Email Sending and create an API token with Email Sending permission. OpenPost uses the Cloudflare REST API, so it needs the account ID and token:

OPENPOST_EMAIL_PROVIDER=cloudflare
OPENPOST_EMAIL_FROM="OpenPost <no-reply@example.com>"
OPENPOST_CLOUDFLARE_EMAIL_ACCOUNT_ID=your-account-id
OPENPOST_CLOUDFLARE_EMAIL_API_TOKEN=your-api-token

Verify delivery

  1. Run docker compose up -d after editing .env.
  2. Invite a test address to a workspace or request a password reset for an account you control. Check both the inbox and your mail provider's delivery log.
  3. Only after delivery works, set OPENPOST_EMAIL_VERIFICATION_REQUIRED=true if new password accounts must verify their address, then recreate the container again.

If mail does not arrive, check docker compose logs --tail=100 openpost, the provider's sender verification, credentials, SMTP TLS mode, and the recipient's spam folder. An accepted send is not proof the message reached the inbox. Delivery callbacks, when configured for a supported provider, use POST /api/v1/email/delivery/webhook and OPENPOST_EMAIL_DELIVERY_WEBHOOK_SECRET.

On this page