Commit 5092926d authored by intrigeri's avatar intrigeri Committed by Raphaël Pinson

Add postfix::mailalias, that creates an email alias and updates the binary...

Add postfix::mailalias, that creates an email alias and updates the binary version of the local alias database. (#233)

Supersedes #115.
parent 4c578f2a
......@@ -101,9 +101,8 @@ class postfix::files {
}
if $manage_root_alias {
mailalias {'root':
postfix::mailalias {'root':
recipient => $root_mail_recipient,
notify => Exec['newaliases'],
}
}
......
# == Definition: postfix::mailalias
#
# Creates an email alias in the local alias database and updates the binary
# version of said database.
#
# === Parameters
#
# [*name*] - the alias name. See aliases(5).
# [*ensure*] - present/absent, defaults to present.
# [*recipient*] - where email should be sent.
#
# === Requires
#
# - Class["postfix"]
#
# === Examples
#
# node "toto.example.com" {
#
# include postfix
#
# postfix::mailalias { 'postmaster':
# ensure => present,
# recipient => 'foo',
# }
#
define postfix::mailalias (
Variant[String, Array[String]] $recipient,
Enum['present', 'absent'] $ensure='present',
) {
mailalias { $title:
ensure => $ensure,
name => $name,
recipient => $recipient,
notify => Exec['newaliases'],
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment