Skip to main content
Documentation

Verify your domain

Configure SPF, DKIM, and DMARC records so you can send from your own domain with maximum deliverability.

1. Add the domain

Go to Dashboard → Domains → Add domain and enter the FQDN (e.g. mail.yourcompany.com).

2. Add the DNS records

CoffeeMail automatically generates the required records. Copy them into your DNS provider's panel (Route53, Cloudflare, Namecheap, etc).

Ownership (TXT)

Proves you control the domain. Use the exact value returned in data.records.

bashbash
empresa.com.br.   IN TXT  "coffeemail-verify=abc123xyz"

SPF (TXT at root)

Authorizes CoffeeMail IPs to send email on your behalf. Recommended template: v=spf1 include:_spf.coffeemail.com.br ~all.

bashbash
empresa.com.br.   IN TXT  "v=spf1 include:_spf.coffeemail.com.br ~all"

DKIM (CNAME)

RSA 2048 key with a dedicated selector (e.g. cm._domainkey.yourcompany.com). Signs the From, To, Subject, Date, and Message-Id headers.

bashbash
cm._domainkey.empresa.com.br.   IN CNAME  cm.dkim.coffeemail.com.br.

DMARC (TXT at _dmarc)

Defines the failure policy. We recommend starting with p=none to monitor, evolving to p=quarantine, and finally p=reject.

bashbash
_dmarc.empresa.com.br.  IN TXT  "v=DMARC1; p=none; rua=mailto:dmarc@empresa.com.br"

3. Trigger verification

Return to the dashboard and click Verify now. The platform queries global DNS servers and updates the status to verified.

verify-domain.ts
const { data } = await coffeemail.domains.verify('dom_123');console.log('SPF:', data.checks.spf.ok);console.log('DKIM:', data.checks.dkim.ok);console.log('DMARC:', data.checks.dmarc.ok);console.log('Ownership:', data.checks.ownership.ok);console.log('Status:', data.status);

4. Monitor health

Use coffeemail.domains.getHealth(id) periodically to track score, blacklist presence, and recommendations.

health.ts
const { data } = await coffeemail.domains.getHealth('dom_123');console.log('Score:', data.score);console.log('Blacklists:', data.blacklistCount);console.log('Recomendações:', data.recommendations);
Start with p=none in DMARC to monitor reports for 1-2 weeks before moving to p=quarantine and then p=reject. Skipping steps can block legitimate emails.