Defined Type: postfix::master

Defined in:
manifests/master.pp

Overview

Define additional Postfix services.

Examples:

Define the Dovecot LDA service

include postfix
postfix::master { 'dovecot/unix':
  chroot       => 'n',
  command      => 'pipe flags=DRhu user=vmail:vmail argv=/path/to/dovecot-lda -f ${sender} -d ${recipient}',
  unprivileged => 'n',
  require      => Class['dovecot'],
}

Parameters:

  • command (String)
  • service (Pattern[/(?x) ^ [^\/]+ \/ (?:inet|unix(?:-dgram)?|fifo|pass) $/]) (defaults to: $title)
  • ensure (Enum['present', 'absent']) (defaults to: 'present')
  • private (Optional[Enum['-', 'n', 'y']]) (defaults to: undef)
  • unprivileged (Optional[Enum['-', 'n', 'y']]) (defaults to: undef)
  • chroot (Optional[Enum['-', 'n', 'y']]) (defaults to: undef)
  • wakeup (Optional[Pattern[/(?x) ^ (?: - | \d+ [?]? ) $/]]) (defaults to: undef)
  • limit (Optional[Pattern[/(?x) ^ (?: - | \d+ ) $/]]) (defaults to: undef)

See Also:

Since:

  • 1.0.0



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

define postfix::master (
  String                                                           $command,
  Pattern[/(?x) ^ [^\/]+ \/ (?:inet|unix(?:-dgram)?|fifo|pass) $/] $service      = $title,
  Enum['present', 'absent']                                        $ensure       = 'present',
  Optional[Enum['-', 'n', 'y']]                                    $private      = undef,
  Optional[Enum['-', 'n', 'y']]                                    $unprivileged = undef,
  Optional[Enum['-', 'n', 'y']]                                    $chroot       = undef,
  Optional[Pattern[/(?x) ^ (?: - | \d+ [?]? ) $/]]                 $wakeup       = undef,
  Optional[Pattern[/(?x) ^ (?: - | \d+ ) $/]]                      $limit        = undef,
) {

  include postfix

  postfix_master { $service:
    ensure       => $ensure,
    command      => $command,
    private      => $private,
    unprivileged => $unprivileged,
    chroot       => $chroot,
    wakeup       => $wakeup,
    limit        => $limit,
    target       => "${postfix::conf_dir}/master.cf",
    require      => Class['postfix::config'],
    notify       => Class['postfix::service'],
  }
}