Forge Home

postfix

A Puppet module for installing and configuring the postfix message transfer agent.

22,053 downloads

17,563 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.3 (latest)
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Aug 5th 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 'Aethylred-postfix', '0.2.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install Aethylred-postfix --version 0.2.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

Aethylred/postfix — version 0.2.3 Aug 5th 2015

puppet-postfix

This is a puppet module for installing, configuring and managing the postfix message transfer agent.

Build Status

Intent

The intention of this module is to provide a module that installs and configures postfix using a parametised class and augeas, rather than using custom template files. This included setting up appropriate rspec tests and smoke tests.

Postfix vs. Sendmail

There are many reasons to choose between sendmail and postfix, but in this case it was that the postfix configuration is a simple text file. The sendmail configuration has to be compiled, and this compilation step makes it difficult for Puppet to tell if a configuration change has been implemented, which in turn makes it difficult to create a module that is truly idempotent.

Default Usage

To install postfix with the default configuration:

include postfix

Configuration with Parameters

The postfix class is parametric and allows a single declaration to configure the postfix service. At this stage it only configures a few settings to allow the set up of a SMTP relay that forwards all messages to another SMTP host. The following example replicates the default configuration:

class {'postfix':
    remove_sendmail => false,
    myorigin            =>  undef,
    relayhost           => undef,
    relayhost_port  => undef,
}
    

Parameters

  • remove_sendmail The sendmail service and packages will be removed from the system if this parameter is set to true. Default is false.
  • myorigin This sets the default domain part of all outgoing email as per the postfix documentation. The default is undef, which will revert to the system default which is the local hostname.
  • mydestination This sets the default domain part of all outgoing email as per the postfix documentation. The default is undef, which will revert to the system default which is $myhostname localhost.$mydomain localhost.
  • relayhost This sets the FQDN of the host through which email will be relayed to the internet as per the postfix documentation. The default is undef, which reverts to the system default of attempting to send email directly out through the Internet.
  • relayhost_port This sets the port for the relay host specified with the relayhost parameter. The default is undef which leaves the port specifier off the end of the relayhost setting. This parameter does nothing if the relayhost parameter is not set.
  • daemon_directory Sets the directory with Postfix support programs and daemon programs are installed. The default is specific for each operating system. It's not recommended that this parameter be changed.
  • inet_interfaces Sets the network interface for postfix to bind do. The default value is localhost

Attribution

puppet-blank for Puppet Module generation

This module is derived from the puppet-blank module by Aaron Hicks (aethylred@gmail.com)

This module has been developed for the use with Open Source Puppet (Apache 2.0 license) for automating server & service deployment.

Licensing

This file is part of the postfix Puppet module.

Licensed under the Apache License, Version 2.0