/DOCS · INTEGRATIONS · POSTMARK

Set up CipherRun email with Postmark.

Connect the sender identity, server token, and webhook that CipherRun uses for transactional email. This walkthrough ends with a real delivery check from /contact and the Postmark Activity confirmation.

→ Send a test email
STEP 1

Create the server and verify the sender

In Postmark, create a Server dedicated to CipherRun. Then verify the Sender Signature or sending domain for the exact address configured by the app, including hello@polsia.app and any deployment-specific CipherRun sender. The sender identity must be verified before Postmark will accept messages from it.

Complete Postmark's verification and DNS checks for the domain you use. Confirm the sender signature is approved in Postmark before moving on; a sender-signature failure is separate from an API-key failure and must be fixed in Postmark.

STEP 2

Copy the server token into CipherRun

Copy the server token from Postmark's Servers → API Tokens screen into CipherRun as POSTMARK_API_KEY. Keep the value masked in deployment settings and redeploy or restart the app after saving it.

CipherRun's email services send through Postmark's POST /email API using the server token in the X-Postmark-Server-Token header. This covers contact confirmations and notifications, waitlist and nurture messages, magic links, workspace email, and other app email services.

POSTMARK_API_KEY=••••••••

Never paste a real token into documentation, tickets, or client-side code. If the token is rotated in Postmark, update the CipherRun environment variable and restart the app.

STEP 3

Configure the Postmark webhook

In the CipherRun Postmark server, add a webhook for POST /api/postmark/webhook. Configure the webhook secret as POSTMARK_WEBHOOK_SECRET in CipherRun, and send it in the X-Postmark-Webhook-Secret header. The endpoint expects a JSON payload.

Postmark can send Open, Click, Delivery, Bounce, SpamComplaint, Unsubscribe, and Inbound events to this endpoint. CipherRun tracks nurture opens, logs deliveries and bounces, and records inbound replies; the endpoint acknowledges the other supported event types as well.

POST /api/postmark/webhook Content-Type: application/json X-Postmark-Webhook-Secret: •••••••• POSTMARK_WEBHOOK_SECRET=••••••••
STEP 4

Run a CipherRun delivery check

Open /contact and submit a test inquiry using a recipient inbox you can inspect. The request should return successfully, then the configured Postmark sender should deliver the recipient confirmation and the operator notification through the same email path used by CipherRun.

Confirm the recipient message arrived and locate the corresponding message in Postmark's Activity stream. Check the delivery status, sender, recipient, and event details there; this verifies sender approval, POSTMARK_API_KEY, the /email request, and mailbox delivery together.

→ Send a test
TROUBLESHOOTING

Trace the failing boundary

Sender signature failure: confirm the From address matches the verified Postmark sender signature or domain, then finish any pending DNS verification. A valid server token cannot authorize an unverified sender.

Missing or invalid POSTMARK_API_KEY: make sure the value is the token for the CipherRun Postmark server, not an account or webhook value, and restart after changing it. A missing key is reported as [email-contact-inquiry] POSTMARK_API_KEY not set; an invalid token must be replaced with the current server token.

Webhook 403 or 400: a 403 means the X-Postmark-Webhook-Secret header does not match POSTMARK_WEBHOOK_SECRET. A 400 means the payload is not valid JSON or is missing the required MessageID or recipient email fields.

No Postmark Activity event: confirm the delivery check used the expected sender and that the server token belongs to the Postmark server whose Activity stream you are viewing. Remember that the contact form persists the inquiry and sends email asynchronously, so a successful form response alone does not prove delivery.

Application logs: inspect [email-contact-inquiry] for Postmark send errors and [contact] email error for the contact route's asynchronous email failure. These distinguish an application send problem from a Postmark Activity or mailbox-delivery problem.

Email connected. Keep shipping.

With sender verification, token access, webhook events, and a confirmed delivery in place, CipherRun's email services are ready for the rest of your security workflows.