A Puppet module to install and manage OpenDKIM
Warning : this package will replace all your RSA keys ! Before using it, be sure to add all your keys in Hiera !
A basic example is as follows:
class { '::opendkim':
socket => 'inet:8891@127.0.0.1',
trusted_hosts => ['::1','127.0.0.1','localhost'],
keys => [
{
domain => 'mydomain.com',
selector => 'default',
publickey => 'p=yourPublicKey',
privatekey => 'Your Private Key',
signingdomains => ['*@mydomain.com', '*@subdomain.mydomain.com'],
}
]
}
You can also use natively Hiera :
include ::opendkim
opendkim::socket: 'inet:8891@127.0.0.1'
opendkim::trusted_hosts:
- '::1'
- '127.0.0.1'
- 'localhost'
opendkim::keys:
- domain: mydomain.com
selector: default
hash_algorithms: "sha1256"
publickey: "p=yourPublicKey"
publickeyextended: "secondLineofPublicKey"
privatekey: |
-----BEGIN RSA PRIVATE KEY-----
Your Private Key
-----END RSA PRIVATE KEY-----
signingdomains:
- '*@mydomain.com'
- '*@subdomain.mydomain.com'
If you want to use OpenDKIM though a UNIX socket with postfix for example, you should configure the socket like this :
opendkim::socket: 'local:/var/run/opendkim/opendkim.sock'
opendkim::umask: '0111'
A class for installing the OpenDKIM package and manipulate settings in the configuration file.
configdir
configfile
keys
gid
group
homedir
uid
umask
user
log_why
package_name
service_ensure
service_enable
service_name
socket
subdomains
sysconfigfile
trusted_hosts
mode
canonicalization
removeoldsignatures
maximum_signed_bytes
trustanchorfile
This module has only been tested on my Debian and Centos servers. I can not guarantee for any other Operating System
You are pleased to fork this module and adapt it for you needs. I am open to any Pull Request :-)