Puppet Class: ssmtp

Defined in:
manifests/init.pp

Overview

Parameters:

  • root (Any)
  • mailhub (Any) (defaults to: 'mail')
  • port (Any) (defaults to: undef)
  • hostname (Any) (defaults to: undef)
  • usessl (Any) (defaults to: false)
  • usetls (Any) (defaults to: false)
  • usetlscert (Any) (defaults to: false)
  • tlscert (Any) (defaults to: undef)


3
4
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
# File 'manifests/init.pp', line 3

class ssmtp (
  $root,
  $mailhub    = 'mail',
  $port       = undef,
  $hostname   = undef,
  $usessl     = false,
  $usetls     = false,
  $usetlscert = false,
  $tlscert    = undef) {

  include ssmtp::params

  if $port == undef {
    if $usessl == true {
      $_mailhub = "${mailhub}:465"
    } else {
      $_mailhub = $mailhub
    }
  } else {
    $_mailhub = "${mailhub}:${port}"
  }

  package { $ssmtp::params::package: ensure => installed, }

  file { $ssmtp::params::conf:
    ensure  => file,
    require => Package[$ssmtp::params::package],
    content => template('ssmtp/ssmtp.conf.erb'),
  }
}