Forge Home

mandrill

Configures mail service to use Mandrill as a smarthost.

10,052 downloads

9,032 latest version

3.4 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

  • 1.0.3 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Mar 26th 2015
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 'dmcnicks-mandrill', '1.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dmcnicks-mandrill
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dmcnicks-mandrill --version 1.0.3

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

Documentation

dmcnicks/mandrill — version 1.0.3 Mar 26th 2015

mandrill

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with mandrill
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Configures an existing mail service on a node to use Mandrill as a smarthost.

Module Description

Mandrill is a cloud-based email infrastructure service that can be used to deliver outgoing email from servers. This module configures the mailer software on nodes to use Mandrill as a smarthost. It makes a reasonable guess about the currently installed mailer based on operating system defaults, but a specific mailer can be set as a parameter.

Note that this module does not install a mail service.

Setup

What mandrill affects

  • Configuration files associated with the specified / guessed mailer.
  • Restarts the specified / guessed mailer.

Beginning with mandrill

Before you can use this module you will have to register with Mandrill. Free accounts support up to 250 emails per hour and 12000 emails per month. You will also need to generate an API key in Settings > API Keys > New API Key.

The most basic class declaration requires a username and API key.

    class { "mandrill":
        username => "registered@email.address",
        apikey => "7vk6YiOxfzVdTmtRQShR3"
    }

This will guess which mailer to configure based on the operating system of the node and configure the mail domain of the node to be the node FQDN. You can specify a mail domain:

    class { "mandrill":
        username => "registered@email.address",
        apikey => "7vk6YiOxfzVdTmtRQShR3",
        mail_domain => "mydomain.org"
    }

And you can specify a mailer if you know what is running on the node:

    class { "mandrill":
        username => "registered@email.address",
        apikey => "7vk6YiOxfzVdTmtRQShR3",
        mail_domain => "mydomain.org",
        mailer => "sendmail",
    }

Usage

####Class: mandrill

The module's primary class.

Parameters within mandrill:

#####username

(Required) Mandrill username.

#####apikey

(Required) Mandrill API key.

#####mail_domain

The mail domain that the host should use for sender addresses. Defaults to the host FQDN.

#####mailer

The name of the mail software installed on the host. The module will try to make a sensible guess for this parameter based on operating system.

Limitations

This module supports exim, postfix and sendmail mailers and will guess which mailer to use for Debian, Ubuntu and RedHat derivatives. If you know the mailer you are using, specify it in the mandrill class definition.

This module has been tested with:

  • Exim, Postfix and Sendmail on Debian and Ubuntu.
  • Postfix and Sendmail on CentOS.

There may be incompatibilities with other OS versions, packages and configurations.

Development

I am happy to receive pull requests.