The error dkim=temperror (no key for signature) occurs when the DomainKeys Identified Mail (DKIM) verification process cannot find the appropriate DKIM public key in the DNS records of the sender domain. This typically happens when the DKIM record is missing, misconfigured, or temporarily unavailable.
What is DKIM?
DKIM ensures the authenticity and integrity of email messages by:
- Adding a digital signature to outgoing emails.
- Verifying the signature using the public key published in the sender DNS records.
When the recipient email server cannot verify the DKIM signature due to missing or inaccessible DNS records, the dkim=temperror error is generated.
Common Causes of the Error
Missing DKIM Record
The domain DNS zone does not have a valid DKIM TXT record.
Incorrect DKIM Selector
The DKIM selector in the email header does not match the one published in the DNS.
Propagation Delay
Changes to the DKIM DNS record are not yet propagated across the internet.
DNS Lookup Failure
Temporary DNS issues prevent the recipient server from retrieving the DKIM record.
Misconfigured Email Server
The sender email server did not properly add the DKIM signature.
Expired or Removed DKIM Key
The DKIM key used to sign the email has been removed or is no longer valid.
Steps to Resolve the Issue
Verify the DKIM Record
- Check if the DKIM TXT record is published in your domain DNS zone.
- Use tools like:
- MXToolbox DKIM Lookup
- Online DNS lookup tools.
- Example DKIM record format:
Replace selector with your actual DKIM selector and PUBLIC_KEY with your generated public key.
Confirm the DKIM Selector
- The DKIM selector is included in the DKIM-Signature header of your email. It looks like this:
- Ensure that the selector matches the corresponding TXT record in your DNS.
Check DNS Propagation
- If you recently updated the DKIM record, allow up to 48 hours for DNS propagation.
- Verify the record with:
Test DNS Accessibility
- Ensure the recipient server can query your DNS. Use a public DNS server (e.g., Google 8.8.8.8) to confirm:
Reconfigure or Generate a New DKIM Key
- If the DKIM key is missing or corrupted:
- Generate a new DKIM key pair using your mail server or a DKIM key generator.
- Add the public key to your domain DNS as a TXT record.
- Update your mail server with the private key.
Example of a Correct DKIM Record
For a selector named default, the DNS TXT record might look like this:
Check Email Server Logs
- Review the mail server logs to ensure the DKIM signature is being added to outgoing emails.
- Logs may indicate why the signature is missing or improperly configured.
- Example Commands:
- For Postfix:
- For Exim:
Enable SPF and DMARC
While fixing DKIM, ensure that your domain also has SPF and DMARC records to enhance email deliverability.
SPF Record:
DMARC Record:
Temporary Debugging Workaround
- If the issue persists, consider temporarily disabling DKIM validation on the recipient server (for testing purposes only).
- Example for Exim:
- Ensure your DKIM public key is correctly configured in your DNS.
- Verify that the selector in your outgoing emails matches the DNS record.
- Monitor for DNS propagation delays or lookup failures.
- Test and validate DKIM using online tools or command-line utilities.


