https://github.com/lvicainne/puppet-opendkim
Puppet module for opendkim
https://github.com/lvicainne/puppet-opendkim
hiera opendkim puppet
Last synced: about 1 month ago
JSON representation
Puppet module for opendkim
- Host: GitHub
- URL: https://github.com/lvicainne/puppet-opendkim
- Owner: lvicainne
- License: other
- Created: 2016-03-26T08:07:05.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T23:08:36.000Z (about 2 months ago)
- Last Synced: 2025-03-31T23:18:22.611Z (about 1 month ago)
- Topics: hiera, opendkim, puppet
- Language: Puppet
- Homepage: https://forge.puppetlabs.com/lvicainne/opendkim
- Size: 118 KB
- Stars: 5
- Watchers: 2
- Forks: 33
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenDKIM
[](https://forge.puppetlabs.com/lvicainne/opendkim)
[](https://travis-ci.org/lvicainne/puppet-opendkim)## Table of Contents
1. [Description](#description)
2. [Setup - The basics of getting started with OpenDKIM](#setup)
* [What opendkim module affects](#what-opendkim-module-affects)
* [Beginning with opendkim](#beginning-with-opendkim)
3. [Usage - Configuration options and additional functionality](#usage)
4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)## 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 filesWarning : 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:
```puppet
class { '::opendkim':
socket => 'inet:[email protected]',
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 :
```puppet
include ::opendkim
``````yaml
opendkim::socket: 'inet:[email protected]'
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 :```yaml
opendkim::socket: 'local:/var/run/opendkim/opendkim.sock'
opendkim::umask: '0111'
```## Reference
### Public Classes
* [opendkim](#class-opendkim)
### 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 :-)