postfix

Puppet module for postfix

Aneesh C

aneesh

6,954 downloads

4,624 latest version

4.6 quality score

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:
  • RedHat
    ,
    CentOS
    ,
    Ubuntu
    ,
    Debian

Start using this module

Tags: postfix, smtp, mail, mta

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',
}