From 18661db4da9bb3f599ee473993c267de918fa0ce Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Tue, 22 Dec 2009 20:28:15 +0100 Subject: Breaks backward compat: A few $postfix_ng_ variables were changed into $postfix_ variables --- manifests/classes/postfix.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/classes/postfix.pp') diff --git a/manifests/classes/postfix.pp b/manifests/classes/postfix.pp index 8c4173e..91a33e3 100644 --- a/manifests/classes/postfix.pp +++ b/manifests/classes/postfix.pp @@ -34,8 +34,8 @@ class postfix { } # Default value for various options - case $postfix_ng_smtp_listen { - "": { $postfix_ng_smtp_listen = "127.0.0.1" } + case $postfix_smtp_listen { + "": { $postfix_smtp_listen = "127.0.0.1" } } case $root_mail_recipient { "": { $root_mail_recipient = "nobody" } -- cgit v1.2.3 From 3b8ef235fa00291e5d7f2be7512a55b3fbd3693d Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 9 Feb 2010 21:50:59 +0100 Subject: postfix: added support for CentOS and Ubuntu Based on a suggestion and patch from Nick Anderson. Thanks ! --- manifests/classes/postfix.pp | 6 ++++-- manifests/definitions/hash.pp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'manifests/classes/postfix.pp') diff --git a/manifests/classes/postfix.pp b/manifests/classes/postfix.pp index 91a33e3..f1f803a 100644 --- a/manifests/classes/postfix.pp +++ b/manifests/classes/postfix.pp @@ -20,7 +20,7 @@ class postfix { # selinux labels differ from one distribution to another case $operatingsystem { - RedHat: { + RedHat, CentOS: { case $lsbmajdistrelease { "4": { $postfix_seltype = "etc_t" } "5": { $postfix_seltype = "postfix_etc_t" } @@ -81,7 +81,9 @@ class postfix { mode => "0644", content => $operatingsystem ? { Redhat => template("postfix/master.cf.redhat5.erb"), + CentOS => template("postfix/master.cf.redhat5.erb"), Debian => template("postfix/master.cf.debian-etch.erb"), + Ubuntu => template("postfix/master.cf.debian-etch.erb"), }, seltype => $postfix_seltype, notify => Service["postfix"], @@ -108,7 +110,7 @@ class postfix { } case $operatingsystem { - RedHat: { + RedHat, CentOS: { postfix::config { "sendmail_path": value => "/usr/sbin/sendmail.postfix"; "newaliases_path": value => "/usr/bin/newaliases.postfix"; diff --git a/manifests/definitions/hash.pp b/manifests/definitions/hash.pp index a0514ee..3f605f0 100644 --- a/manifests/definitions/hash.pp +++ b/manifests/definitions/hash.pp @@ -34,7 +34,7 @@ define postfix::hash ($ensure="present") { # selinux labels differ from one distribution to another case $operatingsystem { - RedHat: { + RedHat, CentOS: { case $lsbmajdistrelease { "4": { $postfix_seltype = "etc_t" } "5": { $postfix_seltype = "postfix_etc_t" } -- cgit v1.2.3 From 2703cae7300bcb545e94d1e7ae806f5995548520 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 8 Aug 2010 00:42:55 -0300 Subject: Group for main.cf and master.cf --- manifests/classes/postfix.pp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'manifests/classes/postfix.pp') diff --git a/manifests/classes/postfix.pp b/manifests/classes/postfix.pp index f1f803a..a3bbef9 100644 --- a/manifests/classes/postfix.pp +++ b/manifests/classes/postfix.pp @@ -78,6 +78,7 @@ class postfix { file { "/etc/postfix/master.cf": ensure => present, owner => "root", + group => "root", mode => "0644", content => $operatingsystem ? { Redhat => template("postfix/master.cf.redhat5.erb"), @@ -94,6 +95,7 @@ class postfix { file { "/etc/postfix/main.cf": ensure => present, owner => "root", + group => "root", mode => "0644", source => "puppet:///postfix/main.cf", replace => false, -- cgit v1.2.3 From 328c20af92a410bba35457c61a4882c489e0d9dd Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 14 Sep 2010 18:27:45 -0300 Subject: Fixing deprecation issue --- manifests/classes/postfix.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/classes/postfix.pp') diff --git a/manifests/classes/postfix.pp b/manifests/classes/postfix.pp index a3bbef9..a9e1d3f 100644 --- a/manifests/classes/postfix.pp +++ b/manifests/classes/postfix.pp @@ -97,7 +97,7 @@ class postfix { owner => "root", group => "root", mode => "0644", - source => "puppet:///postfix/main.cf", + source => "puppet:///modules/postfix/main.cf", replace => false, seltype => $postfix_seltype, notify => Service["postfix"], -- cgit v1.2.3 From 6193e0e0e9f2263d9a297cc0f19dffe1b25483de Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Thu, 23 Sep 2010 13:05:57 -0400 Subject: Add mailalias resource wrapper --- manifests/classes/postfix.pp | 3 +-- manifests/definitions/mailalias.pp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 manifests/definitions/mailalias.pp (limited to 'manifests/classes/postfix.pp') diff --git a/manifests/classes/postfix.pp b/manifests/classes/postfix.pp index a9e1d3f..1d60a57 100644 --- a/manifests/classes/postfix.pp +++ b/manifests/classes/postfix.pp @@ -121,8 +121,7 @@ class postfix { } } - mailalias {"root": + postfix::mailalias {"root": recipient => $root_mail_recipient, - notify => Exec["newaliases"], } } diff --git a/manifests/definitions/mailalias.pp b/manifests/definitions/mailalias.pp new file mode 100644 index 0000000..0d457e7 --- /dev/null +++ b/manifests/definitions/mailalias.pp @@ -0,0 +1,32 @@ +/* +== 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' + } + +*/ +define mailalias ($ensure = 'present', $recipient) { + mailalias { "${name}": + ensure => $ensure, + recipient => $recipient, + notify => Exec['newaliases'] + } +} -- cgit v1.2.3