Puppet Class: sendmail::mc::timeouts
- Defined in:
- manifests/mc/timeouts.pp
Summary
Manage various timeout settings in the 'sendmail.mc' file.Overview
This class allows setting various timeouts for Sendmail without having to use the ‘sendmail::mc::define` macro individually for each entry.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'manifests/mc/timeouts.pp', line 70
class sendmail::mc::timeouts (
Optional[String] $aconnect = undef,
Optional[String] $auth = undef,
Optional[String] $command = undef,
Optional[String] $connect = undef,
Optional[String] $control = undef,
Optional[String] $datablock = undef,
Optional[String] $datafinal = undef,
Optional[String] $datainit = undef,
Optional[String] $fileopen = undef,
Optional[String] $helo = undef,
Optional[String] $hoststatus = undef,
Optional[String] $iconnect = undef,
Optional[String] $ident = undef,
Optional[String] $initial = undef,
Optional[String] $lhlo = undef,
Optional[String] $mail = undef,
Optional[String] $misc = undef,
Optional[String] $quit = undef,
Optional[String] $rcpt = undef,
Optional[String] $rset = undef,
Optional[String] $starttls = undef,
) {
$sparse_timeouts = {
'ACONNECT' => $aconnect,
'AUTH' => $auth,
'COMMAND' => $command,
'CONNECT' => $connect,
'CONTROL' => $control,
'DATABLOCK' => $datablock,
'DATAFINAL' => $datafinal,
'DATAINIT' => $datainit,
'FILEOPEN' => $fileopen,
'HELO' => $helo,
'HOSTSTATUS' => $hoststatus,
'ICONNECT' => $iconnect,
'IDENT' => $ident,
'INITIAL' => $initial,
'LHLO' => $lhlo,
'MAIL' => $mail,
'MISC' => $misc,
'QUIT' => $quit,
'RCPT' => $rcpt,
'RSET' => $rset,
'STARTTLS' => $starttls,
}
# Remove unset options
$timeouts = $sparse_timeouts.filter |$key,$val| { !empty($val) }
if ($timeouts and !empty($timeouts)) {
$params = {
'timeouts' => $timeouts.map |$key,$val| { "`confTO_${key}', `${val}'" },
}
concat::fragment { 'sendmail_mc-timeouts':
target => 'sendmail.mc',
order => '16',
content => epp('sendmail/timeouts.m4.epp', $params),
}
}
}
|