Version information
This version is compatible with:
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'jlambert121-postfix', '0.9.0'
Learn more about managing modules with a PuppetfileDocumentation
Table of Contents
- 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
Overview
A puppet module to install and configure postfix.
Module Description
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.
Setup
What postfix affects
- postfix package
- postfix configuration
- postfix service
Beginning with postfix
postfix can be installed simply by including the module:
class { 'postfix': }
Usage
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',
}
Reference
Public classes
Class: postfix
smtp_relay
Boolean. If true, this host will forward to final destination. If false, postfix will forward to relayhost Default: true
relay_host
String. If smtp_relay == false, what is the next hop for mail? Default: $::domain
mydomain
String. Local domain of this machine Default: $::domain
relay_networks
String. Networks that are allowed to relay mail through this host. Default: 127.0.0.1
relay_domains
String. Domains this machine will relay mail for. Default: undef
relay_username
String. Username for relayhosts that require SMTP AUTH. Default: undef
relay_password
String. Password for relayhosts that require SMTP AUTH. Default: undef
relay_port
String. Port for relayhosts that require SMTP AUTH. Default: 25
tls
Boolean. Enable TLS for SMTP connections. Default: false
tls_bundle
String. Path to TLS certificate bundle. Default: Sensible defaults for RedHat and Debian systems, otherwise false.
tls_package
String. Package containing TLS certificate bundle.. Default: Sensible defaults for RedHat and Debian systems, otherwise false.
master_config_services
Array. List of additional services to be included in the master.cf Default: []
main_options_hash
Hash. Additional options to specify in the main.cf. Format is {'parameter' => 'value'} Default: {}
smtpd_client_restrictions
String. Value of the smtpd_client_restrictions parameter. Default: 'permit_mynetworks, reject'
smtpd_helo_restrictions
String. Value of the smtpd_helo_restrictions parameter. Default: undef
smtpd_sender_restrictions
String. Value of the smtpd_sender_restrictions parameter. Default: undef
smtpd_recipient_restrictions
String. Value of the smtpd_recipient_restrictions parameter. Default: 'permit_mynetworks, reject_unauth_destination'
smtpd_data_restrictions
String Value of the smtpd_data_restrictions parameter.
Default: 'reject_unauth_pipelining'
Private classes
Class: postfix::cofing
Writes the postfix configuration
Class: postfix::install
Manages the postfix package
Class: postfix::service
Manages the postfix service
Limitations
This has only been tested on CentOS 6 and 7.
Development
Improvements and bug fixes are greatly appreciated. See the contributing guide for information on adding and validating tests for PRs.
Changelog / Contributors
20160111 - v0.9.0 Add newalises class 20160111 - v0.8.1 relay_host should be enabled by default 20160111 - v0.8.0 Remove logging parameter 20140604 - v0.7.0 Remove mail_name from smtpd_banner v0.6.0 20140113 Remove monitoring from module v0.5.0 20131109 Add additional SMTP parameters v0.4.0 20131009 Add support for outbound SMTP auth and TLS Ensure no MTAs present v0.3.0: Limit to IPV4 only v0.2.0: Initial public release
Dependencies
- puppetlabs/stdlib (>=3.2.0 <5.0.0)
Copyright 2013 EvenUp Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.