Email

Self-hosted email: DKIM, SPF, and DMARC explained

Three DNS records determine whether your outbound email is trusted by Gmail, Outlook, and every other major mail provider. Without them configured correctly, your mail goes to spam — even if your server is healthy.

SPF (Sender Policy Framework)

SPF is a DNS TXT record that lists the servers authorised to send email for your domain. When a receiving server gets a message claiming to be from you, it checks that the sending IP is in your SPF record.

; Basic SPF record (replace with your server IP)
yourdomain.com.  TXT  "v=spf1 ip4:YOUR_SERVER_IP ~all"

Use -all (hard fail) or ~all (soft fail). Hard fail is more aggressive but correct if you only send from one server.

DKIM (DomainKeys Identified Mail)

DKIM adds a cryptographic signature to every outgoing email. The receiving server verifies the signature using a public key published in your DNS. This proves the message wasn’t tampered with in transit and really came from your server.

On Simplewala, DKIM is configured automatically when you install the email stack. The public key is shown in the portal under Email → DNS Records.

; DKIM DNS record (generated by Simplewala)
mail._domainkey.yourdomain.com.  TXT  "v=DKIM1; k=rsa; p=MIGf..."

DMARC (Domain-based Message Authentication)

DMARC tells receiving servers what to do with mail that fails SPF or DKIM checks, and where to send reports.

; Start with p=none to collect reports without rejecting mail
_dmarc.yourdomain.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"

; Once you're confident, move to quarantine or reject
_dmarc.yourdomain.com.  TXT  "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@yourdomain.com"

Checking your configuration

On Simplewala

Simplewala configures SPF and DKIM automatically when you install the email platform. DMARC is a one-click toggle in the portal. The DNS records you need to add are shown with copy buttons in the Email → DNS Checklist section.

Email hosting on Simplewala