Forge Home

postfix

A module to configure postifx mail

12,279 downloads

517 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 Feb 21st 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=4.0.0 < 6.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', '1.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 1.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.

Download
Tags: postfix, mail, mta

Documentation

cirrax/postfix — version 1.1.1 Feb 21st 2018

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

Overview

The purpose of this module is to configure postfix. It allows you to specify two postfix configurations in hiera. The possibilities of the two configurations are equal. For readability one is called server (the main mailserver) the other satellite (systems, that send all mail to the mailserver). Configuration option can be inherited from the main class to shorten the hiera configuration.

Usage

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. By default this will install the satellite configuration. If you want to use the server configuration set $postfix::is_satellite to false.

To set the values for the satellite, use postfix::satellite::XXXX for the server use postfix::server:XXXX. All values are also available in the postfix class as postfix::common_XXXX. These will be inherited to postfix::satellite and postfx::server class.

To set parameters in main.cf file, use:

postfix::common_parameters: # or use postfix::satellite::parameters:/postfix::server::parameters
    bounce_size_limit:
      comments:
        - 'The maximal amount of original message text that is sent in a'
        - 'non-delivery notification'
      value: 50000
    header_size_limit:
      comments:
        - '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:

postfix::common_parameters:
  bounce_size_limit: 50000
  header_size_limit: 102400

To set services in master.cf file use:

To add a service in master.cf file use:

postfix::common_services: # or use postfix::satellite::services or postfix::server::services:
  smtp:
    type: 'inet',
    priv: 'n',
    chroot: 'y',
    command: 'smtpd',
  rewrite:
    chroot: 'y'
    command: 'trivial-rewrite'

create lookup maps:

simple lookup maps can be created using:

postfix::common_maps: # or use postfix::satellite:maps or postfix::server::maps:
  regex_sender_canonical:
    type: 'regex'
    contents:
      - "/^(.*)@%{::fqdn}/      ${1}+%{::hostname}@internaldomain.cirrax.com"
  hash_rewrite_local_sender:
    type: 'hash'
    contents:
      - 'user1          user1@cirrax.com'
      - 'user2          user2@cirrax.com'

To use them use set the parameters in master.cf accordingly.

Contributing

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.

Authors

This module is mainly written by Cirrax GmbH.

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