DNS Records & Domain Verification #
Before sending or receiving mail on a custom domain (<your-domain>), you must prove domain ownership via TXT challenge (ADR-0047) and publish email authentication records (MX, SPF, DKIM, DMARC).
1. Domain Ownership Verification (_tsubame-verify) #
- Register the domain in
https://console.<your-domain>(callsPOST /v1/domainswith{"tenant": "<tenant-id>", "name": "<your-domain>"}). - Fetch the verification token (
GET /v1/domains/challenge?tenant=<tenant-id>&domain=<your-domain>). - Publish the DNS
TXTrecord at_tsubame-verify.<your-domain>:
| Type | Host / Name | Value | TTL |
|---|---|---|---|
TXT | _tsubame-verify.<your-domain> | <64-hex-verification-token> | 300 |
- Trigger verification (
POST /v1/domains/verifywith{"tenant": "<tenant-id>", "domain": "<your-domain>"}). - Challenge tokens have a default 7-day TTL (DefaultChallengeTTL) from registration. - Once verified, the domain state transitions terminally toverified.
2. Mail Routing & Authentication Records #
| Record | Host / Name | Value / Target | Purpose |
|---|---|---|---|
MX | @ (<your-domain>) | 10 mail.<your-mail-host> | Routes inbound SMTP (port 25) to smtp-in |
TXT (SPF) | @ (<your-domain>) | v=spf1 mx include:<your-spf-host> -all | Authorizes outbound mta-out / relay servers |
TXT (DKIM) | <selector>._domainkey.<your-domain> | v=DKIM1; k=rsa; p=<YOUR_PUBLIC_DKIM_KEY> | Cryptographic RSA/Ed25519 signature verification |
TXT (DMARC) | _dmarc.<your-domain> | v=DMARC1; p=quarantine; rua=mailto:dmarc@<your-domain> | Policy alignment & aggregate reporting |
WARNING
smtp-in enforces inbound DMARC p=reject (ADR-0019): unaligned messages failing both SPF and DKIM are rejected with 550 5.7.1. Ensure your own SPF and DKIM records are valid before setting p=reject on your domain.
3. Verifying DNS Propagation Locally #
bash
dig +short TXT _tsubame-verify.<your-domain>
dig +short MX <your-domain>
dig +short TXT <selector>._domainkey.<your-domain>
dig +short TXT _dmarc.<your-domain>