[endpoints.transport.settings]
api_key = " ${env.POSTMARK_API_KEY} "
Setting Required Description api_keyyes Postmark server token (per-server, not per-account). Found in Postmark dashboard → Server → API Tokens. base_urlno Override the API endpoint. Test-only escape hatch; production never sets this.
Aspect Behavior API endpoint POST https://api.postmarkapp.com/emailAuthentication X-Postmark-Server-Token: <api_key> headerBody format JSON (structured fields: From, To, Subject, TextBody, ReplyTo) Per-request timeout 5s (transport-level) Connection reuse One *http.Client per process, HTTP/2 with connection pool transport_message_idParsed from response MessageID field
Postmark response Error class Retry? 200 OK or 202 Accepted(success) no 429 Too Many RequestsErrRateLimitedyes, after 5s 5xx server errorErrTransientyes, after 1s Network timeout / connection refused ErrTransientyes, after 1s 4xx other than 429 (401, 422, etc.)ErrTerminalno
Sender-not-verified errors (typical 422) are common during operator onboarding — verify the sender signature in Postmark before sending, or expect terminal failures with the upstream Message field surfaced in the submission_failed log line.
For mail to actually deliver:
Sender Policy Framework (SPF) record on your sending domain authorizing Postmark
DomainKeys Identified Mail (DKIM) record published from Postmark’s dashboard
Return-Path custom domain (recommended)
Posthorn doesn’t manage any of this — Postmark’s setup wizard walks through it. See DNS for the cross-provider details.
Symptom Likely cause Fix HTTP 401 every sendUsing account-level token instead of server token Postmark dashboard → server → API Tokens HTTP 422 Sender signature not confirmedSender domain DKIM/SPF not set up Complete Postmark’s DNS wizard before going live HTTP 422 Email address not allowedSandbox mode (Postmark gates outbound until you verify) Request production access in dashboard Mail goes to recipient spam Authentication-Results headers show DKIM/SPF fail Check DNS records; Postmark’s dashboard has a verifier