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.

Examples:

Disable RFC1413 ident requests

class { 'sendmail::mc::timeouts':
  ident => '0',
}

Parameters:

  • aconnect (Optional[String]) (defaults to: undef)

    Timeout for all connection attempts when trying to reach one or multiple hosts for sending a single mail.

  • auth (Optional[String]) (defaults to: undef)

    Timeout when waiting for AUTH negotiation.

  • command (Optional[String]) (defaults to: undef)

    Timeout when waiting for the next SMTP command.

  • connect (Optional[String]) (defaults to: undef)

    Timeout for one connection attempt when trying to establish a network connection. Also see then ‘iconnect` parameter.

  • control (Optional[String]) (defaults to: undef)

    Timout when waiting for a command on the control socket.

  • datablock (Optional[String]) (defaults to: undef)

    Timeout when waiting on a read operation during the DATA phase.

  • datafinal (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment after sending the final dot in the DATA phase.

  • datainit (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the DATA command.

  • fileopen (Optional[String]) (defaults to: undef)

    Timeout when waiting for access to a local file.

  • helo (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the HELO or EHLO commands.

  • hoststatus (Optional[String]) (defaults to: undef)

    Timeout for invalidation of hoststatus information during a single queue run.

  • iconnect (Optional[String]) (defaults to: undef)

    Timeout for the first connection attempt to a host when trying to establish a network connection. Also see then ‘connect` parameter.

  • ident (Optional[String]) (defaults to: undef)

    Timeout when waiting to a response to a RFC1413 identification protocol query. Set this to ‘0` to disable the identification protocol.

  • initial (Optional[String]) (defaults to: undef)

    Timeout when waiting for the initial greeting message.

  • lhlo (Optional[String]) (defaults to: undef)

    Timeout when waiting for the reply to the initial LHLO command on an LMTP connection.

  • mail (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the MAIL command.

  • misc (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of various other commands (VERB, NOOP, …).

  • quit (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the QUIT command.

  • rcpt (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the RCPT command.

  • rset (Optional[String]) (defaults to: undef)

    Timeout when waiting for the acknowledgment of the RSET command.

  • starttls (Optional[String]) (defaults to: undef)

    Timeout when waiting for STARTTLS negotiation.



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),
    }
  }
}