Skip to content

Latest commit

 

History

History
3750 lines (2331 loc) · 90.6 KB

REFERENCE.md

File metadata and controls

3750 lines (2331 loc) · 90.6 KB

Reference

Table of Contents

Classes

Public Classes

Private Classes

  • sendmail::aliases::newaliases: Rebuild the Sendmail aliases file.
  • sendmail::local_host_names: Manage entries in the Sendmail local-host-names file.
  • sendmail::mc: Manage the sendmail.mc file
  • sendmail::mc::define_section: Add a section header to improve readability of the config file
  • sendmail::mc::enhdnsbl_section: Add a section header to improve readability of the config file
  • sendmail::mc::feature_section: Add a section header to improve readability of the config file
  • sendmail::mc::ldap_section: Add a section header above the ldap settings
  • sendmail::mc::local_config_section: Add a section header to improve readability of the config file
  • sendmail::mc::macro_section: Add a section header to improve readability of the config file
  • sendmail::mc::mailer_section: Add a section header to improve readability of the config file
  • sendmail::mc::milter_section: Add a section header to improve readability of the config file
  • sendmail::mc::queue_group_section: Add a section header to improve readability of the config file
  • sendmail::mc::starttls: Manage STARTTLS parameters in the 'sendmail.mc' file.
  • sendmail::package: Manage the Sendmail MTA package.
  • sendmail::params: The parameters used when setting up the Sendmail MTA.
  • sendmail::relay_domains: Manage entries in the Sendmail relay-domains file.
  • sendmail::service: Manage the Sendmail service.
  • sendmail::submit: Manage the submit.mc file for the Sendmail submission program.
  • sendmail::trusted_users: Manage entries in the Sendmail trusted-users file.

Defined types

Functions

Data types

Classes

sendmail

Perform the basic setup and installation of Sendmail on the system.

Examples

class { 'sendmail': }

Parameters

The following parameters are available in the sendmail class:

smart_host

Data type: Optional[String]

Servers that are behind a firewall may not be able to deliver mail directly to the outside world. In this case the host may need to forward the mail to the gateway machine defined by this parameter. All nonlocal mail is forwarded to this gateway.

Default value: undef

domain_name

Data type: Optional[String]

Sets the official canonical name of the local machine. Normally this parameter is not required as Sendmail uses the fully qualified domain name by default. Setting this parameter will override the value of the $j macro in the sendmail.cf file.

Default value: undef

max_message_size

Data type: Optional[String]

Define the maximum message size that will be accepted. This can be a pure numerical value given in bytes (e.g. 33554432) or a number with a prefixed byte unit (e.g. 32MB). The conversion is done using the 1024 convention (see the to_bytes function in the stdlib module), so valid prefixes are either k for 1024 bytes or M for 1048576 bytes.

Default value: undef

log_level

Data type: Optional[Sendmail::Loglevel]

The loglevel for the sendmail process. Valid options: a numeric value.

Default value: undef

dont_probe_interfaces

Data type: Optional[Boolean]

Sendmail normally probes all network interfaces to get the hostnames that the server may have. These hostnames are then considered local. This option can be used to prevent the reverse lookup of the network addresses. If this option is set to localhost then all network interfaces except for the loopback interface is probed. Valid options: the strings true, false or localhost.

Default value: undef

features

Data type: Hash[String,Data]

A hash of features to include in the configuration. Each hash key should be a feature name while the value should be a hash itself. The value hash is used as parameters for the sendmail::mc::feature defined type. Check the documentation of this type for details.

Some features (e.g. mailertable, access_db, ...) may need to be managed individually. So the mailertable feature could be enabled using this parameter but that does not manage the mailertable file itself. So in addition you would have to use the sendmail::mailertable class or the sendmail::mailertable::entry defined type.

Default value: {}

enable_ipv4_daemon

Data type: Boolean

Should the host accept mail on all IPv4 network adresses. Valid options: true or false.

Default value: true

enable_ipv6_daemon

Data type: Boolean

Should the host accept mail on all IPv6 network adresses. Valid options: true or false.

Default value: true

mailers

Data type: Array[String]

An array of mailers to add to the configuration. The default is [ 'smtp', 'local' ].

Default value: $sendmail::params::mailers

local_host_names

Data type: Array[String]

An array of hostnames that Sendmail considers for a local delivery.

Default value: [$facts['networking']['fqdn']]

relay_domains

Data type: Array[String]

An array of domains that Sendmail accepts as relay target. This setting is required for secondary MX setups.

Default value: []

trusted_users

Data type: Array[String]

An array of user names that will be written into the trusted users file. Leading or trailing whitespace is ignored. Empty entries are also ignored.

Default value: []

trust_auth_mech

