Commit 96bde40a authored by Cédric Jeanneret's avatar Cédric Jeanneret Committed by Issey Llambias
Browse files

postfix - added new class for ldap support

parent 1bc11c66
Loading
Loading
Loading
Loading
+19
Changes for manifests/classes/postfix-ldap.pp: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
class postfix::ldap inherits postfix {
  Postfix::Config["alias_maps"] {
    value => "'hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf'",
  }

  package {"postfix-ldap": }

  if ! $postfix_ldap_base {
    fail 'Missing $postfix_ldap_base !'
  }

  file {"/etc/postfix/ldap-aliases.cf":
    ensure  => present,
    owner   => root,
    group   => postfix,
    content => template("postfix/postfix-ldap-aliases.cf.erb"),
    require => Package["postfix-ldap"],
  }
}
+12
Changes for templates/postfix-ldap-aliases.cf.erb: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
# File managed by puppet
<% if has_variable?("postfix_ldap_host") -%>
server_host = <%= postfix_ldap_host %>
<% else -%>
server_host = localhost
<% end -%>
<% if has_variable?("postfix_ldap_base") -%>
search_base = <%= postfix_ldap_base %>
<% end -%>
<% if has_variable?('postfix_ldap_options') -%>
<%= postfix_ldap_options %>
<% end -%>