satellite.pp 847 Bytes
Newer Older
1
2
#
# == Class: postfix::satellite
3
4
5
#
# This class configures all local email (cron, mdadm, etc) to be forwarded
# to $root_mail_recipient, using $postfix_relayhost as a relay.
6
#
7
8
9
# $valid_fqdn can be set to override $fqdn in the case where the FQDN is
# not recognized as valid by the destination server.
#
10
11
# Parameters:
# - *valid_fqdn*
12
# - every global variable which works for class 'postfix' will work here.
13
14
#
# Example usage:
15
#
16
17
18
19
#   node 'toto.local.lan' {
#     $postfix_relayhost = 'mail.example.com'
#     $valid_fqdn = 'toto.example.com'
#     $root_mail_recipient = 'the.sysadmin@example.com'
20
#
21
22
#     include postfix::satellite
#   }
23
#
Francois Deppierraz's avatar
Francois Deppierraz committed
24
class postfix::satellite {
25

26
  validate_re($postfix::myorigin, '^\S+$')
27

28
  include ::postfix::mta
29

30
  postfix::virtual { "@${postfix::myorigin}":
31
    ensure      => present,
32
    destination => 'root',
33
34
  }
}