Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug report: opendkim/SigningTablen contained wildcard #3810

Open
1 task done
defnull opened this issue Jan 22, 2024 · 1 comment
Open
1 task done

bug report: opendkim/SigningTablen contained wildcard #3810

defnull opened this issue Jan 22, 2024 · 1 comment
Labels
area/scripts area/security kind/bug/report A report about a bug service/security/dkim-dmarc-spf stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI

Comments

@defnull
Copy link

defnull commented Jan 22, 2024

馃摑 Preliminary Checks

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

馃憖 What Happened?

Unsure how this happened, but my config/opendkim/SigningTable file contained *@* mail._domainkey.mydomain.net as the first line, which caused OpenDKIM to sign all mails with that key and ignoring others keys for other domains. This is not an issue with most email providers, but some (e.g. GMX) are more strict and only accept mails if the DKIM domain used to sign the mail actually matches the domain in the FROM header.

馃憻 Reproduction Steps

I may have called setup config dkim domain * at some point, but I am not sure. It would be nice to catch this user error and never create a SigningTable entry with a wildcard domain.

馃悑 DMS Version

latest

馃捇 Operating System and Architecture

Debian 12

鈿欙笍 Container configuration files

No response

馃摐 Relevant log output

No response

Improvements to this form?

No response

@defnull defnull added kind/bug/report A report about a bug meta/needs triage This issue / PR needs checks and verification from maintainers labels Jan 22, 2024
@polarathene polarathene added area/security area/scripts service/security/dkim-dmarc-spf and removed meta/needs triage This issue / PR needs checks and verification from maintainers labels Jan 23, 2024
@polarathene
Copy link
Member

Thanks for reporting that!

The OpenDKIM and Rspamd DKIM support is due for some rework after we've upgraded from Debian 11 to Debian 12 with a v14 release.

I haven't gone over the OpenDKIM config generation yet, but you can see advice here on how to generate a keypair for DKIM to use, along with the DNS record (zone file) and for rspamd the dkim_signing.conf:

#3630 (comment)


Ideally as a breaking change:

  • This would unify the DKIM config location at /tmp/docker-mailserver with a single setup config dkim script (there's pressently two similar ones for opendkim/rspamd generation).
  • We would copy the private key for internal usage, probably relying on a dkim/$domain/$selector.private filename convention.
  • The configs could likewise be generated at runtime if they don't already exist based on these files AFAIK.

We'd still want to prevent * as a valid domain candidate though 馃槄 So thanks for drawing attention to that 馃憤

@github-actions github-actions bot added the meta/stale This issue / PR has become stale and will be closed if there is no further activity label Feb 13, 2024
@polarathene polarathene added stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI and removed meta/stale This issue / PR has become stale and will be closed if there is no further activity labels Feb 13, 2024
@docker-mailserver docker-mailserver deleted a comment from github-actions bot Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scripts area/security kind/bug/report A report about a bug service/security/dkim-dmarc-spf stale-bot/ignore Indicates that this issue / PR shall not be closed by our stale-checking CI
Projects
None yet
Development

No branches or pull requests

2 participants