Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Puppet Camptocamp Postfix
Commits
595003d0
Commit
595003d0
authored
Jul 24, 2013
by
Raphaël Pinson
Browse files
Doc
parent
674e5d6a
Changes
8
Hide whitespace changes
Inline
Side-by-side
manifests/config.pp
View file @
595003d0
#
#== Definition: postfix::config
#
== Definition: postfix::config
#
#Uses the "postconf" command to add/alter/remove options in postfix main
#configuation file (/etc/postfix/main.cf).
#
Uses the "postconf" command to add/alter/remove options in postfix main
#
configuation file (/etc/postfix/main.cf).
#
#Parameters:
#- *name*: name of the parameter.
#- *ensure*: present/absent. defaults to present.
#- *value*: value of the parameter.
# === Parameters
#
#Requires:
#- Class["postfix"]
# [*name*] - name of the parameter.
# [*ensure*] - present/absent. defaults to present.
# [*value*] - value of the parameter.
#
#
Example usage:
#
=== Requires
#
#
node "toto.example.com" {
#
- Class["postfix"]
#
# include postfix
#
# postfix::config {
# "smtp_use_tls" => "yes";
# "smtp_sasl_auth_enable" => "yes";
# "smtp_sasl_password_maps" => "hash:/etc/postfix/my_sasl_passwords";
# "relayhost" => "[mail.example.com]:587";
# }
# }
# === Examples
#
# postfix::config { 'smtp_use_tls':
# ensure => 'present',
# value => 'yes',
# }
#
define
postfix::config
(
$value
,
$ensure
=
present
)
{
...
...
manifests/hash.pp
View file @
595003d0
#== Definition: postfix::hash
#
== Definition: postfix::hash
#
#Creates postfix hashed "map" files. It will create "${name}", and then build
#"${name}.db" using the "postmap" command. The map file can then be referred to
#using postfix::config.
#
Creates postfix hashed "map" files. It will create "${name}", and then build
#
"${name}.db" using the "postmap" command. The map file can then be referred to
#
using postfix::config.
#
#Parameters:
#- *name*: the name of the map file.
#- *ensure*: present/absent, defaults to present.
#- *source*: file source.
# === Parameters
#
#Requires:
#- Class["postfix"]
# [*name*] - the name of the map file.
# [*ensure*] - present/absent, defaults to present.
# [*source*] - file source.
#
#
Example usage:
#
=== Requires
#
#
node "toto.example.com" {
#
- Class["postfix"]
#
#
include postfix
#
=== Examples
#
# postfix::hash { "/etc/postfix/virtual":
# ensure => present,
# }
# postfix::config { "virtual_alias_maps":
# value => "hash:/etc/postfix/virtual"
# }
# }
# postfix::hash { '/etc/postfix/virtual':
# ensure => present,
# }
# postfix::config { 'virtual_alias_maps':
# value => 'hash:/etc/postfix/virtual',
# }
#
define
postfix::hash
(
$ensure
=
'present'
,
...
...
manifests/ldap.pp
View file @
595003d0
# == Class: postfix::ldap
#
# Configures postfix for use with LDAP.
#
# === Parameters
#
# === Requires
#
# - Class["postfix"]
#
# === Examples
#
# include postfix
# include postfix::ldap
#
class
postfix::ldap
{
package
{
'postfix-ldap'
:
}
...
...
manifests/mailman.pp
View file @
595003d0
...
...
@@ -3,16 +3,14 @@
# Configures a basic smtp server, able to work for the mailman mailing-list
# manager.
#
# Example
usage:
#
===
Example
s
#
# node 'toto.example.com' {
# class { '::postfix':
# mailman => true,
# }
# }
#
# /!\ Do not include this class directly anymore,
# /!\ Do not include this class directly,
# use mailman => true in the postfix top class!
#
# class { 'postfix':
# mailman => true,
# }
class
postfix::mailman
{
postfix::config
{
...
...
manifests/mta.pp
View file @
595003d0
#
# == Class: postfix::mta
#
# This class configures a minimal MTA, listening on
# $postfix_smtp_listen (default to localhost) and delivering mail to
# $postfix_mydestination (default to $fqdn).
# This class configures a minimal MTA, delivering mail to
# $mydestination.
#
# A valid relay host is required ($
postfix_
relayhost) for outbound email.
# A valid relay host is required ($relayhost) for outbound email.
#
# transport & virtual maps get configured and can be populated with
# postfix::transport and postfix::virtual
#
# Parameters:
# - *$postfix_relayhost*
# - *$postfix_mydestination*
# - every global variable which works for class 'postfix' will work here.
#
# Example usage:
# === Parameters
#
# node 'toto.example.com' {
# $postfix_relayhost = 'mail.example.com'
# $postfix_smtp_listen = '0.0.0.0'
# $postfix_mydestination = '$myorigin, myapp.example.com'
# [*relayhost*] - (string) the relayhost to use
# [*mydestination*] - (string)
# [*mynetworks*] - (string)
#
#
include postfix::mta
#
=== Examples
#
# postfix::transport { 'myapp.example.com':
# ensure => present,
# destination => 'local:',
# }
# class { 'postfix':
# relayhost => 'mail.example.com',
# smtp_listen => '0.0.0.0',
# mydestination => '$myorigin, myapp.example.com',
# mta => true,
# }
#
class
postfix::mta
(
...
...
manifests/satellite.pp
View file @
595003d0
...
...
@@ -2,23 +2,24 @@
# == Class: postfix::satellite
#
# This class configures all local email (cron, mdadm, etc) to be forwarded
# to $root_mail_recipient, using $
postfix_
relayhost as a relay.
# to $root_mail_recipient, using $relayhost as a relay.
#
#
$valid_fqdn can be set to override $fqdn in the case where the FQDN is
#
not recognized as valid by the destination server
.
#
This class will call postfix::mta and override its parameters.
#
You shouldn't call postfix::mta yourself or use mta=true in the postfix class
.
#
# Parameters:
# - *valid_fqdn*
# - every global variable which works for class 'postfix' will work here.
# === Parameters
#
# Example usage:
# [*mydestination*] - (string)
# [*mynetworks*] - (string)
# [*relayhost*] - (string)
#
# node 'toto.local.lan' {
# $postfix_relayhost = 'mail.example.com'
# $valid_fqdn = 'toto.example.com'
# $root_mail_recipient = 'the.sysadmin@example.com'
# === Examples
#
# include postfix::satellite
# class { 'postfix':
# relayhost => 'mail.example.com',
# myorigin => 'toto.example.com',
# root_mail_recipient => 'the.sysadmin@example.com',
# satellite => true,
# }
#
class
postfix::satellite
(
...
...
manifests/transport.pp
View file @
595003d0
#== Definition: postfix::transport
#
== Definition: postfix::transport
#
#Manages content of the /etc/postfix/transport map.
#
Manages content of the /etc/postfix/transport map.
#
#Parameters:
#- *name*: name of address postfix will lookup. See transport(5).
#- *destination*: where the emails will be delivered to. See transport(5).
#- *ensure*: present/absent, defaults to present.
# === Parameters
#
#Requires:
#- Class["postfix"]
#- Postfix::Hash["/etc/postfix/transport"]
#- Postfix::Config["transport_maps"]
#- augeas
# [*name*] - name of address postfix will lookup. See transport(5).
# [*destination*] - where the emails will be delivered to. See transport(5).
# [*ensure*] - present/absent, defaults to present.
#
#
Example usage:
#
=== Requires
#
# node "toto.example.com" {
# - Class["postfix"]
# - Postfix::Hash["/etc/postfix/transport"]
# - Postfix::Config["transport_maps"]
# - augeas
#
#
include postfix
#
=== Examples
#
# postfix::hash { "/etc/postfix/transport":
# ensure => present,
# }
# postfix::config { "transport_maps":
# value => "hash:/etc/postfix/transport"
# }
# postfix::transport { "mailman.example.com":
# ensure => present,
# destination => "mailman",
# }
# }
# node "toto.example.com" {
#
# include postfix
#
# postfix::hash { "/etc/postfix/transport":
# ensure => present,
# }
# postfix::config { "transport_maps":
# value => "hash:/etc/postfix/transport"
# }
# postfix::transport { "mailman.example.com":
# ensure => present,
# destination => "mailman",
# }
# }
#
define
postfix::transport
(
$destination
=
''
,
...
...
manifests/virtual.pp
View file @
595003d0
#== Definition: postfix::virtual
#
== Definition: postfix::virtual
#
#Manages content of the /etc/postfix/virtual map.
#
Manages content of the /etc/postfix/virtual map.
#
#Parameters:
#- *name*: name of address postfix will lookup. See virtual(8).
#- *destination*: where the emails will be delivered to. See virtual(8).
#- *ensure*: present/absent, defaults to present.
# === Parameters
#
#Requires:
#- Class["postfix"]
#- Postfix::Hash["/etc/postfix/virtual"]
#- Postfix::Config["virtual_alias_maps"]
#- augeas
# [*name*] - name of address postfix will lookup. See virtual(8).
# [*destination*] - where the emails will be delivered to. See virtual(8).
# [*ensure*] - present/absent, defaults to present.
#
#
Example usage:
#
=== Requires
#
# node "toto.example.com" {
# - Class["postfix"]
# - Postfix::Hash["/etc/postfix/virtual"]
# - Postfix::Config["virtual_alias_maps"]
# - augeas
#
#
include postfix
#
=== Examples
#
# postfix::hash { "/etc/postfix/virtual":
# ensure => present,
# }
# postfix::config { "virtual_alias_maps":
# value => "hash:/etc/postfix/virtual"
# }
# postfix::virtual { "user@example.com":
# ensure => present,
# destination => "root",
# }
# }
# node "toto.example.com" {
#
# include postfix
#
# postfix::hash { "/etc/postfix/virtual":
# ensure => present,
# }
# postfix::config { "virtual_alias_maps":
# value => "hash:/etc/postfix/virtual"
# }
# postfix::virtual { "user@example.com":
# ensure => present,
# destination => "root",
# }
# }
#
define
postfix::virtual
(
$destination
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment