2010-09-23 19:05:57 +02:00
|
|
|
/*
|
|
|
|
== Definition: postfix::mailalias
|
|
|
|
|
|
|
|
Wrapper around Puppet mailalias resource, provides newaliases executable.
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
- *name*: the name of the alias.
|
|
|
|
- *ensure*: present/absent, defaults to present.
|
|
|
|
- *recipient*: recipient of the alias.
|
|
|
|
|
|
|
|
Requires:
|
|
|
|
- Class["postfix"]
|
|
|
|
|
|
|
|
Example usage:
|
|
|
|
|
|
|
|
node "toto.example.com" {
|
|
|
|
|
|
|
|
include postfix
|
|
|
|
|
|
|
|
postfix::mailalias { "postmaster":
|
|
|
|
ensure => present,
|
|
|
|
recipient => 'foo'
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
2010-09-23 20:01:21 +02:00
|
|
|
define postfix::mailalias ($ensure = 'present', $recipient) {
|
2010-09-23 19:05:57 +02:00
|
|
|
mailalias { "${name}":
|
|
|
|
ensure => $ensure,
|
|
|
|
recipient => $recipient,
|
|
|
|
notify => Exec['newaliases']
|
|
|
|
}
|
|
|
|
}
|