Skip to content

canonical/opendkim-operator

OpenDKIM charm

A Juju charm deploying and managing OpenDKIM on machines.

Like any Juju charm, this charm supports one-line deployment, configuration, integration, scaling, and more.

The OpenDKIM charm installs and configures the OpenDKIM application and offers other charms the ability to sign and validate email messages using the milter relation.

For information about how to deploy, integrate, and manage this charm, see the Official OpenDKIM Documentation.

Get started

The OpenDKIM charm offers signing and validation DKIM services through the milter relation. To configure it you need to set the signingtable , keytable and private-keys and configuration options (see OpenDKIM Configurations for more information).

Provision a Juju environment then deploy the OpenDKIM charm with:

juju deploy opendkim

Then integrate to an already deployed postfix-relay Juju application:

juju integrate opendkim postfix-relay

Configure the OpenDKIM charm using the keys generated by the opendkim-genkey command line tool. We will use selector as the selector name and example.com as the domain name.

opendkim-genkey -s selector -d example.com

The opendkim-genkey command will generate two files, selector.private for the private key and selector.txt for the DNS record.

Add the private key as a secret to the charm:

juju config opendkim
juju add-secret private-keys-for-opendkim keyfilename#file=selector.private
SECRET_ID=$(juju grant-secret private-keys-for-opendkim opendkim)
juju config opendkim private-keys=${SECRET_ID}

Configure the signingtable and keytable configuration options to match the file for the private key and the desired configuration:

juju config opendkim signingtable='[["selector._domainkey.example.com", "example.com:selector:/etc/dkimkeys/keyfilename.private"]]'
juju config opendkim keytable='[["*@example.com", "selector._domainkey.example.com"]]'

For more information, see the OpenDKIM Configuration format and the opendkim.conf manual.

Learn more

Project and community

Packages

No packages published

Contributors 8