README.md 5.37 KB
Newer Older
Raphaël Pinson's avatar
Update  
Raphaël Pinson committed
1
# Postfix Puppet Module
2

Raphaël Pinson's avatar
Raphaël Pinson committed
3 4
[![Puppet Forge Version](http://img.shields.io/puppetforge/v/camptocamp/postfix.svg)](https://forge.puppetlabs.com/camptocamp/postfix)
[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/camptocamp/postfix.svg)](https://forge.puppetlabs.com/camptocamp/postfix)
Raphaël Pinson's avatar
Update  
Raphaël Pinson committed
5
[![Build Status](https://img.shields.io/travis/camptocamp/puppet-postfix/master.svg)](https://travis-ci.org/camptocamp/puppet-postfix)
Raphaël Pinson's avatar
Raphaël Pinson committed
6 7
[![Gemnasium](https://img.shields.io/gemnasium/camptocamp/puppet-postfix.svg)](https://gemnasium.com/camptocamp/puppet-postfix)
[![By Camptocamp](https://img.shields.io/badge/by-camptocamp-fb7047.svg)](http://www.camptocamp.com)
8

Raphaël Pinson's avatar
Raphaël Pinson committed
9 10
This module requires Augeas.

11 12 13 14 15 16
## Simple usage

    include postfix

    postfix::config { "relay_domains": value  => "localhost host.foo.com" }

Simon Séhier's avatar
Simon Séhier committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
## Exec paths

In order to not have any path problem, you should add the following line in
some globally included .pp file:

    Exec {
      path => '/some/relevant/path:/some/other:...',
    }

For example:

    Exec {
      path => '/bin:/sbin:/usr/sbin:/usr/bin',
    }

32 33
## Classes

Raphaël Pinson's avatar
Doc  
Raphaël Pinson committed
34 35 36
### postfix

The top-level class, to install and configure Postfix.
37

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
#### Parameters

##### `alias_maps`

A string defining the location of that alias map file.
Default: 'hash:/etc/aliases'

##### `inet_interfaces`

A string defining the network interfaces that Postfix will listen on.
Default: 'all'
Example: '127.0.0.1, [::1]'

##### `ldap`

A boolean defining whether to configure Postfix for LDAP use.
Default: false

##### `ldap_base`

A string defining the LDAP search base to use. This maps to the search_base parameter (ldap_table(5)). 
Default: Undefined. 
Example 'cn=Users,dc=example,dc=com'

##### `ldap_host`

A string defining the LDAP host. This maps to the server_host parameter (ldap_table(5)).
Default: Undefined.
Example: 'ldaps://ldap.example.com:636 ldap://ldap2.example.com'

##### `ldap_options`

A 
Default: Undefined.
Example: 

##### `mail_user`

A string defining the mail user, and optionally group, to execute external commands as. This maps to the user parameter (pipe(8)).
Default: 'vmail'.
Example: 'vmail:vmail'

##### `mailman`

A boolean defining whether to configure a basic smtp server that is able to work for the mailman mailing list manager.
Default: false.

##### `maincf_source`

A string defining the location of a skeleton main.cf file to be used. The default file supplied is blank. However, if the main.cf file already exists on the system the contents will NOT be replaced by the contents from maincf_source.
Default: "puppet:///modules/${module_name}/main.cf"
Example: "puppet:///modules/some/other/location/main.cf"

##### `manage_conffiles`

A boolean defining whether the puppet module should replace the configuration files for postfix. 
This setting currently effects the following files:
* /etc/mailname
* /etc/postfix/master.cf
This setting does NOT effect the following files:
* /etc/aliases
* /etc/postfix/main.cf

Default: true.

Erinn Looney-Triggs's avatar
Erinn Looney-Triggs committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
##### `mastercf_source`
A string defining the location of a skeleton master.cf file to be used.
Default: Undefined.
Example: "puppet:///modules/some/other/location/master.cf"

##### `master_smtp`
A string to define the smtp line in the /etc/postfix/master.cf file.
Default: Undefined.
Example: 'smtp      inet  n       -       n       -       -       smtpd'

##### `master smtps`
A string to define the smtps line in the /etc/postfix/master.cf file.
Default: Undefined.
Example: 'smtps     inet  n       -       n       -       -       smtpd'

##### `master_submission`
A string to define the submission line in the /etc/postfix/master.cf file.
Default: Undefined.
Example: 'submission inet n       -       n       -       -       smtpd'

##### `mta`
A boolean to define whether to configure Postfix as a mail transfer agent. This option is mutually exclusive with the satellite boolean.
Default: False.

##### `mydestination`
A string to define the mydestination parameter in main.cf (postconf(5)).
Default: The systems FQDN.
Example: 'example.com, foo.example.com'

##### `mynetworks`
A string to define the mynetworks parameter that holds trusted remote smtp clients (postconf(5)).
Default: '127.0.0.0/8'
Example: '127.0.0.0/8, [::1]/128'

##### `myorigin`
A string to define the myorigin parameter that holds the domain name that mail appears to come from (postconf(5)).
Default: The systems FQDN.
Example: 'example.com'

##### `relayhost`
A string to define the relayhost parameter (postconf(5)).
Default: Undefined.
Example: 'smtp.example.com'

##### `root_mail_recipient`
A string to define the e-mail address to which all mail directed to root should go (aliases(5)).
Default: 'nobody'
Example: 'root_catch@example.com'

##### `satellite`
A boolean to define whether to configure postfix as a sattellite relay host. This setting is mutually exclusive with the mta boolean.
Default: False.

##### `smtp_listen`
A string to define the IP on which to listen in the master.cf. This can also be set to 'all' to listen on all interfaces.
Default: '127.0.0.1'
Example: '::1'

##### `use_amavisd`
A boolean to define whether to configure postfix to use the amavisd scanner.
Default: False.

165

166 167
## Definitions

Raphaël Pinson's avatar
Doc  
Raphaël Pinson committed
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
### postfix::config

Add/alter/remove options in Postfix main configuration file (main.cf)

### postfix::hash

Creates Postfix hashed "map" files, and build the corresponding db file.

### postfix::transport

Manages content in the transport map.

### postfix::virtual

Manages content in the virtual map.
183 184