Configuration

Sending Domains

A sending domain is the domain in your email's From address. PostMTA requires domain verification to send from any domain.

Adding a Domain

curl -X POST https://api.postmta.com/v1/domains -H "Authorization: Bearer pmta_live_xxxx" -H "Content-Type: application/json" -d '{"domain":"mail.example.com"}'

Required DNS Records

1. DKIM Record

FieldValue
TypeTXT
Hostpmta._domainkey.example.com
Valuev=DKIM1; k=rsa; p=YOUR_DKIM_PUBLIC_KEY

2. SPF Record

FieldValue
TypeTXT
Hostexample.com
Valuev=spf1 include:_spf.postmta.com ~all

3. DMARC Record

FieldValue
TypeTXT
Host_dmarc.example.com
Valuev=DMARC1; p=quarantine; rua=mailto:dmarc-reports@postmta.com
DNS propagation can take up to 48 hours, though it is typically within 5-30 minutes.

Verifying Domain Ownership

curl -X POST https://api.postmta.com/v1/domains/mail.example.com/verify -H "Authorization: Bearer pmta_live_xxxx"

Domain Statuses

StatusDescription
pendingDomain added, verification not yet attempted
unverifiedVerification attempted but DNS records not found
verifiedDomain verified, ready to send
suspendedDomain suspended due to policy violation

Using Subdomains

Best practice: use a subdomain for sending (e.g. mail.example.com) rather than your root domain. This isolates PostMTA sending reputation from your other email flows.

Deleting a Domain

Deleting a domain stops all email sending from that domain immediately. This cannot be undone.
curl -X DELETE https://api.postmta.com/v1/domains/mail.example.com -H "Authorization: Bearer pmta_live_xxxx"