diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/postfix/manifests/init.pp | 10 | ||||
-rw-r--r-- | modules/postfix/templates/ldap_aliases.conf | 11 | ||||
-rw-r--r-- | modules/postfix/templates/main.cf | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/modules/postfix/manifests/init.pp b/modules/postfix/manifests/init.pp index 8e789b38..c09cbc2b 100644 --- a/modules/postfix/manifests/init.pp +++ b/modules/postfix/manifests/init.pp @@ -57,6 +57,16 @@ class postfix { mode => 644, content => template("postfix/primary_master.cf"), } + + + $ldap_password = extlookup("postfix_ldap",'x') + file { '/etc/postfix/ldap_aliases.conf': + ensure => present, + owner => root, + group => root, + mode => 644, + content => template("postfix/ldap_aliases.conf"), + } } class secondary_smtp inherits smtp_server { diff --git a/modules/postfix/templates/ldap_aliases.conf b/modules/postfix/templates/ldap_aliases.conf new file mode 100644 index 00000000..e249b8ee --- /dev/null +++ b/modules/postfix/templates/ldap_aliases.conf @@ -0,0 +1,11 @@ +<% +# TODO add some code to take a array of group where people +# have the aliasing +%> +server_host = ldaps://ldap.<%= domain %>:636 +search_base = <%= dc_suffix %> +query_filter = (&(uid=%u)(memberOf=cn=mga-founders,ou=Group,<%= dc_suffix %>)) +result_attribute = mail +bind = yes +bind_dn = cn=postfix-alamut,ou=System Accounts,<%= dc_suffix %> +bind_pw = <%= ldap_password %> diff --git a/modules/postfix/templates/main.cf b/modules/postfix/templates/main.cf index 334fcf43..7474467e 100644 --- a/modules/postfix/templates/main.cf +++ b/modules/postfix/templates/main.cf @@ -52,7 +52,7 @@ fallback_transport = regexp:/etc/postfix/transport_regexp alias_maps = hash:/etc/postfix/aliases # uncomment if we want to enable ldap based alias # and create the file - #ldap:/etc/postfix/ldap_aliases.conf + ldap:/etc/postfix/ldap_aliases.conf <%- end -%> |