Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/content/config/best-practices/dkim_dmarc_spf.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ DKIM is currently supported by either OpenDKIM or Rspamd:
use_esld = true;
check_pubkey = true; # you want to use this in the beginning

selector = "mail";
# The path location is searched for a DKIM key with these variables:
# - `$domain` is sourced from the MIME mail message `From` header
# - `$selector` is configured for `mail` (as a default fallback)
path = "/tmp/docker-mailserver/dkim/keys/$domain/$selector.private";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is wrong, currently the keys are in: /tmp/docker-mailserver/opendkim/keys/

I have used path = "/etc/opendkim/keys/$domain/$selector.private"; until now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path is wrong

It's an example and was explicitly changed to that by me for the docs.

The contributor used /tmp/docker-mailserver/... instead of /etc/... but otherwise they also referred to opendkim.

Not sure why you'd want OpenDKIM as the path for rspamd though? I want this to be a unified location for DKIM keys, but someone will need to contribute that change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's more that rspamd wanted to do signing before I would even know it. So I patched the path and selector to use open dkim path. Since opendkim was the first dkim stuff I had setup
Just feels like there is too many moving components in DMS and without a diagram I can not decide to shut down one component or another.
Anyway this config allows to local dkim sign and that's all I needed to pass 👍


# domain specific configurations can be provided below:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively there is a simple selector_map setting that references a file of $domain $selector pairs per line.

The $domain is used to lookup the $selector override (if any), similar to how the config here works. Assuming selector_maps is compatible with multiple selectors as well, then the only difference from this config below is configuring different path which we don't really need, and a similar setting path_maps supports.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feedback has been migrated to a separate TODO issue: #3778

domain {
example.com {
path = "/tmp/docker-mailserver/rspamd/dkim/mail.private";
Expand Down