Postilio docs

Sending domains

You send from addresses on your own domains. Before Postilio sends from a domain, three DNS records prove it is yours and let Postilio sign the mail (DKIM) and receive its bounces (the return path). A domain belongs to one project.

Add a domain

In the portal under Domains, or with a key that has the domains:manage scope:

curl https://api.postilio.eu/v1/domains \
  -H "Authorization: Bearer $POSTILIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "mail.example.com" }'

The name needs at least two labels and may not be an IP address. Postilio stores it in lowercase, without a trailing dot. A subdomain such as mail.example.com keeps your transactional mail apart from the rest of your domain's mail. postilio.eu, pstlmta.net and every name under them are Postilio's own and cannot be added. A name the project has already answers 409 with {"error": "domain_exists"}.

The answer is the domain with the status pending and the records to create:

{
  "id": "01a1081b-eb5c-7685-ab38-fdd4a4ab10e5",
  "name": "mail.example.com",
  "status": "pending",
  "checkedAt": null,
  "records": [
    { "type": "CNAME", "name": "pst1._domainkey.mail.example.com", "value": "pst1.ft6sub3lbo.dkim.pstlmta.net", "status": "unknown" },
    { "type": "CNAME", "name": "pst2._domainkey.mail.example.com", "value": "pst2.ft6sub3lbo.dkim.pstlmta.net", "status": "unknown" },
    { "type": "CNAME", "name": "pst-bounces.mail.example.com", "value": "rp.pstlmta.net", "status": "unknown" }
  ],
  "createdAt": "2026-10-04T18:10:09.884+00:00",
  "addedBy": null,
  "failingSince": null,
  "sent30d": 0,
  "dmarc": null,
  "platformKey": { "type": "TXT", "name": "pst1.ft6sub3lbo.dkim.pstlmta.net", "status": "publishing" }
}

The records

RecordPoints toWhat it is for
pst1._domainkey.<domain> and pst2._domainkey.<domain>pst1.<token>.dkim.pstlmta.net and pst2.<token>.dkim.pstlmta.netDKIM. Postilio signs your mail with a key of this domain's own and publishes its public half in its own zone; your CNAMEs point there. Two selectors, so Postilio can replace the key behind the one it does not sign with, without you changing a record.
pst-bounces.<domain>rp.pstlmta.netReturn path. The envelope sender of your mail is on pst-bounces.<domain>, so bounces come back to Postilio, and SPF is checked against Postilio's servers through this CNAME.

Domains added before these names existed have one DKIM record with a dated selector (pst202610._domainkey.<domain>) and their return path on bounce.<domain>. They keep those names and keep working: the answer always shows the names that count for your domain.

Postilio is moving these targets to pstlmta.net (<selector>.<token>.dkim.pstlmta.net, rp.pstlmta.net), and a domain keeps the targets it was added with. Always use the values your domain shows; both kinds work (Older and newer record values).

Create them as CNAME records with exactly the names and values the portal or the API shows; the selector and token are your domain's own. Postilio publishes the record your DKIM CNAME points to itself; the domain is verified once that one is found too. It is not one for you to create: platformKey says where it stands. With pst1 and pst2, Postilio publishes a key behind each: the one it signs with, and a standby key of its own behind the other selector, ready for a key rotation. platformKey is published once both are found; the domain's status only ever waits for the one it signs with, so a standby key that is not published yet never stops your mail.

platformKey.statusMeaning
publishingPostilio is publishing it, or it was published and the next check will find it. Usually a minute.
publishedfound in DNS at the last check.
failedpublishing it keeps failing. Postilio's team is alerted and it is retried every 30 seconds; nothing to do on your side.
manualthis Postilio installation publishes these records by hand; its operator is alerted when one is missing.

So when your records are found and the domain is still pending, it waits for Postilio's record, and platformKey tells you why.

Older and newer record values

Postilio moves its own DNS names from postilio.eu to its infrastructure domain pstlmta.net (<selector>.<token>.dkim.pstlmta.net, rp.pstlmta.net). A domain keeps the values it was added with: the records in the answer are always the ones that count for your domain, and an older value keeps working. Once Postilio recommends the move, a record that still points at an older name carries newValue, today's value for it:

{ "type": "CNAME", "name": "bounce.mail.example.com", "value": "rp.postilio.eu", "status": "found", "newValue": "rp.pstlmta.net" }

Point the record at newValue when it suits you, record by record; there is no deadline. At the next check (or POST /v1/domains/{id}/check) the record is found on the new value, value becomes it and newValue is gone. The domain stays verified throughout. A record without newValue needs nothing. See Migrate your domain.

A domain with the older names (a dated DKIM selector, bounce.<domain>) is offered the new names with the move. Its records then carry newName too, the name to create with newValue, and the domain has newRecords: the second DKIM selector, which does not exist yet.

{
  "records": [
    { "type": "CNAME", "name": "pst202610._domainkey.mail.example.com", "value": "pst202610.ft6sub3lbo.dkim.postilio.eu",
      "status": "found", "newValue": "pst1.ft6sub3lbo.dkim.pstlmta.net", "newName": "pst1._domainkey.mail.example.com" },
    { "type": "CNAME", "name": "bounce.mail.example.com", "value": "rp.postilio.eu", "status": "found",
      "newValue": "rp.pstlmta.net", "newName": "pst-bounces.mail.example.com" }
  ],
  "newRecords": [
    { "type": "CNAME", "name": "pst2._domainkey.mail.example.com", "value": "pst2.ft6sub3lbo.dkim.pstlmta.net", "status": "missing" }
  ]
}

