Skip to content
Snippets Groups Projects
Commit 3b8ef235 authored by Marc Fournier's avatar Marc Fournier
Browse files

postfix: added support for CentOS and Ubuntu

Based on a suggestion and patch from Nick Anderson. Thanks !
parent 18661db4
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ class postfix { ...@@ -20,7 +20,7 @@ class postfix {
# selinux labels differ from one distribution to another # selinux labels differ from one distribution to another
case $operatingsystem { case $operatingsystem {
RedHat: { RedHat, CentOS: {
case $lsbmajdistrelease { case $lsbmajdistrelease {
"4": { $postfix_seltype = "etc_t" } "4": { $postfix_seltype = "etc_t" }
"5": { $postfix_seltype = "postfix_etc_t" } "5": { $postfix_seltype = "postfix_etc_t" }
...@@ -81,7 +81,9 @@ class postfix { ...@@ -81,7 +81,9 @@ class postfix {
mode => "0644", mode => "0644",
content => $operatingsystem ? { content => $operatingsystem ? {
Redhat => template("postfix/master.cf.redhat5.erb"), Redhat => template("postfix/master.cf.redhat5.erb"),
CentOS => template("postfix/master.cf.redhat5.erb"),
Debian => template("postfix/master.cf.debian-etch.erb"), Debian => template("postfix/master.cf.debian-etch.erb"),
Ubuntu => template("postfix/master.cf.debian-etch.erb"),
}, },
seltype => $postfix_seltype, seltype => $postfix_seltype,
notify => Service["postfix"], notify => Service["postfix"],
...@@ -108,7 +110,7 @@ class postfix { ...@@ -108,7 +110,7 @@ class postfix {
} }
case $operatingsystem { case $operatingsystem {
RedHat: { RedHat, CentOS: {
postfix::config { postfix::config {
"sendmail_path": value => "/usr/sbin/sendmail.postfix"; "sendmail_path": value => "/usr/sbin/sendmail.postfix";
"newaliases_path": value => "/usr/bin/newaliases.postfix"; "newaliases_path": value => "/usr/bin/newaliases.postfix";
......
...@@ -34,7 +34,7 @@ define postfix::hash ($ensure="present") { ...@@ -34,7 +34,7 @@ define postfix::hash ($ensure="present") {
# selinux labels differ from one distribution to another # selinux labels differ from one distribution to another
case $operatingsystem { case $operatingsystem {
RedHat: { RedHat, CentOS: {
case $lsbmajdistrelease { case $lsbmajdistrelease {
"4": { $postfix_seltype = "etc_t" } "4": { $postfix_seltype = "etc_t" }
"5": { $postfix_seltype = "postfix_etc_t" } "5": { $postfix_seltype = "postfix_etc_t" }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment