Puppet Class: postfix

Inherits:
postfix::params
Defined in:
manifests/init.pp

Overview

Parameters:

  • server_type (Any) (defaults to: 'satellite')
  • myhostname (Any) (defaults to: $::hostname)
  • mydomain (Any) (defaults to: $::domain)
  • myorigin (Any) (defaults to: $::fqdn)
  • mydestination (Any) (defaults to: $::fqdn)
  • mynetworks_style (Any) (defaults to: '')
  • mynetworks (Any) (defaults to: [])
  • access (Any) (defaults to: [])
  • transport_maps (Any) (defaults to: [])
  • listen (Any) (defaults to: 'localhost')
  • relayhost (Any) (defaults to: undef)
  • relay_domains (Any) (defaults to: [])
  • relay_recipients (Any) (defaults to: [])
  • message_size_limit (Any) (defaults to: '15M')
  • ssl (Any) (defaults to: false)
  • certhostname (Any) (defaults to: $::fqdn)
  • root_destination (Any) (defaults to: "root@${::domain}")
  • smtpd_timeout (Any) (defaults to: '300')
  • smtpd_error_sleep_time (Any) (defaults to: '5')


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'manifests/init.pp', line 3

class postfix (
  $server_type            = 'satellite',
  $myhostname             = $::hostname,
  $mydomain               = $::domain,
  $myorigin               = $::fqdn,
  $mydestination          = $::fqdn,
  $mynetworks_style       = '',
  $mynetworks             = [],
  $access                 = [],
  $transport_maps         = [],
  $listen                 = 'localhost',
  $relayhost              = undef,
  $relay_domains          = [],
  $relay_recipients       = [],
  $message_size_limit     = '15M',
  $ssl                    = false,
  $certhostname           = $::fqdn,
  $root_destination       = "root@${::domain}",
  $smtpd_timeout          = '300',
  $smtpd_error_sleep_time = '5') inherits postfix::params {
  validate_re($server_type, '^(satellite|mxbackup|mx0)$', "${$server_type} is not supported for \$server_type.\nValid values are satellite or mxbackup."
  )
  validate_array($mynetworks)
  validate_array($access)
  validate_array($transport_maps)
  validate_array($relay_domains)
  validate_array($relay_recipients)
  validate_bool($ssl)

  class { '::postfix::install': } ->
  class { '::postfix::config':
    server_type            => $server_type,
    myhostname             => $myhostname,
    mydomain               => $mydomain,
    myorigin               => $myorigin,
    mydestination          => $mydestination,
    mynetworks_style       => $mynetworks_style,
    mynetworks             => $mynetworks,
    access                 => $access,
    transport_maps         => $transport_maps,
    listen                 => $listen,
    relayhost              => $relayhost,
    relay_domains          => $relay_domains,
    relay_recipients       => $relay_recipients,
    message_size_limit     => $message_size_limit,
    ssl                    => $ssl,
    certhostname           => $certhostname,
    root_destination       => $root_destination,
    smtpd_timeout          => $smtpd_timeout,
    smtpd_error_sleep_time => $smtpd_error_sleep_time
  } ~>
  class { '::postfix::service': }
}