Skip to content

How Can I Apply Multiple DKIM Signatures to a Message?

Applying multiple DKIM signatures to a message is straightforward, but will depend on how you implement DKIM signing in your installation:

Using the DKIM Helper

If you are using the DKIM Helper to manage the signing of messages, you can add additional DKIM signatures by using the additional_signatures option in your helper config, combined with the signature block:

additional_signatures = ["MyESPName"]

# Policy is interpreted differently for these
policy = "Always" # Always add this signature
#policy = "OnlyIfMissingDomainBlock" # Use this as a fallback

# specifies the signing domain for this signature block
domain = ""

You can add as many additional signatures as needed, and selectively decide whether those signatures are used globally or only when the sending domain does not have a signature of its own.

Using Lua

If you are directly controlling DKIM signing using Lua, additional signatures are simply a matter of calling the signing module more than once:

kumo.on('smtp_server_message_received', function(msg)
  local signer_one
  kumo.dkim.rsa_sha256_signer {
    domain = msg:from_header().domain,
    selector = 'myselector',
    headers = { 'Content-Type', 'Message-Id', 'Subject' },
    key = '/opt/kumomta/etc/dkim/',


  local signer_two
  kumo.dkim.rsa_sha256_signer {
    domain = '',
    selector = 'my_esp_selector',
    headers = { 'Content-Type', 'Message-Id', 'Subject' },
    key = '/opt/kumomta/etc/dkim/',


Because you have granular control in Lua for signing, you can add as many signers as you wish, and set them either programmatically or arbitrarily depending on your needs.