Skip to main content

Last updated March 2020

Name — Sign a message using a Domain Key

Synopsis, vctx, options);

msg: userdata, ec_message type
vctx: userdata, validate_context type
options: table


This function signs a message using a DomainKey signature. This function requires the dk_sign module.

Enable this function with the statement require('');.

It requires the following parameters:

  • msg – mail message to sign

  • vctx – validation context

  • options – table that allows the caller to override the following options with values different from that provided by the dk_sign module:

    • base_domain – default signing domain

    • selector – default signing selector

    • keyfile – default signing key file (which may be parameterized as defined in “opendkim – Open Source DKIM”)

    • keybuf – default signing key

      This hash entry must contain the PEM encoded private key to use for signing the messages.


This function should only be invoked from the core_final_validation hook.

See Also

Was this page helpful?