Puppet Class: sendmail::mc::trust_auth_mech

Defined in:
manifests/mc/trust_auth_mech.pp

Summary

Add the `TRUST_AUTH_MECH` macro to the sendmail.mc file.

Overview

Examples:

Activate ‘PLAIN` authentication

class { 'sendmail::mc::trust_auth_mech':
  trust_auth_mech => 'PLAIN',
}

Activate ‘PLAIN` and `DIGEST-MD5` authentication

class { 'sendmail::mc::trust_auth_mech':
  trust_auth_mech => [ 'PLAIN', 'DIGEST-MD5', ],
}

Parameters:

  • trust_auth_mech (Variant[String,Array[String]])

    The value of the ‘TRUST_AUTH_MECH` macro to set. If this is a string it is used as-is. For an array the value will be concatenated into a string.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/mc/trust_auth_mech.pp', line 18

class sendmail::mc::trust_auth_mech (
  Variant[String,Array[String]] $trust_auth_mech,
) {
  include sendmail::mc::macro_section

  $mech = $trust_auth_mech ? {
    Array => join(strip($trust_auth_mech), ' '),
    default => strip($trust_auth_mech),
  }

  concat::fragment { 'sendmail_mc-trust_auth_mech':
    target  => 'sendmail.mc',
    order   => '45',
    content => "TRUST_AUTH_MECH(`${mech}')dnl\n",
  }
}