Puppet Class: postfix::satellite

Defined in:
manifests/satellite.pp

Summary

Configure Postfix as satellite

Overview

Parameters:

  • mydestination (Any) (defaults to: undef)
  • mynetworks (Any) (defaults to: undef)
  • relayhost (Any) (defaults to: undef)
  • masquerade_classes (Any) (defaults to: undef)
  • masquerade_domains (Any) (defaults to: undef)
  • masquerade_exceptions (Any) (defaults to: undef)


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
# File 'manifests/satellite.pp', line 5

class postfix::satellite (
  $mydestination = undef,
  $mynetworks    = undef,
  $relayhost     = undef,
  $masquerade_classes    = undef,
  $masquerade_domains    = undef,
  $masquerade_exceptions = undef,
) {
  assert_private()
  include postfix

  assert_type(Pattern[/^\S+$/], $postfix::myorigin)

  $_mydestination = pick($mydestination, $postfix::mydestination)
  $_mynetworks = pick($mynetworks, $postfix::mynetworks)
  $_relayhost = pick($relayhost, $postfix::relayhost)
  $_masquerade_classes    = $masquerade_classes.lest || { $postfix::masquerade_classes }
  $_masquerade_domains    = $masquerade_domains.lest || { $postfix::masquerade_domains }
  $_masquerade_exceptions = $masquerade_exceptions.lest || { $postfix::masquerade_exceptions }

  class { 'postfix::mta':
    mydestination         => $_mydestination,
    mynetworks            => $_mynetworks,
    relayhost             => $_relayhost,
    masquerade_classes    => $_masquerade_classes,
    masquerade_domains    => $_masquerade_domains,
    masquerade_exceptions => $_masquerade_exceptions,
  }

  postfix::virtual { "@${postfix::myorigin}":
    ensure      => 'present',
    destination => 'root',
  }
}