Forge Home

postfix

Puppet module for postfix

8,076 downloads

5,579 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

  • 5.0.0 (latest)
  • 4.0.0
  • 3.0.0
  • 2.0.0
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
released Jul 13th 2017
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 'aneesh-postfix', '5.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install aneesh-postfix --version 5.0.0

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, smtp

Documentation

aneesh/postfix — version 5.0.0 Jul 13th 2017

POSTFIX Module

Overview

This module install and configure postfix smtp server.

Usage

Default configuration:

include postfix

Change configuration file settings:

class { 'postfix':
    myhostname                          => 'mail.example.com',
    mydomain                            => 'example.com',
    mynetworks                          => '192.168.1.0/24, 127.0.0.0/8',
    mydestination                       => '$myhostname, localhost, localhost.localdomain',
    message_size_limit                  => '30720000',
    virtual_alias_domains               => '',
    virtual_alias_maps                  => 'proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf',
    virtual_mailbox_domains             => 'proxy:mysql:/etc/postfix/mysql-virtual_domains.cf',
    virtual_mailbox_maps                => 'proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf',
    virtual_mailbox_base                => '/home/vmail',
    virtual_uid_maps                    => 'static:5000',
    virtual_gid_maps                    => 'static:5000',
    smtpd_sasl_type                     => 'dovecot',
    smtpd_sasl_path                     => 'private/auth',
    smtpd_sasl_auth_enable              => 'yes',
    broken_sasl_auth_clients            => 'yes',
    smtpd_sasl_authenticated_header     => 'yes',
    smtpd_recipient_restrictions        => 'permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination',
    smtpd_use_tls                       => 'yes',
    smtpd_tls_cert_file                 => '</etc/pki/dovecot/certs/dovecot.pem',
    smtpd_tls_key_file                  => '</etc/pki/dovecot/private/dovecot.pem',
    virtual_create_maildirsize          => 'yes',
    virtual_maildir_extended            => 'yes',
    proxy_read_maps                     => '$local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
    virtual_transport                   => 'dovecot',
    dovecot_destination_recipient_limit => '1',
}

Query file settings:

postfix::new_config_file { 'mysql-virtual_domains.cf':
    configfile_newconfigfile => 'mysql-virtual_domains.cf',
    user                     => 'mail_admin',
    password                 => 'password',
    dbname                   => 'emaildb',
    query                    => 'SELECT domain AS virtual FROM domaintb WHERE domain="%s"',
    hosts                    => '127.0.0.1',
}