aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/mail.pp
blob: c3eda4c4a144e6d57f11049bc61955b5b2c24c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class nodo::subsystem::mail {
  # Email delivery configuration
  $mail_delivery = hiera('nodo::subsystem::mail::delivery', 'exim')
  $munin         = hiera('nodo::host::use_munin', True)

  case $mail_delivery {
    'tunnel': {              
      $mail_hostname = hiera('nodo::subsystem::mail::hostname')
      tunnel::autossh::mail { "$mail_hostname":
        sshport   => hiera('nodo::subsystem::mail::ssh_port'),
      }
    }
    'postfix': { }
    '','exim',default: {
        include exim::tls

        if $munin == true {
          munin::plugin { [ 'exim_mailqueue', 'exim_mailstats' ]:
            ensure => present,
            config => 'user Debian-exim',
          }
        }
     }
  }
}