Bouncewise

Bouncewise › Guides › Postmark DKIM and Return-Path not verified: how to fix

Postmark guide

Postmark DKIM and Return-Path not verified: how to fix

Updated · 3 min read

Short answer

Postmark marks DKIM verified once it finds a TXT record with its public key at the exact host it shows you (a selector under _domainkey, such as 20131031155228pm._domainkey.example.com), and the Return-Path verified once pm-bounces.example.com is a CNAME to pm.mtasv.net. When either stays pending, the usual causes are a DNS host that appends your domain to the name or value, a Cloudflare-proxied CNAME, or a mistyped key. DNS can take up to 48 hours; after fixing, click Verify or call PUT /domains/{domainid}/verifyDkim and /verifyReturnPath.

  1. Copy the records from Postmark Open Sender Signatures, choose DNS Settings for the domain, and copy the DKIM and Return-Path hostnames and values.
  2. Add them at your DNS host Add a TXT record for DKIM and a CNAME record pointing to pm.mtasv.net for the Return-Path, in the zone your nameservers actually serve.
  3. Check them from outside Run dig for both names and confirm the answers match Postmark exactly.
  4. Ask Postmark to verify Click Verify for each record, or call the verifyDkim and verifyReturnPath endpoints with an Account API token.

What Postmark is looking for

RecordTypeHostValue
DKIMTXTThe hostname on the domain's DNS Settings page, for example 20131031155228pm._domainkey.example.comThe public key Postmark shows, starting k=rsa; p=
Return-PathCNAMEpm-bounces.example.com (unless you chose another subdomain of your From domain)pm.mtasv.net

Adding these doesn't affect your other DNS records or mail you send from the domain through other services. Once DKIM is verified Postmark signs your messages with it; once the Return-Path is verified your messages pass SPF alignment.

Domain list with DKIM verified on one domain and pending on mail.example.com, with records to copy
Pending DKIM means Postmark hasn't found the TXT record yet.

Why verification stays pending, most common first

  1. Your DNS host appended the zone to the name. You entered the full pm-bounces.example.com and the panel stored pm-bounces.example.com.example.com. If the panel adds the domain itself, enter only pm-bounces, and for DKIM only the part before .example.com.
  2. Your DNS host appended the zone to the value. The CNAME ends up as pm.mtasv.net.example.com. Postmark's fix: enter the value with a trailing dot, pm.mtasv.net.
  3. Cloudflare is proxying the CNAME. Turn the orange cloud off (DNS only) for the Return-Path record.
  4. The DKIM key was pasted wrongly: a missing character, an added line break or space, or the wrong record type.
  5. The records are at the wrong provider. If your nameservers point elsewhere (a registrar's old zone, a CDN), records added in the other panel are never seen.
  6. Something else already lives at that name. A CNAME can't share its name with other records, so an existing TXT or A record at pm-bounces blocks it.
  7. It just hasn't propagated. Postmark says to allow up to 48 hours.

Check the records yourself

Query public DNS before you press Verify again. The answers must match what Postmark shows, character for character:

# DKIM: use the exact host Postmark shows for your domain
dig +short TXT 20131031155228pm._domainkey.example.com
"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFn..."

# Return-Path
dig +short pm-bounces.example.com CNAME
pm.mtasv.net.

An empty answer means the record isn't published at that name; look for the appended-zone mistake first. A value ending in your own domain is the appended-value mistake.

Re-run verification and read the result

In the web app, use the Verify button next to each record. Through the API, the Domains endpoints need an Account API token, not a server token:

curl "https://api.postmarkapp.com/domains/36735/verifyDkim" \
  -X PUT \
  -H "Accept: application/json" \
  -H "X-Postmark-Account-Token: $POSTMARK_ACCOUNT_TOKEN" \
  -d ""

curl "https://api.postmarkapp.com/domains/36735/verifyReturnPath" \
  -X PUT \
  -H "Accept: application/json" \
  -H "X-Postmark-Account-Token: $POSTMARK_ACCOUNT_TOKEN"

Both return the domain. The fields that matter:

"DKIMVerified": false,
"DKIMHost": "",
"DKIMPendingHost": "20131031155228pm._domainkey.example.com",
"DKIMPendingTextValue": "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFn...",
"DKIMUpdateStatus": "Pending",
"ReturnPathDomain": "pm-bounces.example.com",
"ReturnPathDomainVerified": false,
"ReturnPathDomainCNAMEValue": "pm.mtasv.net"

Two gotchas. DKIMVerified says whether DKIM has ever been verified and stays true even if you later delete the record. And after a DKIM rotation, DKIMUpdateStatus goes back to Pending with a new DKIMPendingHost: add that new TXT record and keep the old one until SafeToRemoveRevokedKeyFromDNS is true.

Do you still need an SPF record?

Postmark's Domains API marks its SPF fields as deprecated: with a verified custom Return-Path, the bounce address is on your own subdomain and SPF is checked against Postmark's record behind pm.mtasv.net. Add a DMARC record once DKIM and Return-Path are verified; Postmark suggests starting with p=none to monitor.

Questions

How long does Postmark DKIM verification take?

Postmark checks automatically and says to allow up to 48 hours for DNS. If dig already shows the right record, click Verify to check straight away.

Why does my DKIM show Pending when it was verified before?

A DKIM rotation or renewal is in progress. Add the TXT record from DKIMPendingHost and DKIMPendingTextValue; Postmark switches to the new key once it finds it.

Can I use a name other than pm-bounces for the Return-Path?

Yes. It must be a subdomain of your From domain with a CNAME pointing to pm.mtasv.net; set it in the domain's settings or with ReturnPathDomain in the Domains API.

Which token do the verify endpoints need?

The Account API token in the X-Postmark-Account-Token header. A server token gets a 401.

Sources