Data type: Optional[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.

Default value: undef

ca_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL CA certificate.

Default value: undef

ca_cert_path

Data type: Optional[Stdlib::Absolutepath]

The directory where SSL CA certificates are kept.

Default value: undef

server_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL server certificate for inbound connections.

Default value: undef

server_key_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL server key for inbound connections.

Default value: undef

client_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL client certificate for outbound connections.

Default value: undef

client_key_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL client key for outbound connections.

Default value: undef

server_cert_file2

Data type: Optional[Stdlib::Absolutepath]

The filename of the secondary SSL server certificate for inbound connections. The parameter is only valid on Sendmail 8.15.1 or later and when server_cert_file is set.

Default value: undef

server_key_file2

Data type: Optional[Stdlib::Absolutepath]

The filename of the secondary SSL server key for inbound connections. The parameter is only valid on Sendmail 8.15.1 or later and when server_key_file is set.

Default value: undef

client_cert_file2

Data type: Optional[Stdlib::Absolutepath]

The filename of the secondary SSL client certificate for outbound connections. The parameter is only valid on Sendmail 8.15.1 or later and when client_cert_file is set.

Default value: undef

client_key_file2

Data type: Optional[Stdlib::Absolutepath]

The filename of the secondary SSL client key for outbound connections. The parameter is only valid on Sendmail 8.15.1 or later and when client_key_file is set.

Default value: undef

crl_file

Data type: Optional[Stdlib::Absolutepath]

The filename with a list of revoked certificates.

Default value: undef

dh_params

Data type: Optional[Sendmail::DHParam]

The DH parameters used for encryption. This can be one of the numbers 512, 1024, 2048 or a filename with generated parameters.

Default value: undef

tls_srv_options

Data type: Optional[Enum['V','']]

The parameter adjusts the server TLS settings. This can currently be either the letter V or the empty string. Setting this parameter to V disables the request for a client certificate.

Default value: undef

cipher_list

Data type: Optional[String]

Set the available ciphers for encrypted connections.

Default value: undef

server_ssl_options

Data type: Optional[String]

Configure the SSL connection flags for inbound connections.

Default value: undef

client_ssl_options

Data type: Optional[String]

Configure the SSL connection flags for outbound connections.

Default value: undef

cf_version

Data type: Optional[String]

The configuration version string for Sendmail. This string will be appended to the Sendmail version in the HELO message. If unset, no configuration version will be used.

Default value: undef

version_id

Data type: Optional[String]

The version id string included in the sendmail.mc file. This has no practical meaning other than having a used defined identifier in the file.

Default value: undef

msp_host

Data type: String

The host where the message submission program should deliver to. This can be a hostname or IP address. To prevent MX lookups for the host, put it in square brackets (e.g., [hostname]). Delivery to the local host would therefore use either [127.0.0.1] for IPv4 or [IPv6:::1] for IPv6.

Default value: '[127.0.0.1]'

msp_port

Data type: Pattern[/^(MSA)|([0-9]+)$/]

The port used for the message submission program. Can be a port number (e.g., 25) or the literal MSA for delivery to the message submission agent on port 587.

Default value: 'MSA'

enable_msp_trusted_users

Data type: Boolean

Whether the trusted users file feature is enabled for the message submission program. This may be necessary if you want to allow certain users to change the sender address using sendmail -f. Valid options: true or false.

Default value: false

manage_sendmail_mc

Data type: Boolean

Whether to automatically manage the sendmail.mc file. Valid options: true or false.

Default value: true

manage_submit_mc

Data type: Boolean

Whether to automatically manage the submit.mc file. Valid options: true or false.

Default value: true

auxiliary_packages

Data type: Array[String]

Additional packages that will be installed by the Sendmail module. Valid options: array of strings. The default varies by operating system.

Default value: $sendmail::params::auxiliary_packages

package_ensure

Data type: String

Configure whether the Sendmail package should be installed, and what version. Valid options: present, latest, or a specific version number.

Default value: 'present'

package_manage

Data type: Boolean

Configure whether Puppet should manage the Sendmail package(s). Valid options: true or false.

Default value: $sendmail::params::package_manage

service_name

Data type: String

The service name to use on this operating system.

Default value: $sendmail::params::service_name

service_enable

Data type: Boolean

Configure whether the Sendmail MTA should be enabled at boot. Valid options: true or false.

Default value: true

service_manage

Data type: Boolean

Configure whether Puppet should manage the Sendmail service. Valid options: true or false.

Default value: true

service_ensure

Data type: Stdlib::Ensure::Service

Configure whether the Sendmail service should be running. Valid options: running or stopped.

Default value: 'running'

service_hasstatus

Data type: Boolean

Define whether the service type can rely on a functional status. Valid options: true or false.

Default value: true

sendmail::access

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

This class is only used to manage the access db file. You will also need to enable the access_db feature using sendmail::mc::feature to tell Sendmail to actually use the file.

Examples

Manage the access database using hiera
class { 'sendmail::access': }
Manage the access database using the given file
class { 'sendmail::access':
  source => 'puppet:///modules/sendmail/access',
}

Parameters

The following parameters are available in the sendmail::access class:

content

Data type: Optional[String]

The desired contents of the access file. This allows managing the access file as a whole. Changes to the file automatically triggers a rebuild of the access database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the access file. This allows managing the access file as a whole. Changes to the file automatically triggers a rebuild of the access database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::access::entry resources. The class can be used to create access entries defined in hiera. The hiera hash should look like this:

sendmail::access::entries:
  'example.com':
    value: 'OK'
  'example.org':
    value: 'REJECT'

Default value: {}

sendmail::access::file

Manage the Sendmail access db file.

Examples

class { 'sendmail::access::file': }

Parameters

The following parameters are available in the sendmail::access::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::aliases

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Examples

Set up aliases using a configuration from hiera
class { 'sendmail::aliases': }
Set up aliases using the given file
class { 'sendmail::aliases':
  source => 'puppet:///modules/sendmail/aliases',
}

Parameters

The following parameters are available in the sendmail::aliases class:

content

Data type: Optional[String]

The desired contents of the aliases file. This allows managing the aliases file as a whole. Changes to the file automatically triggers a rebuild of the aliases database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the aliases file. This allows managing the aliases file as a whole. Changes to the file automatically triggers a rebuild of the aliases database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::aliases::entry resources. This attribute is mutually exclusive with content and source. The class can be used to create aliases defined in hiera. The hiera hash should look like this:

sendmail::aliases::entries:
  'fred':
    recipient: '[email protected]'

Default value: {}

sendmail::aliases::file

Create the Sendmail aliases file.

Examples

class { 'sendmail::aliases::file': }

Parameters

The following parameters are available in the sendmail::aliases::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::authinfo

Manage the Sendmail authinfo db file.

Examples

class { 'sendmail::authinfo': }

class { 'sendmail::authinfo':
  source => 'puppet:///modules/sendmail/authinfo',
}

Parameters

The following parameters are available in the sendmail::authinfo class:

content

Data type: Optional[String]

The desired contents of the authinfo file. This allows managing the authinfo file as a whole. Changes to the file automatically triggers a rebuild of the authinfo database file. This attribute is mutually exclusive with source.

Default value: undef

source

Data type: Optional[String]

A source file for the authinfo file. This allows managing the authinfo file as a whole. Changes to the file automatically triggers a rebuild of the authinfo database file. This attribute is mutually exclusive with content.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::authinfo::entry resources. This class can be used to create authinfo entries defined in hiera. The hiera hash should look like this:

sendmail::authinfo::entries:
  'AuthInfo:example.com':
    value: '"U=auth" "P=secret"'
  'AuthInfo:192.168.67.89':
    value: '"U=fred" "P=wilma"'

Default value: {}

sendmail::authinfo::file

Create the Sendmail authinfo db file.

Examples

class { 'sendmail::authinfo::file': }

Parameters

The following parameters are available in the sendmail::authinfo::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::domaintable

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Examples

Manage the domaintable using hiera
class { 'sendmail::domaintable': }
Manage the domaintable using the given file
class { 'sendmail::domaintable':
  source => 'puppet:///modules/sendmail/domaintable',
}

Parameters

The following parameters are available in the sendmail::domaintable class:

content

Data type: Optional[String]

The desired contents of the domaintable file. This allows managing the domaintable file as a whole. Changes to the file automatically triggers a rebuild of the domaintable database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the domaintable file. This allows managing the domaintable file as a whole. Changes to the file automatically triggers a rebuild of the domaintable database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::domaintable::entry resources. This class can be used to create domaintable entries defined in hiera. The hiera hash should look like this:

sendmail::domaintable::entries:
  'example.com':
    value: 'example.org'
  'example.net':
    value: 'example.org'

Default value: {}

sendmail::domaintable::file

Manage the Sendmail domaintable db file.

Examples

class { 'sendmail::domaintable::file': }

Parameters

The following parameters are available in the sendmail::domaintable::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::genericstable

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Use the sendmail::mc::generics_domain type to configure the domains for which non-local user addresses should be rewritten.

Examples

Manage the generictable using hiera
class { 'sendmail::genericstable': }
Manage the generictable using the provided file
class { 'sendmail::genericstable':
  source => 'puppet:///modules/sendmail/genericstable',
}

Parameters

The following parameters are available in the sendmail::genericstable class:

content

Data type: Optional[String]

The desired contents of the genericstable file. This allows managing the genericstable file as a whole. Changes to the file automatically triggers a rebuild of the genericstable database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the genericstable file. This allows managing the genericstable file as a whole. Changes to the file automatically triggers a rebuild of the genericstable database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::genericstable::entry resources. This class can be used to create genericstable entries defined in hiera. The hiera hash should look like this:

sendmail::genericstable::entries:
  '[email protected]':
    value: '[email protected]'
  'barney':
    value: '[email protected]'

Default value: {}

sendmail::genericstable::file

Manage the Sendmail genericstable db file.

Examples

class { 'sendmail::genericstable::file': }

Parameters

The following parameters are available in the sendmail::genericstable::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::mailertable

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Examples

Manage the mailertable using hiera
class { 'sendmail::mailertable': }
Manage the mailertable using the provided file
class { 'sendmail::mailertable':
  source => 'puppet:///modules/sendmail/mailertable',
}

Parameters

The following parameters are available in the sendmail::mailertable class:

content

Data type: Optional[String]

The desired contents of the mailertable file. This allows managing the mailertable file as a whole. Changes to the file automatically triggers a rebuild of the mailertable database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the mailertable file. This allows managing the mailertable file as a whole. Changes to the file automatically triggers a rebuild of the mailertable database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::mailertable::entry resources. This class can be used to create mailertable entries defined in hiera. The hiera hash should look like this:

sendmail::mailertable::entries:
  '.example.com':
    value: 'smtp:relay.example.com'
  'www.example.org':
    value: 'relay:relay.example.com'
  '.example.net':
    value: 'error:5.7.0:550 mail is not accepted'

Default value: {}

sendmail::mailertable::file

Manage the Sendmail mailertable db file.

Examples

class { 'sendmail::mailertable::file': }

Parameters

The following parameters are available in the sendmail::mailertable::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::makeall

Rebuild all config files for the Sendmail MTA using a Makefile

sendmail::mc::privacy_flags

Each option is enabled by setting the associated boolean parameter to true. See the Sendmail documentation for the meaning of the flags.

Examples

Enable two specific privacy flags
class { 'sendmail::mc::privacy_flags':
  goaway => true,
  noetrn => true,
}

Parameters

The following parameters are available in the sendmail::mc::privacy_flags class:

authwarnings

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

goaway

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

needexpnhelo

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

needmailhelo

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

needvrfyhelo

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

noactualrecipient

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

nobodyreturn

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

noetrn

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

noexpn

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

noreceipts

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

noverb

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

novrfy

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

public

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

restrictexpand

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

restrictmailq

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

restrictqrun

Data type: Boolean

Whether the privacy option of the same name should be enabled. Valid options: true or false.

Default value: false

sendmail::mc::timeouts

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

The following parameters are available in the sendmail::mc::timeouts class:

aconnect

Data type: Optional[String]

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

Default value: undef

auth

Data type: Optional[String]

Timeout when waiting for AUTH negotiation.

Default value: undef

command

Data type: Optional[String]

Timeout when waiting for the next SMTP command.

Default value: undef

connect

Data type: Optional[String]

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

Default value: undef

control

Data type: Optional[String]

Timout when waiting for a command on the control socket.

Default value: undef

datablock

Data type: Optional[String]

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

Default value: undef

datafinal

Data type: Optional[String]

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

Default value: undef

datainit

Data type: Optional[String]

Timeout when waiting for the acknowledgment of the DATA command.

Default value: undef

fileopen

Data type: Optional[String]

Timeout when waiting for access to a local file.

Default value: undef

helo

Data type: Optional[String]

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

Default value: undef

hoststatus

Data type: Optional[String]

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

Default value: undef

iconnect

Data type: Optional[String]

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

Default value: undef

ident

Data type: Optional[String]

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

Default value: undef

initial

Data type: Optional[String]

Timeout when waiting for the initial greeting message.

Default value: undef

lhlo

Data type: Optional[String]

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

Default value: undef

mail

Data type: Optional[String]

Timeout when waiting for the acknowledgment of the MAIL command.

Default value: undef

misc

Data type: Optional[String]

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

Default value: undef

quit

Data type: Optional[String]

Timeout when waiting for the acknowledgment of the QUIT command.

Default value: undef

rcpt

Data type: Optional[String]

Timeout when waiting for the acknowledgment of the RCPT command.

Default value: undef

rset

Data type: Optional[String]

Timeout when waiting for the acknowledgment of the RSET command.

Default value: undef

starttls

Data type: Optional[String]

Timeout when waiting for STARTTLS negotiation.

Default value: undef

sendmail::mc::trust_auth_mech

Add the TRUST_AUTH_MECH macro to the sendmail.mc file.

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

The following parameters are available in the sendmail::mc::trust_auth_mech class:

trust_auth_mech

Data type: 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.

sendmail::nullclient

No mail can be received from the outside since the Sendmail daemon only listens on the localhost address 127.0.0.1. All local mail is forwarded to a given mail hub.

This is a convenience class to make the configuration simple. Internally it declares the sendmail class using appropriate parameters. Normally no other configuration should be necessary.

Examples

Create a nullclient config forwarding to a given hub
class { 'sendmail::nullclient':
  mail_hub => '[192.168.1.1]',
}

Parameters

The following parameters are available in the sendmail::nullclient class:

mail_hub

Data type: String

The hostname or IP address of the mail hub where all mail is forwarded to. It can be enclosed in brackets to prevent MX lookups.

port

Data type: Pattern[/^[0-9]+$/]

The port used for the local message submission agent.

Default value: '587'

port_option_modify

Data type: Optional[Pattern[/^[abcfhruACEOS]*$/]]

Port option modifiers for the local message submission agent. The parameter is used to set the daemon_port_options. A useful value for the nullclient configuration might be S to prevent offering STARTTLS on the MSA port.

Default value: undef

enable_ipv4_msa

Data type: Boolean

Enable the local message submission agent on the IPv4 loopback address (127.0.0.1). Valid options: true or false.

Default value: true

enable_ipv6_msa

Data type: Boolean

Enable the local message submission agent on the IPv6 loopback address (::1). Valid options: true or false.

Default value: true

enable_msp_trusted_users

Data type: Boolean

Whether the trusted users file feature is enabled for the message submission program. This may be necessary if you want to allow certain users to change the sender address using sendmail -f. Valid options: true or false.

Default value: false

trusted_users

Data type: Array[String]

An array of user names that will be written into the trusted users file. Leading or trailing whitespace is ignored. Empty entries are also ignored.

Default value: []

domain_name

Data type: Optional[String]

Sets the official canonical name of the local machine. Normally this parameter is not required as Sendmail uses the fully qualified domain name by default. Setting this parameter will override the value of the $j macro in the sendmail.cf file.

Default value: undef

max_message_size

Data type: Optional[Sendmail::Messagesize]

Define the maximum message size that will be accepted. This can be a pure numerical value given in bytes (e.g. 33554432) or a number with a prefixed byte unit (e.g. 32MB). The conversion is done using the 1024 convention (see the to_bytes function in the stdlib module), so valid prefixes are either k for 1024 bytes or M for 1048576 bytes.

Default value: undef

log_level

Data type: Optional[Sendmail::Loglevel]

The loglevel for the sendmail process. Valid options: a numeric value.

Default value: undef

ca_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL CA certificate.

Default value: undef

ca_cert_path

Data type: Optional[Stdlib::Absolutepath]

The directory where SSL CA certificates are kept.

Default value: undef

server_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL server certificate for inbound connections.

Default value: undef

server_key_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL server key for inbound connections.

Default value: undef

client_cert_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL client certificate for outbound connections.

Default value: undef

client_key_file

Data type: Optional[Stdlib::Absolutepath]

The filename of the SSL client key for outbound connections.

Default value: undef

crl_file

Data type: Optional[Stdlib::Absolutepath]

The filename with a list of revoked certificates.

Default value: undef

dh_params

Data type: Optional[Sendmail::DHParam]

The DH parameters used for encryption. This can be one of the numbers 512, 1024, 2048 or a filename with generated parameters.

Default value: undef

tls_srv_options

Data type: Optional[Enum['V']]

The parameter adjusts the server TLS settings. This can currently be either the letter V or the empty string. Setting this parameter to V disables the request for a client certificate.

Default value: undef

cipher_list

Data type: Optional[String]

Set the available ciphers for encrypted connections.

Default value: undef

server_ssl_options

Data type: Optional[String]

Configure the SSL connection flags for inbound connections.

Default value: undef

client_ssl_options

Data type: Optional[String]

Configure the SSL connection flags for outbound connections.

Default value: undef

sendmail::userdb

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Examples

Manage the userdb using hiera
class { 'sendmail::userdb': }
Manage the userdb using the provided file
class { 'sendmail::userdb':
  source => 'puppet:///modules/sendmail/userdb',
}

Parameters

The following parameters are available in the sendmail::userdb class:

content

Data type: Optional[String]

The desired contents of the userdb file. This allows managing the userdb file as a whole. Changes to the file automatically triggers a rebuild of the userdb database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the userdb file. This allows managing the userdb file as a whole. Changes to the file automatically triggers a rebuild of the userdb database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::userdb::entry resources. This class can be used to create userdb entries defined in hiera. The hiera hash should look like this:

sendmail::userdb::entries:
  'fred:maildrop':
    value: '[email protected]'
  'barney:maildrop':
    value: '[email protected]'

Default value: {}

sendmail::userdb::file

Manage the Sendmail userdb file.

Examples

class { 'sendmail::userdb::file': }

Parameters

The following parameters are available in the sendmail::userdb::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

sendmail::virtusertable

The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the source or content parameters. The entries parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.

Examples

Manage the virtusertable using hiera
class { 'sendmail::virtusertable': }
Manage the virtusertable using the provided file
class { 'sendmail::virtusertable':
  source => 'puppet:///modules/sendmail/virtusertable',
}

Parameters

The following parameters are available in the sendmail::virtusertable class:

content

Data type: Optional[String]

The desired contents of the virtusertable file. This allows managing the virtusertable file as a whole. Changes to the file automatically triggers a rebuild of the virtusertable database file. This attribute is mutually exclusive with source and entries.

Default value: undef

source

Data type: Optional[String]

A source file for the virtusertable file. This allows managing the virtusertable file as a whole. Changes to the file automatically triggers a rebuild of the virtusertable database file. This attribute is mutually exclusive with content and entries.

Default value: undef

entries

Data type: Hash[String,Data]

A hash that will be used to create sendmail::virtusertable::entry resources. This class can be used to create virtusertable entries defined in hiera. The hiera hash should look like this:

sendmail::virtusertable::entries:
  '[email protected]':
    value: 'fred'
  '@example.org':
    value: 'barney'

Default value: {}

sendmail::virtusertable::file

Manage the Sendmail virtusertable db file.

Examples

class { 'sendmail::virtusertable::file': }

Parameters

The following parameters are available in the sendmail::virtusertable::file class:

content

Data type: Optional[String]

The content of the file resource.

Default value: undef

source

Data type: Optional[String]

The source of the file resource.

Default value: undef

Defined types

sendmail::access::entry

The feature access_db must also be enabled by calling sendmail::mc::feature to make Sendmail use the access db file.

Examples

Create an access entry for a domain
sendmail::access::entry { 'example.com':
  value => 'RELAY',
}

Parameters

The following parameters are available in the sendmail::access::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the access db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This could for example be a domain name.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the access map this is typically something like OK, REJECT or DISCARD.

Default value: undef

sendmail::aliases::entry

Manage an entry in the Sendmail alias file.

Examples

Add a local alias for fred
sendmail::aliases::entry { 'fred':
  recipient => '[email protected]',
}

Parameters

The following parameters are available in the sendmail::aliases::entry defined type:

alias_name

Data type: String

The name of the alias to create.

Default value: $name

ensure

Data type: Enum['present','absent']

Used to create or remove the alias entry. Valid options: present, absent.

Default value: 'present'

recipient

Data type: Optional[Variant[String,Array[String]]]

The recipient where the mail is redirected to. This can be a string for one recipient or an array of strings for multiple recipients.

Default value: undef

sendmail::authinfo::entry

Manage an entry in the Sendmail authinfo db file.

Examples

Add an authinfo entry
sendmail::authinfo::entry { 'example.com':
  password         => 'secret',
  authorization_id => 'auth',
}

Parameters

The following parameters are available in the sendmail::authinfo::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the authinfo db entry.

Default value: 'present'

mechanisms

Data type: Array[String]

The list of preferred authentication mechanisms.

Default value: []

address

Data type: String

The key used by Sendmail for the database lookup. This can be an IPv4 address (e.g. 192.168.67.89), an IPv6 address (e.g. IPv6:2001:DB18::23f4), a hostname (e.g. www.example.org) or a domain name (e.g. example.com). The database key is required to start with the literal expression AuthInfo:. This prefix will be added automatically if necessary.

Default value: $name

password

Data type: Optional[String]

The password used for remote authentication in clear text. Exactly one of password or password_base64 must be set.

Default value: undef

password_base64

Data type: Optional[String]

The password used for remote authentication in Base64 encoding. Exactly one of password or password_base64 must be set.

Default value: undef

authorization_id

Data type: Optional[String]

The user (authorization) identifier. One of the parameters authorization_id or authentication_id or both must be set.

Default value: undef

authentication_id

Data type: Optional[String]

The authentication identifier. One of the parameters authorization_id or authentication_id or both must be set.

Default value: undef

realm

Data type: Optional[String]

The administrative realm to use.

Default value: undef

sendmail::domaintable::entry

Manage an entry in the Sendmail domaintable file.

Examples

Add an entry to the domaintable
sendmail::domaintable::entry { 'example.com':
  value => 'example.org',
}

Parameters

The following parameters are available in the sendmail::domaintable::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the domaintable db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This should normally be a domain name.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the domaintable map this is typically another domain name.

Default value: undef

sendmail::genericstable::entry

Manage an entry in the Sendmail genericstable file.

Examples

Override the recipient [email protected] with another address
sendmail::genericstable::entry { '[email protected]':
  value => '[email protected]',
}
Forward local mail to barney to a remote address
sendmail::genericstable::entry { 'barney':
  value => '[email protected]',
}

Parameters

The following parameters are available in the sendmail::genericstable::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the genericstable db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This is normally a username or a user and domain name.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the genericstable map this is typically something like [email protected].

Default value: undef

sendmail::mailertable::entry

Manage an entry in the Sendmail mailertable file.

Examples

Forward all mail for the example.com domain to a given relay
sendmail::mailertable::entry { '.example.com':
  value => 'smtp:relay.example.com',
}
Reject all mail for the example.net domain with a given error
sendmail::mailertable::entry { '.example.net':
  value => 'error:5.7.0:550 mail is not accepted',
}

Parameters

The following parameters are available in the sendmail::mailertable::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the mailertable db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This should either be a fully qualified host name or a domain name with a leading dot.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the mailertable map this is typically something like smtp:hostname. The error mailer can be used to configure specific errors for certain hosts.

Default value: undef

sendmail::mc::daemon_options

Add the DAEMON_OPTIONS macro to the sendmail.mc file.

Examples

Define a MTA daemon for port 25 using IPv4
sendmail::mc::daemon_options { 'MTA-v4':
  daemon_name => 'MTA',
  family      => 'inet',
  port        => '25',
}

Parameters

The following parameters are available in the sendmail::mc::daemon_options defined type:

daemon_name

Data type: String

The name of the daemon to use. The logfile will contain this name to identify the daemon.

Default value: $name

family

Data type: Optional[Enum['inet', 'inet6', 'iso']]

The network family type. Valid options: inet, inet6 or iso.

Default value: undef

addr

Data type: Optional[String]

The network address to listen on for remote connections. This can be a hostname or network address.

Default value: undef

port

Data type: Optional[String]

The port used by the daemon. This can be either a numeric port number or a service name like smtp for port 25 or submissionfor port 587.

Default value: undef

children

Data type: Optional[String]

The maximum number of processes to fork for this daemon.

Default value: undef

delivery_mode

Data type: Optional[Sendmail::Deliverymode]

The mode of delivery for this daemon. Valid options: background, deferred, interactive or queueonly.

Default value: undef

input_filter

Data type: Optional[Variant[String,Array[String]]]

A list of milters to use. This can either be an array of milter names or a single string, where the milter names are separated by colons.

Default value: undef

listen

Data type: Optional[String]

The length of the listen queue used by the operating system.

Default value: undef

modify

Data type: Optional[String]

Single letter flags to modify the daemon behaviour. See the Sendmail documention for details.

Default value: undef

delay_la

Data type: Optional[String]

The local load average at which connections are delayed before they are accepted.

Default value: undef

queue_la

Data type: Optional[String]

The local load average at which received mail is queued and not delivered immediately.

Default value: undef

refuse_la

Data type: Optional[String]

The local load average at which mail is no longer accepted.

Default value: undef

send_buf_size

Data type: Optional[String]

The size of the network send buffer used by the operating system. The value is a size in bytes.

Default value: undef

receive_buf_size

Data type: Optional[String]

The size of the network receive buffer used by the operating system. The value is a size in bytes.

Default value: undef

sendmail::mc::define

Add m4 macro defines to the sendmail.mc file.

Examples

Set a configuration item using m4 quotes
sendmail::mc::define { 'confFOO':
  expansion  => 'foo',
}
Set a configuration item without m4 quotes
sendmail::mc::define { 'confBAR':
  expansion  => 'foo',
  use_quotes => false,
}

Parameters

The following parameters are available in the sendmail::mc::define defined type:

expansion

Data type: Optional[Variant[String,Integer]]

The expansion defined for the macro.

Default value: undef

use_quotes

Data type: Boolean

A boolean that indicates if the expansion should be quoted (using m4 quotes). Valid options: true or false.

Default value: true

macro_name

Data type: String

The name of the macro that will be defined. This will be the first argument of the m4 define builtin. Note: The macro name should not be quoted as it will always be quoted in the template.

Default value: $name

sendmail::mc::domain

Add the DOMAIN macro to the sendmail.mc file.

Examples

Include settings for the generic domain
sendmail::mc::domain { 'generic': }

Parameters

The following parameters are available in the sendmail::mc::domain defined type:

domain_name

Data type: String

The name of the sendmail domain file as a string. The value is used as argument to the DOMAIN macro in the generated sendmail.mc file. This will include the m4 file with domain specific settings.

Default value: $title

sendmail::mc::enhdnsbl

Manage enhanced DNS blacklist entries

Examples

Include the DNS blacklist dialups.mail-abuse.org
sendmail::mc::enhdnsbl { 'dialups.mail-abuse.org':
  reject_message          => '"550 dial-up site refused"',
  allow_temporary_failure => true,
  lookup_result           => '127.0.0.3.',
}

Parameters

The following parameters are available in the sendmail::mc::enhdnsbl defined type:

blacklist

Data type: String

The DNS name to query the blacklist.

Default value: $name

allow_temporary_failure

Data type: Boolean

Determine what happens when a temporary failure of the DNS lookup occurs. The message is accepted when this parameter is set to false. A temporary error is signaled when this is set to true.

Default value: false

reject_message

Data type: Optional[String]

The error message used when rejecting a message.

Default value: undef

lookup_result

Data type: Optional[String]

Check the DNS lookup for this result. Leave this parameter unset to block the message as long as anything is returned from the lookup.

Default value: undef

sendmail::mc::feature

Add the FEATURE macro to the sendmail.mc file.

Examples

Enable the mailertable feature
sendmail::mc::feature { 'mailertable': }
Enable the mailertable feature using the given file location
sendmail::mc::feature { 'mailertable':
  args => [ 'hash /etc/mail/mailertable' ],
}

Parameters

The following parameters are available in the sendmail::mc::feature defined type:

feature_name

Data type: String

The name of the feature that will be used. This will be the first argument of the FEATURE(). Note: The feature name should not be quoted as it will always be quoted in the template.

Default value: $name

args

Data type: Variant[String,Array[String]]

The arguments used for the feature. This can be a string (one argument) or and an array and it will be used for the following arguments of the FEATURE().

Default value: []

use_quotes

Data type: Boolean

A boolean that indicates if the arguments should be quoted (using m4 quotes). Valid options: true or false.

Default value: true

sendmail::mc::generics_domain

Add the GENERICS_DOMAIN macro to the sendmail.mc file.

Examples

Enable genericstable processing for the domain example.net
sendmail::mc::generics_domain { 'example.net': }

Parameters

The following parameters are available in the sendmail::mc::generics_domain defined type:

domain_name

Data type: String

The name of the domain for which the genericstable is enabled.

Default value: $name

sendmail::mc::include

Add include fragments to the sendmail.mc file.

Examples

Include a milter setup file to the configuration
sendmail::mc::include { '/etc/mail/m4/clamav-milter.m4': }

Parameters

The following parameters are available in the sendmail::mc::include defined type:

filename

Data type: Stdlib::Absolutepath

The absolute path of the file to include.

Default value: $name

order

Data type: String

The position in the sendmail.mc file where the include statement will appear. This requires internal knowledge of the sendmail module. See the Puppet class sendmail::mc for details. The default generates the include statements just before the MAILER section.

Default value: '59'

sendmail::mc::ldaproute_domain

Add the LDAPROUTE_DOMAIN macro to the sendmail.mc file.

Examples

Enable LDAP routing for example.net
sendmail::mc::ldaproute_domain { 'example.net': }

Parameters

The following parameters are available in the sendmail::mc::ldaproute_domain defined type:

domain_name

Data type: String

The name of the domain for which LDAP routing is enabled.

Default value: $name

sendmail::mc::local_config

Add a LOCAL_CONFIG section into the sendmail.mc file.

Examples

Add the X-AuthUser header to each mail
sendmail::mc::local_config { 'X-AuthUser':
  content => 'HX-AuthUser: ${auth_authen}',
}

Parameters

The following parameters are available in the sendmail::mc::local_config defined type:

content

Data type: Optional[String]

The desired contents of the local config section. This attribute is mutually exclusive with source.

Default value: undef

source

Data type: Optional[String]

A source file included as the local config section. This attribute is mutually exclusive with content.

Default value: undef

sendmail::mc::mailer

Add a MAILER macro to the sendmail.mc file.

Examples

Add the local mailer to the configuration
sendmail::mc::mailer { 'local': }
Add the SMTP mailer to the configuration
sendmail::mc::mailer { 'smtp': }

Parameters

The following parameters are available in the sendmail::mc::mailer defined type:

mailer

Data type: String

The name of the mailer to add to the configuration. The position of the mailer in the configuration file is determined according to the Bat Book.

Default value: $name

sendmail::mc::masquerade_as

Add the MASQUERADE_AS macro to the sendmail.mc file.

Examples

Masquerade as example.com including envelope adresses
sendmail::mc::masquerade_as { 'example.com':
  masquerade_envelope => true,
}

Parameters

The following parameters are available in the sendmail::mc::masquerade_as defined type:

masquerade_as

Data type: String

Mail being sent is rewritten as coming from the indicated address.

Default value: $name

masquerade_domain

Data type: Array[String]

Normally masquerading only rewrites mail from the local host. This parameter sets a set of domain or host names that is used for masquerading.

Default value: []

masquerade_domain_file

Data type: Optional[Stdlib::Absolutepath]

The set of domain or host names to be used for masquerading can also be read from the file given here.

Default value: undef

masquerade_exception

Data type: Array[String]

This parameter can set exceptions if not all hosts or subdomains for a given domain should be rewritten.

Default value: []

masquerade_exception_file

Data type: Optional[Stdlib::Absolutepath]

The exceptions can also be read from the file given here.

Default value: undef

masquerade_envelope

Data type: Boolean

Normally only header addresses are used for masquerading. By setting this parameter to true, also envelope addresses are rewritten.

Default value: false

allmasquerade

Data type: Boolean

Enable the allmasquerade feature if set to true.

Default value: false

limited_masquerade

Data type: Boolean

Enable the limited_masquerade feature if set to true.

Default value: false

local_no_masquerade

Data type: Boolean

Enable the local_no_masquerade feature if set to true.

Default value: false

masquerade_entire_domain

Data type: Boolean

Enable the masquerade_entire_domain feature if set to true.

Default value: false

exposed_user

Data type: Array[String]

An array of usernames that should not be masqueraded. This may be useful for system users (root has been exposed by default prior to Sendmail 8.10).

Default value: []

exposed_user_file

Data type: Optional[Stdlib::Absolutepath]

The usernames that should not be masqueraded can also be read from the file given here.

Default value: undef

sendmail::mc::milter

Manage Sendmail Milter configuration in sendmail.mc

Examples

Add the greylist milter using a local socket
sendmail::mc::milter { 'greylist':
  socket_type => 'local',
  socket_spec => '/var/run/milter-greylist/milter-greylist.sock',
}
Add the greylist milter using a TCP/IP socket
sendmail::mc::milter { 'greylist':
  socket_type => 'inet',
  socket_spec => '[email protected]',
}

Parameters

The following parameters are available in the sendmail::mc::milter defined type:

socket_type

Data type: Enum['local','unix','inet','inet6']

The type of socket to use for connecting to the milter. Valid values: local, unix, inet, inet6

socket_spec

Data type: String

The socket specification for connecting to the milter. For the type local (unix is a synonym) this is the full path to the Unix-domain socket. For the inet and inet6 type socket this must be the port number, a literal @ character and the host or address specification.

flags

Data type: Enum['R','T','4','']

Either the empty string or a single character to specify how milter failures are handled by Sendmail. The letter R rejects the message, a T causes a temporary failure and the character 4 (available with Sendmail V8.4 or later) rejects with a 421 response code. If the empty string is used, Sendmail will treat a milter failure as if the milter wasn't configured.

Default value: 'T'

send_timeout

Data type: Optional[Sendmail::Timeout]

Timeout when sending data from the MTA to the Milter. The default is undefined (using the Sendmail default 10sec).

Default value: undef

receive_timeout

Data type: Optional[Sendmail::Timeout]

Timeout when reading a reply from the Milter. The default is undefined (using the Sendmail default 10sec).

Default value: undef

eom_timeout

Data type: Optional[Sendmail::Timeout]

Overall timeout from sending the messag to Milter until the final end of message reply is received. The default is undefined (using the Sendmail default 5min).

Default value: undef

connect_timeout

Data type: Optional[Sendmail::Timeout]

Connection timeout. The default value is undefined (using the Sendmail default 5min).

Default value: undef

order

Data type: String

A string used to determine the order of the mail filters in the configuration file. This also defines the order in which the filters are called.

Default value: '00'

milter_name

Data type: String

The name of the milter to create.

Default value: $name

enable

Data type: Boolean

A boolean to indicate if the milter should automatically be enabled. If this is true (the default) then the milter will be called by Sendmail for every incoming mail. If this is set to false then the milter is only defined. It needs to be enabled by either setting the parameter input_filter for sendmail::mc::daemon_options or defining confINPUT_MAIL_FILTERS. Internally this parameter determines if the INPUT_MAIL_FILTER() or MAIL_FILTER() macros are used.

Default value: true

sendmail::mc::modify_mailer_flags

Add a MODIFY_MAILER_FLAGS macro to the sendmail.mc file.

Examples

Add the O flag to the SMTP mailer
sendmail::mc::modify_mailer_flags { 'SMTP':
  flags => '+O',
}

Parameters

The following parameters are available in the sendmail::mc::modify_mailer_flags defined type:

mailer_name

Data type: String

The name of the mailer for which the flags will be changed. This name is case-sensitive and must conform to the name of the mailer. Usually this will be a name in uppercase (e.g. SMTP or LOCAL).

Default value: $name

flags

Data type: String

The flags to change. Adding single flags is possible by prefixing the flag with a + symbol. Removing single flags from the mailer can be done with a - symbol as prefix. Without a leading + or - the flags will replace the flags of the delivery agent.

use_quotes

Data type: Boolean

A boolean that indicates if the flags should be quoted (using m4 quotes). If this argument is true, then the flags will be enclosed in and ' symbols in the generated output file. Valid options:trueorfalse`.

Default value: true

sendmail::mc::ostype

Add the OSTYPE macro to the sendmail.mc file.

Examples

Set the OSTYPE to Debian
sendmail::mc::ostype { 'Debian': }

Parameters

The following parameters are available in the sendmail::mc::ostype defined type:

ostype

Data type: String

The type of operating system as a string. The value is used to add the OSTYPE macro to the generated sendmail.mc file. This will include the m4 file with operating system specific settings.

Default value: $name

sendmail::mc::queue_group

Add the QUEUE_GROUP macro to the sendmail.mc file.

Examples

Create a queue group named gmailcom for single recipient delivery
sendmail::mc::queue_group { 'gmailcom':
  flags      => 'f',
  interval   => '60m',
  path       => '/var/spool/mqueues/gmail',
  recipients => 1,
}

Parameters

The following parameters are available in the sendmail::mc::queue_group defined type:

queue_group

Data type: String

The name of the queue group.

Default value: $name

flags

Data type: Optional[String]

Flags for the queue group. Currently only the f flag is supported and causes Sendmail to create one queue process for each queue directory in the group.

Default value: undef

interval

Data type: Optional[String]

The interval specifies the time interval between queue runs for the queue group. The parameter value should be an integer and a letter (e.g. 10m). The letters w (week), d (day), h (hour), m (minute) and s (second) are allowed.

Default value: undef

jobs

Data type: Optional[Integer]

This parameter limits the number of queue entries that will be processed in a single queue run.

Default value: undef

nice

Data type: Optional[Integer]

Set the nice-level for the queue group processor. Using a positive number will increase the nice-level by the given number. This results in the process to run with a reduced priority.

Default value: undef

recipients

Data type: Optional[Integer]

The number of recipients that are processed in a single delivery before splitting.

Default value: undef

runners

Data type: Optional[Integer]

The number of queue runners to lauch for this queue group.

Default value: undef

path

Data type: Optional[Stdlib::Absolutepath]

The location of the queue directory for this queue group. The parameter must be an absolute path and must be a subdirectory of the default queue directory configured by the QueueDirectory option.

Default value: undef

sendmail::mc::versionid

Add the VERSIONID macro to the sendmail.mc file.

Examples

Set the VERSIONID to the value generic
sendmail::mc::versionid { 'generic': }

Parameters

The following parameters are available in the sendmail::mc::versionid defined type:

versionid

Data type: String

The identifier (a string) to set in the sendmail.mc file.

Default value: $name

sendmail::mc::virtuser_domain

Add the VIRTUSER_DOMAIN macro to the sendmail.mc file.

Examples

sendmail::mc::virtuser_domain { 'example.net': }

Parameters

The following parameters are available in the sendmail::mc::virtuser_domain defined type:

domainname

Data type: Stdlib::Fqdn

The name of the domain to use with FEATURE(virtusertable). This can be used multiple times to set more than one domain name.

Default value: $name

sendmail::userdb::entry

The type has an internal dependency to rebuild the database file.

Examples

Add an entry to the userdb
sendmail::userdb::entry { 'fred:maildrop':
  value => '[email protected]',
}

Parameters

The following parameters are available in the sendmail::userdb::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the userdb db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This normally is in the format user:maildrop or user:mailname where user is the a local username.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the userdb map this is typically a single mailaddress or a compound list of addresses separated by commas.

Default value: undef

sendmail::virtusertable::entry

The type has an internal dependency to rebuild the database file.

Examples

sendmail::virtusertable::entry { '[email protected]':
  value => '[email protected]',
}
Rewrite all users in the example.org domain to a local user
sendmail::virtusertable::entry { '@example.org':
  value => 'barney',
}

Parameters

The following parameters are available in the sendmail::virtusertable::entry defined type:

ensure

Data type: Enum['present','absent']

Used to create or remove the virtusertable db entry. Valid options: present, absent.

Default value: 'present'

key

Data type: String

The key used by Sendmail for the lookup. This is normally a mail address or a mail address without the user part.

Default value: $name

value

Data type: Optional[String]

The value for the given key. For the virtusertable map this is typically a local username or a remote mail address.

Default value: undef

Functions

sendmail::canonify_array

Type: Puppet Language

Rewrite the input array the following way:

  • strip spaces from the beginning and end of each string
  • remove duplicate entries
  • sort the result

sendmail::canonify_array(Array[String] $arg)

Rewrite the input array the following way:

  • strip spaces from the beginning and end of each string
  • remove duplicate entries
  • sort the result

Returns: Array[String] array of canonified strings

arg

Data type: Array[String]

array of strings to canonify

Data types

Sendmail::DHParam

The valid number of bits for DH params.

Alias of

Variant[Enum['512','1024','2048'], Stdlib::Absolutepath]

Sendmail::Deliverymode

The supported delivery modes for Sendmail.

Alias of

Enum['b', 'background', 'd', 'deferred', 'i', 'interactive', 'q', 'queueonly']

Sendmail::Loglevel

The supported loglevels.

Alias of

Variant[Pattern[/^\d+$/], Integer]

Sendmail::Messagesize

A message size specification in bytes, kb or Mb.

Alias of

Pattern[/^[0-9]*\s*([kM][bB])?$/]

Sendmail::Timeout

A timeout specification in seconds or minutes.

Alias of

Pattern[/^[0-9]+(s|m)?$/]