Forge Home


A module to configure postfix mail


535 latest version

5.0 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

  • 2.1.1 (latest)
  • 2.1.0
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Oct 7th 2022
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, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
  • Puppet >=5.0.0 < 8.0.0
  • , Ubuntu,

Start using this module

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

Add this module to your Puppetfile:

mod 'cirrax-postfix', '2.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add cirrax-postfix
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install cirrax-postfix --version 2.1.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.

Tags: postfix, mail, mta


cirrax/postfix — version 2.1.1 Oct 7th 2022

postfix puppet module

Build Status Puppet Forge Puppet Forge Puppet Forge Puppet Forge

Table of Contents

  1. Overview
  2. Usage - Configuration options and additional functionality
  3. Contributing


The purpose of this module is to configure postfix. It allows you to specify two postfix configurations in hiera.

Version 2.x.x and above does not use two separated classes for server and satellite like it was done in 1.x.x versions. Instead hiera is used to overwrite configs. Version 2.x.x and above does not merge parameters in code anymore, instead hiera merge is used.


The all available options for classes and defines are documented in the header of the class/define files. See there for any details.

postfix configuration

To use, include the postfix class.

To set parameters in file, use hiera:

        - 'The maximal amount of original message text that is sent in a'
        - 'non-delivery notification'
      value: 50000
        - 'The maximal amount of memory in bytes for storing a message header.'
        - 'If a header is larger, the excess is discarded'
      value: 102400

if you do not like to have a comment you can also set:

  bounce_size_limit: 50000
  header_size_limit: 102400

Do deactivate a parameter that has been set by default, use:

    deactivate: true

Services are hash merged in hiera.

To set services in file use:

To add a service in file use:

    type: 'inet'
    priv: 'n'
    chroot: 'y'
    command: 'smtpd'
    chroot: 'y'
    command: 'trivial-rewrite'

Services are hash merged in hiera and can be deactivated and removed from hiera.

create lookup maps:

Simple lookup maps can be created using:

    type: 'regex'
      - "/^(.*)@%{::fqdn}/      ${1}+%{::hostname}"
    type: 'hash'
      - 'user1'
      - 'user2'

Maps are hash merged in hiera.

To use them use set the parameters in accordingly.

support for postfix profiles

Instead of creating the postfix configuration with the parameters postfix::parameters, postfix::services and postfix::maps you can define several profiles and use postfix::use_profile to choose an appropriate profile for the configuration. The chosen profile is then merged with original parameters to generate the configuration.

Purpose of profiles is to have distinct postfix functions such as a full mailserver or just a satellite system that does not receive mail but relay everything to a main server. Or you need to distinct postfix configuration by datacenter or ....


Please report bugs and feature request using GitHub issue tracker.

For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint and the available spec tests in order to follow the recommended Puppet style guidelines from the Puppet Labs style guide.


This module is mainly written by Cirrax GmbH.

See the list of contributors for a list of all contributors.