docker-mailserver icon indicating copy to clipboard operation
docker-mailserver copied to clipboard

bug report: DKIM key mismatch

Open MarcS1975 opened this issue 7 months ago • 2 comments

📝 Preliminary Checks

  • [x] I tried searching for an existing issue and followed the debugging docs advice, but still need assistance.

👀 What Happened?

DKIM keys say mismatch for every email I send.

Steps i took:

  1. log into docker container
  2. setup config dkim domain 'mydomain.win'
  3. this creates new DKIM keys in /tmp/.... folder
  4. remove container
  5. recreate container and start
  6. confirmed that all files in /etc/opendkim/keys are updated (copied from /tmp folder)
  7. Confirmed that DNS records are correct.
  8. Sending email gives DKIM error:
  9. `Authentication-Results: mail.mydomain.win;

dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mydomain.win [email protected] header.a=rsa-sha256 header.s=mail header.b=kdlnzb/U; dkim-atps=neutral

👟 Reproduction Steps

No response

🐋 DMS Version

latest

💻 Operating System and Architecture

Debian

⚙️ Container configuration files


📜 Relevant log output


MarcS1975 avatar May 30 '25 14:05 MarcS1975

Found the problem: the DKIM key that is generated is multiple lines long and although that passes all DNS key checks and DNS providers accept the format as correct, it does not pass a match test between a DKIM signed mail and the DNS record. Only when flattening the key it works. -> strange

MarcS1975 avatar May 30 '25 14:05 MarcS1975

Only when flattening the key it works. -> strange

You are referring to flattening at the DNS record? That is required for some DNS providers, but doesn't work for others, we document this:

Image

polarathene avatar May 30 '25 22:05 polarathene

This issue has become stale because it has been open for 20 days without activity. This issue will be closed in 10 days automatically unless:

  • a maintainer removes the meta/stale label or adds the stale-bot/ignore label
  • new activity occurs, such as a new comment

github-actions[bot] avatar Jun 20 '25 01:06 github-actions[bot]

This issue was closed due to inactivity.

github-actions[bot] avatar Jun 30 '25 01:06 github-actions[bot]