Glossary
What Is DKIM? Signing Email So Receivers Trust You
What is DKIM, how the public key in DNS proves a message is genuine, what selectors are, and how to set up DKIM at the new provider before cutover.
Priya Shah
Senior Systems Engineer
DKIM is what turns an outbound email into something a receiver can actually verify. Without it, the only thing stopping a spammer from sending mail that looks like it came from your domain is the SPF record, and SPF doesn't cover the visible From address. This page explains what DKIM is, how selectors and the public key in DNS work together, and the order you set DKIM up in during a migration so mail keeps signing through the cutover.
Skip the manual setup — let Mailbox Taxi handle it
One desktop app, every IMAP provider, zero data leaving your machine.
What DKIM is
DKIM stands for DomainKeys Identified Mail. It is defined in RFC 6376. When a mail server sends a message, it computes a cryptographic signature over selected headers and the body, then attaches that signature as a DKIM-Signature: header on the outgoing message.
A receiver that wants to verify the message looks up a public key in DNS, uses it to check the signature, and learns two things:
- The message has not been altered in transit. If anything important changed between the sender and the receiver, the signature breaks.
- The signing domain authorised the message. Only someone with the private key paired to the published public key could have produced that signature.
DKIM does not encrypt the message. It signs it. Anyone can still read the contents in transit — DKIM is about authenticity, not privacy.
How the DNS side works
The public half of the keypair lives in DNS as a TXT record. The record name is built from two parts: a selector, and the literal label _domainkey. For example:
selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSq..."
The selector is just a short label chosen by whoever runs the signing server. Common selectors include:
- Microsoft 365:
selector1andselector2 - Google Workspace:
google - Mailgun, SendGrid and other ESPs:
s1,mta1,pic, and provider-specific names
The selector matters because it lets one domain publish many keys at once. The signing server tells receivers which key to use by including the selector in the DKIM-Signature: header on every message it sends.
What a DKIM signature actually proves
When a receiver verifies a DKIM signature, the result goes into the Authentication-Results: header on the received message:
Authentication-Results: mx.google.com; dkim=pass header.i=@example.com header.s=selector1
A dkim=pass result means the signature was valid against the published key. It does not mean the message is safe — it just means the listed domain authorised this exact set of bytes. DMARC then takes that result and decides what to do with it.
For the full picture, see SPF and DMARC, which work alongside DKIM to authenticate outbound mail.
Setting up DKIM during a migration
The mistake to avoid is enabling DKIM on the new provider after cutover. By then, every outbound message from the new tenant has already been going out unsigned for hours, and downstream receivers have noticed.
The order that actually works is this:
- Generate DKIM keys at the new provider while the old provider is still live. Microsoft 365, Google Workspace and Zoho all expose this in the admin centre.
- Publish the public-key TXT records at the new selectors. They will sit alongside the existing provider's records — that's fine.
- Enable signing at the new provider with the keys generated in step 1.
- Send a test message from a new-tenant mailbox to an external Gmail address. Confirm
dkim=passin the Authentication-Results header. - Flip the MX record only after DKIM verifies cleanly.
- Leave the old provider's DKIM records in place for the first 30 days after cutover. Mail that was queued, forwarded or processed before the flip may still be evaluated against the old keys.
Tip
For Microsoft 365 tenants you can publish CNAME records that point at the provider's hosted key endpoint instead of pasting the public key directly. That lets the provider rotate keys without you touching DNS again.
Verifying DKIM works
Three checks confirm signing is healthy.
dig TXT selector1._domainkey.example.com— confirms the public key is published and parseable.- Send to a Gmail address and view the original. Look for
dkim=pass. If you seedkim=neutralordkim=none, the message is not being signed at all. - Send to a strict mailbox such as a corporate Office 365 tenant. Some receivers downgrade unsigned mail more aggressively than Gmail does.
For the Microsoft-specific quirks — selector naming, CNAME publication, and how DKIM interacts with the tenant's accepted domains — see the Office 365 migration guide.
Heads up
Do not paste the private key anywhere. Only the public half ever goes into DNS. If a provider's onboarding wizard asks you to upload a private key into a DNS record, something is wrong and you should stop.
Where DKIM fits in the runbook
DKIM is one of four DNS jobs at cutover, alongside MX, SPF and DMARC. The full sequence — including when each record changes relative to the IMAP copy and the MX flip — is in the complete email migration guide. The short version: DKIM goes live first so the new tenant is already signing before any real mail arrives at it.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.
Related reading
glossary
What Is SPF? Sender Policy Framework Explained
What is SPF, how the include mechanism works, why the 10-DNS-lookup limit matters, and how to update SPF cleanly when you switch email providers.
glossary
What Is DMARC? A Plain-English Guide for Migrations
What is DMARC, how policy modes (none, quarantine, reject) work, and what changes during an email migration so your DKIM stays aligned.
glossary
What Is an MX Record? The DNS Switch Behind Cutover
What is an MX record, how priorities and TTLs work, and why flipping the MX record is the moment mail actually moves to your new provider.
blog
The Complete Email Migration Guide for 2026
Plan, execute and validate an email migration without losing folders, flags, or sleep. A pillar guide that walks the full process end to end.
blog
Office 365 Migration: The Definitive Playbook
A complete office 365 migration playbook for IT admins: discovery, batching, throttling, modern auth, cutover vs staged vs hybrid, and validation.
Migrate your mailbox the easy way
Join the waitlist for early access and lock in launch pricing.