Skip to content

Latest commit

 

History

History
321 lines (174 loc) · 6.48 KB

REFERENCE.md

File metadata and controls

321 lines (174 loc) · 6.48 KB

Reference

Table of Contents

Classes

Public Classes

  • postfix: This class installs and configures the postfix service.

Private Classes

  • postfix::config: This class handles postfix configuration.
  • postfix::package: Manages the postfix packages.
  • postfix::service: Manages the postfix service.

Resource types

  • postconf: Create a new postconf entry. Puppet does not really support generating/prefetching resources with multiple namevars, so this type represents
  • postconf_master: Create a new postconf master.cf entry. Puppet does not really support generating/prefetching resources with multiple namevars, so this type
  • postmulti: Manage postfix instances. Example: postmulti { 'postfix-out': }

Classes

postfix

This class installs and configures the postfix service.

Examples

Basic usage
class { 'postfix':
  service_manage => false,
  mailx_ensure   => absent
}

Parameters

The following parameters are available in the postfix class.

mailx_ensure

Data type: Enum['installed', 'present', 'latest']

The state of the mailx package to ensure.

mailx_manage

Data type: Boolean

Should the mailx package me managed.

mailx_package

Data type: String

The name of the mailx package.

main_config

Data type: Hash[String, Any]

A hash of config key-value entries for main.cf

master_services

Data type: Hash[String, Hash[String, Any]]

A hash of config key-value entries for master.cf

package_ensure

Data type: Enum['installed', 'present', 'latest']

The state the postfix package should be ensured.

package_manage

Data type: Boolean

Whether to install the postfix and plugin packages.

package_name

Data type: String

The name of the postfix package to install.

plugin

Data type: Hash

Contains a package_name parameter for each plugin (if available).

plugins

Data type: Array[String[1]]

The list of plugins to install.

purge_main

Data type: Variant[Boolean, Enum['true', 'false', 'noop']]

Purge all unmanaged entries from main.cf if true.

purge_master

Data type: Variant[Boolean, Enum['true', 'false', 'noop']]

Purge all unmanaged entries from master.cf if true.

restart_cmd

Data type: String

The command that should be used to restart the Postfix service upon configuration changes.

service_ensure

Data type: Enum['absent', 'running', 'stopped']

The state of the postfix service which should be ensured.

service_name

Data type: String

The name of the postfix service.

service_manage

Data type: Boolean

Should the postfix service be managed at all.

Resource types

postconf

Create a new postconf entry.

Puppet does not really support generating/prefetching resources with multiple namevars, so this type represents the whole parameter identifier in the :parameter property. This includes the postmulti instance. Valid formats are:

  • service/type
  • instance::service/type

Autorequires: If Puppet is managing the postmulti instance for this entry, it will be autorequired.

Example:

 postconf { 'myhostname':
   value => 'foo.bar'
 }

Properties

The following properties are available in the postconf type.

ensure

Valid values: present, absent

The basic property that the resource should be in.

Default value: present

value

The value the postconf parameter should be set to.

Parameters

The following parameters are available in the postconf type.

parameter

Valid values: %r{^([^/]+::)?[a-zA-Z0-9]+(?:_[a-zA-Z0-9]+)*$}

The postconf parameter which should be set.

provider

The specific backend to use for this postconf resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.

postconf_master

Create a new postconf master.cf entry.

Puppet does not really support generating/prefetching resources with multiple namevars, so this type represents the whole service identifier in the :name property. This includes the postmulti instance. Valid formats are:

  • service/type
  • instance::service/type

Autorequires: If Puppet is managing the postmulti instance for this entry, it will be autorequired.

Example:

 postconf_master { 'smtp/inet':
   command => 'postscreen'
 }

Properties

The following properties are available in the postconf_master type.

chroot

Whether or not the service runs chrooted to the mail queue directory.

Default value: undef

command

The command to be executed.

ensure

Valid values: present, absent

The basic property that the resource should be in.

Default value: present

private

Whether or not access is restricted to the mail system.

Default value: undef

process_limit

Valid values: undef, %r{^\d+$}

The maximum number of processes that may execute this service simultaneously.

Default value: undef

unprivileged

Whether the service runs with root privileges or as the owner of the Postfix system.

Default value: undef

wakeup

Valid values: undef, %r{^\d+\??$}

Automatically wake up the named service after the specified number of seconds.

Default value: undef

Parameters

The following parameters are available in the postconf_master type.

name

namevar

The postconf master.cf service/type which should be managed.

provider

The specific backend to use for this postconf_master resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.

postmulti

Manage postfix instances.

Example:

postmulti { 'postfix-out': }

Properties

The following properties are available in the postmulti type.

ensure

Valid values: active, inactive, absent, present

Aliases: "present"=>"active"

The basic property that the resource should be in.

group

Name of the instance group.

Parameters

The following parameters are available in the postmulti type.

name

namevar

Name of the postmulti instance. Must must start with 'postfix-'

provider

The specific backend to use for this postmulti resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform.