Skip to content

feat(dkim): Replace OpenDKIM with DKIM Milter#798

Open
j-g00da wants to merge 2 commits intomainfrom
j-g00da/dkim-milter
Open

feat(dkim): Replace OpenDKIM with DKIM Milter#798
j-g00da wants to merge 2 commits intomainfrom
j-g00da/dkim-milter

Conversation

@j-g00da
Copy link
Collaborator

@j-g00da j-g00da commented Jan 5, 2026

No description provided.

#

# use dkim-milter instead of OpenDKIM
dkim_milter = false
Copy link
Contributor

Choose a reason for hiding this comment

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

In the end we don't need an option, it is fine to remove everything OpenDKIM-related. But existing users need a way to migrate. Ideally old key should just be reused, so no DNS changes are needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One downside of this I see is that we will leave "opendkim" in names (e.g. selector) which may be a bit confusing - but I guess it's fine.

packages=["rustc", "cargo", "openssl"],
)

cargo.packages(
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of building on the server, the binaries are better built on CI similar to how chatmail-turn is doing this: chatmail/dkim-milter#1

@j4n
Copy link
Contributor

j4n commented Jan 7, 2026

Setting aside the binary deployment deployment strategy, looks good to me. Having worked on #530 I wonder if dkim-milter can do the stripping of validated DKIM-Signatures as well? I see the default config does strip the Authentication-Results already.

@hpk42
Copy link
Contributor

hpk42 commented Jan 12, 2026 via email

@j-g00da j-g00da force-pushed the j-g00da/dkim-milter branch from b15bb7b to 4ba9027 Compare January 13, 2026 15:57
@j-g00da j-g00da force-pushed the j-g00da/dkim-milter branch from 4ba9027 to 8c8f28b Compare January 26, 2026 11:55
@j-g00da j-g00da force-pushed the j-g00da/dkim-milter branch from 8c8f28b to 3ace933 Compare January 26, 2026 12:14
@j-g00da j-g00da marked this pull request as ready for review January 26, 2026 13:23
@j-g00da
Copy link
Collaborator Author

j-g00da commented Jan 26, 2026

This currently works, CI fails due to unrelated issues.

Few notes:

  1. dkim-milter is less flexible than OpenDKIM, but I was able to get around it by just running two service instances for verification and signing. Advantage of that is a clear separation of these features, that will make it easy to move either verification or signing to filtermail later on.
  2. dkim-milter's reject policies lets us enforce same policy within the config, so modification of the source to provide the lua script functionalities wasn't needed.

@j-g00da j-g00da requested a review from link2xt January 26, 2026 14:35
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
We are now using dkim-milter instead of OpenDKIM.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
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.

4 participants