From 6a83350f630cf12a93ae2b25b5d460ad78a9db20 Mon Sep 17 00:00:00 2001 From: Lari Huttunen Date: Fri, 1 Mar 2013 18:05:59 +0100 Subject: [PATCH] postfix.init.pp: Make sure the postfix user is in the mail group. --- postfix/manifests/init.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/postfix/manifests/init.pp b/postfix/manifests/init.pp index 54366d2..be8e5f3 100644 --- a/postfix/manifests/init.pp +++ b/postfix/manifests/init.pp @@ -76,6 +76,11 @@ class postfix { case $::operatingsystem { "debian","ubuntu": { package {"postgrey": ensure => installed,} + exec { "usermod-postfix": + path => "/bin:/usr/bin:/sbin:/usr/sbin", + command => "usermod -a -G mail postfix", + unless => "id -n -G openldap | grep '\\bmail\\b'", + } } default: { fail("Postgrey module not yet supported in ${::operatingsystem}.")