Create the new records next to the old ones; leave the old ones in place. Each record moves on its own once the new one is found: pst1 makes the domain sign with pst1 (the same key), pst-bounces moves its return path. The answer then shows the new record in place of the old one, and pst2 among the records. Until then the old record counts as before, and newRecords never counts towards the status. With all three new records found, Postilio can rotate the domain's DKIM key without you changing DNS again.

DMARC

DMARC tells receivers what to do with mail that uses your domain in its From address but is not authenticated for it. Mail sent through Postilio passes DMARC on DKIM: it is signed with d= exactly your domain, so it aligns even with strict DKIM alignment (adkim=s). The return path is on pst-bounces.<domain> (bounce.<domain> for older domains), so SPF aligns only in relaxed mode (aspf=r, the default); with aspf=s DMARC rests on DKIM alone, which is enough. Your mail also carries a second signature, d=outbound.postilio.eu, for the mailbox providers' complaint reports (What recipients see); it does not align with your domain and does not need to: one aligned, valid signature is what DMARC asks. A third one, d=pstlmta.net, may join it for the same purpose; that changes nothing for DMARC either.

Sending through Postilio never depends on a DMARC record; it is advice. The large mailbox providers do ask for one from bulk senders: Gmail from senders of more than 5,000 messages a day to Gmail accounts, Microsoft from senders of 5,000 or more a day to Outlook.com, Hotmail and Live, and Yahoo from bulk senders without naming a number. For all three, p=none is enough.

At every check Postilio reads the domain's DMARC record as receivers find it (RFC 9989): its own at _dmarc.<domain>, or else the record of its organizational domain, found by walking up the DNS tree (at most eight lookups; a psd= tag on the way decides where the walk stops). What each tag of the record does is on DMARC tags. The answer is in dmarc, which is null until the first check:

"dmarc": {
  "status": "monitoring",
  "policyDomain": "mail.example.com",
  "records": ["v=DMARC1; p=none"],
  "issues": ["no_reports"],
  "policy": "none",
  "testing": false
}
StatusMeaning
missingno record on the domain or a parent.
invalidreceivers ignore the record. issues says why: multiple_records (more than one at the same name), version (it does not start with v=DMARC1) or syntax (a tag with a value receivers do not accept).
monitoringthe policy that applies is none: receivers report on mail that fails, but deliver it as usual. A record without p= counts as p=none.
enforcedquarantine or reject applies.

policy is the policy receivers apply to mail that fails: none, quarantine or reject (null while missing or invalid). With t=y the owner is testing, testing is true, and receivers apply one step less: p=quarantine; t=y applies none, p=reject; t=y applies quarantine. For a subdomain without a record of its own, the sp= tag of the record found is the policy when it has one.

issues can also hold advice on a record receivers use: no_reports (the policy is none and there is no rua= address, so nobody receives the reports), spf_strict (aspf=s, see above), obsolete_tag (pct=, rf= or ri=: no longer part of DMARC, receivers ignore them; use t=y instead of pct=) and invalid_policy (p=, sp= or np= has a value receivers do not accept, but rua= is valid, so they act as if the record said p=none).

To start, add a TXT record such as _dmarc.mail.example.com TXT "v=DMARC1; p=none; adkim=s; aspf=r", with rua=mailto: and an address of yours to receive the aggregate reports. Once the reports show that all your mail passes, including mail other services send for the domain, move to p=quarantine and later to p=reject, each time first with t=y while you watch the reports.

Statuses

StatusMeaning
pendingadded; not all records found yet. Nothing can be sent from it.
partially_verifiedeverything needed to send is found: the DKIM record of the selector Postilio signs with, the return path and Postilio's key. The other DKIM selector's record is missing; add it, or Postilio cannot replace the key later without your help. You can send from any address on the domain.
verifiedall records found. You can send from any address on the domain.
failingit was verified, but a record went missing. It keeps sending for 72 hours after failingSince, so a DNS slip does not stop your mail at once; after that, sends answer 422 unverified_sender_domain until the records are back.

Each record has its own status too: found, missing, or unknown before the first check. A domain that was failing becomes verified again as soon as its records are found.

Checks

Postilio checks every domain's records every 10 minutes. To check one now, press Check now in the portal or:

curl -X POST https://api.postilio.eu/v1/domains/$DOMAIN_ID/check \
  -H "Authorization: Bearer $POSTILIO_KEY"

It answers the domain with its new status. One check per domain per minute: sooner answers 429 with {"error": "too_many_checks"} and a Retry-After header. When DNS gave no answer at all, the status stays as it was and the answer is 503 with {"error": "dns_unavailable"}; try again a little later.

List and remove

GET /v1/domains lists the project's domains and GET /v1/domains/{id} reads one; both need domains:read (or domains:manage, which includes it), which a test key may have too. sent30d is the number of live messages sent from the domain today and the 29 days before.

DELETE /v1/domains/{id} removes a domain (scope domains:manage): mail from it stops at once. Delete its DNS records afterwards.