Set up email on a Porkbun domain
Checked November 8, 2026
Porkbun offers forwarding and paid mail, but if you want one flat price across many domains, Plainmail writes the mail records through Porkbun's API. Paste an API key once and every Porkbun domain you add is set up for you.
Steps
- At porkbun.com/account/api, name a key Plainmail, click Create API Key, and copy both keys.
- In Porkbun Domain Management, open the domain's Details and turn on API Access. Do this for each domain you'll use.
- Add the domain in Plainmail and paste the two keys when asked. Plainmail writes the records.
- When the domain shows DNS records in place, create a mailbox and add it to your mail app.
Using Porkbun email forwarding?
Turn forwarding off for the domain first. Its MX records would compete with Plainmail's, and a domain's mail can only go to one place.
What gets added
| Type | Name | Value |
|---|---|---|
| MX | @ | mx1.plainmailhost.com, priority 10 |
| TXT | @ | v=spf1 include:spf.plainmailhost.com ~all (merge into your SPF record if you already have one) |
| CNAME ×3 | <token>._domainkey | <token>.dkim.amazonses.com (DKIM for sending; your three tokens are on the domain's page) |
| MX | bounce | feedback-smtp.us-east-2.amazonses.com, priority 10 |
| TXT | bounce | v=spf1 include:amazonses.com ~all |
| TXT | _dmarc | v=DMARC1; p=quarantine; rua=mailto:dmarc@plainmailhost.com |
| CNAME | autoconfig and autodiscover | autoconfig.plainmailhost.com and autodiscover.plainmailhost.com (mail apps find the settings on their own) |
| TXT | _plainmail-verify | plainmail-verify=<token> (proves the domain is yours; token on the domain's page) |
Or let Claude do it
With the Plainmail MCP server connected, ask: Set up hello@yourdomain.com on Plainmail. Claude adds the domain, gives you the approval link for your DNS host (or the records to paste), checks them, and creates the mailbox.
Questions
Why does Plainmail need API Access turned on?
Porkbun's API only works on domains where API Access is on. It's a per-domain switch in Domain Management.
Can I remove the API key later?
Yes. Delete it at Porkbun once your domains are set up. Plainmail only needs it to write or fix records.
Get started$5 a month for up to 50 domains and 100 mailboxes