Skip to content

Team sending domains for SendGrid, Resend, Postmark and Mailgun shared mailboxes #227

Backlog

Description

@s3rot0n1n

Follow-up to #220 and PR #226. Teams can already send from their own domain on a shared Amazon SES mailbox. This adds the same for the other providers SendLit supports.

What's there

  • apps/api/src/delivery/domain-providers.ts: the DomainProviderAdapter interface (register / status / remove) and the SES adapter. domainProviderFor(esp) throws provider_domain_unsupported for other providers.
  • The organization stores an encrypted management API key on the shared mailbox, separate from the SMTP secret (PUT /organizations/:id/esps/:espId/management-credentials).
  • Everything above the adapter is provider-neutral:
    • the provisioning and dashboard routes, the records shown to the user, and the DKIM and DMARC lifecycle with its grace period;
    • the organization policy;
    • the rule never to adopt or delete a domain SendLit didn't create (domain_exists_at_provider).

To do, in this order (ADR 0013)

  • SendGrid: domain authentication API (/v3/whitelabel/domains, automatic security on, so CNAMEs only).
  • Resend: Domains API (POST /domains, verify, delete). Records are DKIM TXT plus the SPF/MX for the bounce subdomain.
  • Postmark: Domains API (DKIM TXT plus the Return-Path CNAME). It needs an account token, not a server token.
  • Mailgun: Domains API. Each domain needs its own SMTP login, so the grant must send through that domain's credentials, not the mailbox's.
  • Widen the DNS record types and purposes in the contract and dialog as each provider needs (currently CNAME/TXT and dkim/dmarc only).
  • Docs: extend frontlit/docs/self-hosting/team-sending-domains.md with each provider's key permissions.
  • Each provider smoke-tested on QA with a real account.

Out of scope: plain SMTP (no domain API; stays manual).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions