- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with postfix
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
A puppet module to install and configure postfix.
A puppet module that installs and configures postfix to either accept mail on locahost only and forward it on to a server responsible for sending it to its final destination, or as a server accepting mail and responsible to forwarding it to its final destination. This is to keep this module simple and is not intended to handle mailboxes, spam/av filtering, or any advanced postfix configs, but rather to configure internal email servers for utility purposes.
- postfix package
- postfix configuration
- postfix service
postfix can be installed simply by including the module:
class { 'postfix': }
If you have a webserver that sends mail and you would like a local SMTP server running you trust not to loose the message if upstream is down:
class { 'postfix':
relay_domains => 'myotherdomain.com',
}
Note: This assumes $::domain has proper MX records in place and the configured MX hosts will accept mail from this host.
To configure a relay server responsible for delivering all of those messages (and assuming your internal network is 10/8):
class { 'postfix':
smtp_relay => true,
relay_networks => '10.0.0.0/8',
}
Boolean. If true, this host will forward to final destination. If false, postfix will forward to relayhost Default: true
String. If smtp_relay == false, what is the next hop for mail? Default: $::domain
String. Local domain of this machine Default: $::domain
String. Networks that are allowed to relay mail through this host. Default: 127.0.0.1
String. Domains this machine will relay mail for. Default: undef
String. Username for relayhosts that require SMTP AUTH. Default: undef
String. Password for relayhosts that require SMTP AUTH. Default: undef
String. Port for relayhosts that require SMTP AUTH. Default: 25
Boolean. Enable TLS for SMTP connections. Default: false
String. Path to TLS certificate bundle. Default: Sensible defaults for RedHat and Debian systems, otherwise false.
String. Package containing TLS certificate bundle.. Default: Sensible defaults for RedHat and Debian systems, otherwise false.
Array. List of additional services to be included in the master.cf Default: []
Hash. Additional options to specify in the main.cf. Format is {'parameter' => 'value'} Default: {}
String. Value of the smtpd_client_restrictions parameter. Default: 'permit_mynetworks, reject'
String. Value of the smtpd_helo_restrictions parameter. Default: undef
String. Value of the smtpd_sender_restrictions parameter. Default: undef
String. Value of the smtpd_recipient_restrictions parameter. Default: 'permit_mynetworks, reject_unauth_destination'
String Value of the smtpd_data_restrictions parameter.
Default: 'reject_unauth_pipelining'
Writes the postfix configuration
Manages the postfix package
Manages the postfix service
This has only been tested on CentOS 6 and 7.
Improvements and bug fixes are greatly appreciated. See the contributing guide for information on adding and validating tests for PRs.