DKIM is an email authentication method that allows the recipient to verify that an email was indeed sent and authorized by the owner of that domain. It works by adding a digital signature to the email header that can be verified using a public key published in your DNS.Documentation Index
Fetch the complete documentation index at: https://docs.lettr.com/llms.txt
Use this file to discover all available pages before exploring further.
How DKIM Works
Email is signed
When you send an email through Lettr, it signs the message content and selected headers using a private key. The resulting cryptographic signature is added to the email as a
DKIM-Signature header.Public key is published in DNS
You publish the corresponding public key as a DNS TXT record on your domain (e.g.,
scph0722._domainkey.yourdomain.com). This allows any receiving server to look up the key.Recipient server verifies the signature
The recipient’s mail server extracts the
DKIM-Signature header, queries your domain’s DNS for the public key, and uses it to verify the signature.DKIM Record Explained
A DKIM public key record contains:| Field | Description |
|---|---|
v | DKIM version (always DKIM1) |
k | Key type (rsa or ed25519) |
p | Public key in base64 format |
t | Optional flags (e.g., t=s for strict mode) |
DKIM Signature Header
When Lettr sends an email, it adds a DKIM-Signature header:| Field | Description |
|---|---|
v | Signature version |
a | Signing algorithm |
c | Canonicalization method |
d | Signing domain |
s | Selector (identifies which key to use) |
h | Headers included in signature |
bh | Body hash |
b | Signature |
DKIM Alignment for DMARC
For DMARC to pass based on DKIM, the domain in thed= tag of the DKIM signature must align with the From: header domain.
Lettr automatically signs emails with your domain, ensuring DKIM alignment:
Troubleshooting
If DKIM verification fails, check the most common causes:| Issue | Cause | Solution |
|---|---|---|
| DKIM not verifying | CNAME record hostname is incorrect | Ensure the record uses the exact selector provided by Lettr (e.g., scph0722._domainkey), not a generic _domainkey |
| CNAME not resolving | Typo in the CNAME target value | Verify the value matches exactly what Lettr provided; DNS changes can take up to 48 hours to propagate |
| Signature invalid | Email content was modified in transit | Mailing list software, forwarding services, or anti-virus tools can alter message content after signing, breaking the signature |
| DMARC failing despite DKIM pass | DKIM domain doesn’t align with From header | The domain in the DKIM d= tag must match (or be a subdomain of) the domain in the From: header for DMARC alignment |
Testing DKIM
The simplest way to verify your DKIM configuration is to send a test email to a personal account and inspect the email headers. TheAuthentication-Results header will show whether the DKIM signature was verified successfully:
- Send an email to your personal account (Gmail works well for header inspection)
- View the email headers/source (in Gmail: More → Show original)
- Look for
DKIM-Signature:in the headers to confirm the signature was added - Check for
dkim=passin theAuthentication-Resultsheader to confirm verification
Next Steps
DMARC
Configure DMARC to tie SPF and DKIM together
BIMI
Display your brand logo in email clients