How to set up SPF, DKIM and DMARC for Postmark

The two DNS records Postmark needs, why SPF needs no changes, and how to confirm your app email passes DMARC.

Postmark sends your app's email: password resets, receipts, sign-up confirmations. Out of the box, that mail already passes SPF, because Postmark uses its own bounce domain and handles SPF there. But "passes SPF" isn't the same as "passes DMARC for your domain," and that difference is what decides whether your mail lands in the inbox once you enforce DMARC.

Getting it right takes two DNS records from Postmark, a DMARC record if you don't already have one, and no changes to SPF at all. Setup takes about 10 minutes of work, plus some waiting for DNS.

See what's already in place. Rigcheck shows your SPF, DKIM and DMARC records and whether a Postmark Return-Path is set up.

Before you start

  • A Postmark account with your domain added. In Postmark, open Sender Signatures and add your domain if it isn't listed yet. Adding the whole domain, rather than a single sender address, lets you send from any address on it.
  • Access to your DNS host, wherever your domain's DNS records are managed (Cloudflare, GoDaddy, Namecheap, Route 53 and so on). This isn't always where you bought the domain. Rigcheck shows your DNS host at the top of your results.

How Postmark authenticates your mail

Every message has two sender addresses. The From address is the one your users see. The hidden Return-Path is where bounces go, and it's the address SPF is checked against.

By default, Postmark sets the Return-Path to an address at pm.mtasv.net, its own domain. SPF passes there, but it passes for Postmark's domain, not yours. DMARC only counts an SPF pass when the Return-Path domain matches your From domain, so by default that pass does nothing for you.

That leaves two ways to pass DMARC, and you want both:

  • DKIM, signed with your domain. This is the one that matters most, and it's the first step below.
  • A custom Return-Path on a subdomain of yours, so SPF passes and lines up with your domain. This is the second step.

Step 1: DKIM

DKIM adds a digital signature to every message, which receivers check against a public key in your DNS. Postmark generates the key for you, but it won't sign with your domain until the record is published.

Get the record from Postmark

  1. In Postmark, open Sender Signatures and click your domain.
  2. Open the domain's DNS Settings.
  3. Find the DKIM record. Postmark shows a hostname and a long value starting with k=rsa; p=.

Add it to your DNS

At your DNS host, create a TXT record. The hostname is unique to your account: a long number, usually based on the date the key was created, followed by pm._domainkey. It looks something like this:

Host20261025123456pm._domainkey (yours will differ)
TypeTXT
ValueThe full k=rsa; p=... value from Postmark

Copy both the name and the value from Postmark rather than typing them. The number in the name is specific to your account, and missing even one character in the value breaks the key.

Enter only the part before your domain in the name field. Most DNS hosts add your domain automatically, and typing the full name can produce ...pm._domainkey.yourdomain.com.yourdomain.com, which silently fails.

Back in Postmark's DNS Settings, click Verify next to the DKIM record. If Postmark can't find it yet, wait a few minutes and try again.

Step 2: Custom Return-Path

The custom Return-Path moves bounces from Postmark's domain to a subdomain of yours. It's a single CNAME record pointing at Postmark, and because that Postmark host already publishes the right SPF record, SPF passes and lines up with your domain without you writing any SPF yourself.

At your DNS host, create a CNAME record:

Hostpm-bounces
TypeCNAME
Valuepm.mtasv.net

pm-bounces is Postmark's suggested name, and you can use another subdomain if it's already taken. Whatever you pick, nothing else can live at that name, since a CNAME can't share its name with other records.

If your DNS is on Cloudflare, set the record to DNS only (grey cloud), not proxied. A proxied record hides the CNAME, and Postmark can't verify it.

Back in Postmark's DNS Settings, confirm the Return-Path subdomain matches the name you created, then click Verify.

Step 3: SPF (no changes needed)

This is where Postmark differs from most guides you'll find. You don't need to add Postmark to your SPF record. Postmark says so itself.

SPF is checked against the Return-Path domain. With the custom Return-Path from Step 2, that's pm-bounces.yourdomain.com, which inherits Postmark's SPF record through the CNAME. Your main domain's SPF record is never consulted for Postmark mail.

Adding include:spf.mtasv.net to your main record doesn't help, and it uses one of the 10 DNS lookups your SPF record is allowed. If it's already there and your custom Return-Path is verified, you can safely remove it. Keep the includes for your mailbox provider, like Google Workspace or Microsoft 365, where they are. See SPF too many DNS lookups if your record is getting crowded.

Step 4: DMARC

DMARC tells receivers what to do with mail that fails SPF and DKIM, and sends you reports about who's sending as your domain. If you don't have a DMARC record yet, add a TXT record named _dmarc:

Host_dmarc
TypeTXT
Valuev=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

Replace the address with an inbox you'll check. If you already have a DMARC record, leave it as is. A domain can only have one, and it covers all mail sent as your domain, including mail from Postmark.

Start with p=none so nothing gets blocked while you confirm everything passes, then tighten it over the following weeks. DMARC p=none vs quarantine vs reject walks through that rollout.

One limit to know: because Postmark's Return-Path is always a subdomain, it can't meet strict SPF alignment (aspf=s). Leave alignment at the default relaxed setting, which nearly every domain should do anyway.

Step 5: Confirm it works

  1. Check that both records show as verified on your domain's DNS Settings page in Postmark.
  2. Run your domain through Rigcheck to confirm SPF and DMARC are in place. Rigcheck can't see Postmark's DKIM key, because its name is unique to your account, so DKIM may show Review even when it's working. Postmark's verified status is the one to trust.
  3. Send a test message through Postmark to a personal Gmail address. Open it, tap the three-dot menu and choose Show original. You should see PASS next to SPF, DKIM and DMARC, with your own domain listed for each.

Transactional and broadcast email

Postmark keeps transactional email (password resets, receipts) and broadcast email (newsletters, announcements) on separate message streams so a campaign can't hurt your password resets. The DNS records above cover both streams, so you don't need to repeat this setup for broadcasts.

Check your setup. Confirm your SPF and DMARC records are in place and get the exact fix for anything missing.

Check my setup

Browse all guides