Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.24.0 < 8.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'lvicainne-opendkim', '0.4.3'
Learn more about managing modules with a PuppetfileDocumentation
OpenDKIM
Table of Contents
- Description
- Setup - The basics of getting started with OpenDKIM
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
A Puppet module to install and manage OpenDKIM
Setup
What OpenDKIM affects {#what-opendkim-module-affects}
- install OpenDKIM package
- modify the configuration file /etc/opendkim.conf
- add and modify files in /etc/opendkim
- purge /etc/opendkim and /etc/dkim from all unuseful files
Warning : this package will replace all your RSA keys ! Before using it, be sure to add all your keys in Hiera !
Beginning with OpenDKIM
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'],
}
]
}
Usage
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'
Reference
Public Classes
Class: opendkim
A class for installing the OpenDKIM package and manipulate settings in the configuration file.
Attributes
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
Limitations
This module has only been tested on my Debian and Centos servers. I can not guarantee for any other Operating System
Development
You are pleased to fork this module and adapt it for you needs. I am open to any Pull Request :-)
Changelog
v0.4.2 - Compatible with Puppet from 6.24 up to, but not including, 8.0
What's Changed
- Lookup osfamily for RedHat clones by @msalway in https://github.com/lvicainne/puppet-opendkim/pull/43
- Missing Optional for autorestart by @msalway in https://github.com/lvicainne/puppet-opendkim/pull/44
- chore: update module version and metadata by @parveenk27 in https://github.com/lvicainne/puppet-opendkim/pull/54
- Chunking publickey in 255 char blocks for dns txt by @cruelsmith in https://github.com/lvicainne/puppet-opendkim/pull/51
- Add SignHeaders From by @seriv in https://github.com/lvicainne/puppet-opendkim/pull/48
- feat(pdk): enable pdk to improve test and reliability of the module by @lvicainne in https://github.com/lvicainne/puppet-opendkim/pull/55
New Contributors
- @parveenk27 made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/54
- @seriv made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/48
Full Changelog: https://github.com/lvicainne/puppet-opendkim/compare/v0.4.0...v0.4.2
v0.4.0
What's Changed
- Add Missing Socket for Ubuntu 16.04 by @HielkeJ in https://github.com/lvicainne/puppet-opendkim/pull/3
- Replace deprecated stdlib functions with puppet data types by @jkroepke in https://github.com/lvicainne/puppet-opendkim/pull/5
- Removed full path comments on configfile by @jkroepke in https://github.com/lvicainne/puppet-opendkim/pull/6
- Adding nameserver config paramter by @jkroepke in https://github.com/lvicainne/puppet-opendkim/pull/7
- if you default it to undef in params, you need to make it Optional to acce… by @qs5779 in https://github.com/lvicainne/puppet-opendkim/pull/8
- add force to directory absent resources by @qs5779 in https://github.com/lvicainne/puppet-opendkim/pull/9
- Add parameters: mode, canonicalization, removeoldsignatures by @sa5bke in https://github.com/lvicainne/puppet-opendkim/pull/12
- Add support for MaximumSignedBytes by @tetsuo13 in https://github.com/lvicainne/puppet-opendkim/pull/13
- Make sure to create users before package installation by @Arakmar in https://github.com/lvicainne/puppet-opendkim/pull/14
- Allow handling of private keys outsite puppet by @jeebiq in https://github.com/lvicainne/puppet-opendkim/pull/18
- Test bumping version by @cFire in https://github.com/lvicainne/puppet-opendkim/pull/17
- add ability to validate dnssec by @tobiWu in https://github.com/lvicainne/puppet-opendkim/pull/19
- Fix duplicate resource if multiple keys are added for a domain by @nikdoof in https://github.com/lvicainne/puppet-opendkim/pull/16
- make trustanchorfile optional by @antondollmaier in https://github.com/lvicainne/puppet-opendkim/pull/20
- Add support for FreeBSD by @smortex in https://github.com/lvicainne/puppet-opendkim/pull/21
- Add management of /etc/tmpfiles.d/opendkim.conf for RedHat by @razorbladex401 in https://github.com/lvicainne/puppet-opendkim/pull/22
- Allow to apply a DKIM cert on all domains by @kapouik in https://github.com/lvicainne/puppet-opendkim/pull/24
- Allow stdlib v8 by @sazzle2611 in https://github.com/lvicainne/puppet-opendkim/pull/25
- Allow private keys to be Deferred for use with node_encrypt by @msalway in https://github.com/lvicainne/puppet-opendkim/pull/28
- Add SenderHeaders option to opendkim.conf by @tallenaz in https://github.com/lvicainne/puppet-opendkim/pull/29
- Fix legacy fact usage by @smortex in https://github.com/lvicainne/puppet-opendkim/pull/30
- Adds Parameters to support 2048 bit keys and Specifying hash_algorithms by @razorbladex401 in https://github.com/lvicainne/puppet-opendkim/pull/31
- Rework module to hiera and epp templates by @cruelsmith in https://github.com/lvicainne/puppet-opendkim/pull/35
- chore(puppet): update module version and metadata by @lvicainne in https://github.com/lvicainne/puppet-opendkim/pull/36
- Fix default value for sysconfigfile by @smortex in https://github.com/lvicainne/puppet-opendkim/pull/37
- Edit file ownership and permissions by @tallenaz in https://github.com/lvicainne/puppet-opendkim/pull/41
- Add autorestart config by @coreone in https://github.com/lvicainne/puppet-opendkim/pull/42
New Contributors
- @HielkeJ made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/3
- @jkroepke made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/5
- @qs5779 made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/8
- @sa5bke made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/12
- @tetsuo13 made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/13
- @Arakmar made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/14
- @jeebiq made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/18
- @cFire made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/17
- @tobiWu made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/19
- @nikdoof made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/16
- @antondollmaier made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/20
- @smortex made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/21
- @razorbladex401 made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/22
- @kapouik made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/24
- @sazzle2611 made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/25
- @tallenaz made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/29
- @coreone made their first contribution in https://github.com/lvicainne/puppet-opendkim/pull/42
Full Changelog: https://github.com/lvicainne/puppet-opendkim/commits/v0.4.0
Dependencies
- puppetlabs/stdlib (>= 4.13.0 < 10.0.0)
Copyright (C) 2016 Louis VICAINNE <louis@vicainne.fr> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.