Forge Home

opendkim

A module to manage OpenDKIM

6,856 downloads

6,856 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.1 (latest)
released Nov 3rd 2016
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rjpearce-opendkim', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rjpearce-opendkim
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rjpearce-opendkim --version 0.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: opendkim

Documentation

rjpearce/opendkim — version 0.0.1 Nov 3rd 2016

puppet-opendkim

Overview

Puppet module to manage OpenDKIM

Currently only supports Debian/Ubuntu, fork me to support more distributions.

  • opendkim : Main class to install, enable and setup default configuration.
  • opendkim::config : Class to setup OpenDKIM main configuration files.
  • opendkim::socket : Definition to add a new Socket to the /etc/default/opendkim config file.
  • opendkim::domain : Definition to add a new Domain to the /etc/opendkim.conf config file.

Setup your DKIM keys:

openssl genrsa -out example.com.key 1024
openssl rsa -in example.com.key -out example.com.pub -pubout -outform PEM
Move the private key file into your own puppet module

Add your public key to a new TXT record in DNS.

Choose a Selector for your public key, eg. 'mail'
Create a TXT record for your domain:
  mail._domainkey.example.com => v=DKIM1; k=rsa; p=[THE_CONTENT_OF_THE_PUBLIC_KEY_FILE]

Typical usage:

include 'opendkim'

opendkim::socket { 'listen on loopback on port 8891 - Ubuntu default':
  interface => 'localhost';
}
opendkim::domain { 'example.com':
  private_key_source => 'puppet:///modules/mymodule/example.com.key',
}

Configuration options for adding a Socket to OpenDKIM:

  opendkim::socket { 'listen on loopback on port 8891 - Ubuntu default':
    interface => 'localhost';
  }

  opendkim::socket { 'listen on a 192.168.1.1 port 8000':
    type      => 'inet',
    interface => '192.168.1.1',
    port      => '8000';
  }

  opendkim::socket { 'listen on a local file socket':
    type => 'file',
  }

  opendkim::socket { 'listen on a local file socket with a custom name':
    type => 'file',
    file => '/var/run/opendkim/my_custom_name.sock';
  }

Configuration options for adding a Domain to OpenDKIM:

opendkim::domain { 'example.com':
  private_key_source => 'puppet:///modules/mymodule/example.com.key',
}

opendkim::domain { 'example with custom key folder, selector and domain name':
  domain             => 'myexampleduck.com
  private_key_source => 'puppet:///modules/mymodule/myexampleduck.com.key',
  selector           => 'duck',
  key_folder         => '/etc/duck';
}

Dependencies: https://github.com/puppetlabs/puppetlabs-concat