Puppet Class: lsys::postfix::client

Defined in:
manifests/postfix/client.pp

Summary

Postfix mail client installation

Overview

Postfix mail client installation

Examples:

include lsys::postfix::client

Parameters:

  • relayhost (Optional[Variant[Stdlib::Fqdn, Stdlib::IP::Address]]) (defaults to: undef)

    The next-hop destination(s) for non-local mail; overrides non-local domains in recipient addresses www.postfix.org/postconf.5.html#relayhost



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
# File 'manifests/postfix/client.pp', line 11

class lsys::postfix::client (
  Optional[Variant[Stdlib::Fqdn, Stdlib::IP::Address]] $relayhost = undef,
) {
  if $relayhost {
    $enable_mta = true
  }
  else {
    $enable_mta = false
  }

  class { 'postfix':
    manage_mailx   => false,
    manage_aliases => false,
    mta            => $enable_mta,
    relayhost      => $relayhost,
  }

  contain postfix

  case $facts['os']['family'] {
    'RedHat': {
      # postfix:x:89:
      group { 'postfix':
        ensure => present,
        gid    => 89,
      }
      # postfix:x:89:89::/var/spool/postfix:/sbin/nologin
      user { 'postfix':
        ensure     => present,
        uid        => 89,
        gid        => 'postfix',
        home       => '/var/spool/postfix',
        managehome => false,
        shell      => '/sbin/nologin',
      }
    }
    default: {}
  }
}