Skip to content

Fix DKIM signing guide against Rspamd source#112

Open
moisseev wants to merge 2 commits into
rspamd:masterfrom
moisseev:dkim-signing
Open

Fix DKIM signing guide against Rspamd source#112
moisseev wants to merge 2 commits into
rspamd:masterfrom
moisseev:dkim-signing

Conversation

@moisseev

@moisseev moisseev commented Jul 11, 2026

Copy link
Copy Markdown
Member

All corrections verified against the rspamd source tree.

  • rspamc DKIM tests were non-functional: -d is --deliver (not a domain) and -f is --flag (fuzzy). Rewrote them to scan a real message as an authenticated user (-u), whose From: header domain must match; -F sets the SMTP envelope sender, not the MIME From: DKIM signs (see upstream rspamd discussion Rspamd dkim signing with Postfix... using virtual_alias_domains and virtual_aliases. rspamd#6129).
  • Check the DKIM_SIGNED symbol instead of grepping the folded DKIM-Signature: header, which matched only its first line; document rspamc -j | jq to print the full signature.
  • Drop fabricated/no-op options (cache_key, cache_expiry, server_keys); replace server_keys with a correct per-host config.
  • Move selector_map to the top level (ignored inside a domain block).
  • Prefix the Vault token env var with RSPAMD_ so the {= VAULT_DKIM_TOKEN =} template resolves.
  • Remove a broken/redundant automated test script, a duplicated dig example, and the bogus dkim_keygen -t "validation".

moisseev added 2 commits July 11, 2026 17:27
All corrections verified against the rspamd source tree.

- rspamc DKIM tests were non-functional: `-d` is `--deliver` (not a
  domain) and `-f` is `--flag` (fuzzy). Rewrote them to scan a real
  message as an authenticated user (`-u`), whose `From:` header domain
  must match; `-F` sets the SMTP envelope sender, not the MIME `From:`
  DKIM signs (see upstream rspamd discussion #6129).
- Check the `DKIM_SIGNED` symbol instead of grepping the folded
  `DKIM-Signature:` header, which matched only its first line; document
  `rspamc -j | jq` to print the full signature.
- Drop fabricated/no-op options (`cache_key`, `cache_expiry`,
  `server_keys`); replace `server_keys` with a correct per-host config.
- Move `selector_map` to the top level (ignored inside a domain block).
- Prefix the Vault token env var with `RSPAMD_` so the
  `{= VAULT_DKIM_TOKEN =}` template resolves.
- Remove a broken/redundant automated test script, a duplicated `dig`
  example, and the bogus `dkim_keygen -t` "validation".
- dkim-management.md: add the missing `dkim_keygen` options
  (`-o/--output`, `--priv-output`, `-f/--force`) and fix the `-s`
  default (`mail`, not `default`), per lualib/rspamadm/dkim_keygen.lua.
- dkim_signing.md: `sign_condition` is supported by the `dkim_signing`
  module too (shared via lua_dkim_tools), not only by the `dkim` module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant