diff options
author | Michael Scherer <misc@mageia.org> | 2011-03-08 14:50:45 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-03-08 14:50:45 +0000 |
commit | 3dc06dfd8b69423d67df09283ec61e762b6099c9 (patch) | |
tree | c99524c68c1fc53e6a82d36707bcb7b43f569ed2 /modules/postfix/templates | |
parent | ff81c47444e3819c2b97b43891ac11cb14b14d1b (diff) | |
download | puppet-3dc06dfd8b69423d67df09283ec61e762b6099c9.tar puppet-3dc06dfd8b69423d67df09283ec61e762b6099c9.tar.gz puppet-3dc06dfd8b69423d67df09283ec61e762b6099c9.tar.bz2 puppet-3dc06dfd8b69423d67df09283ec61e762b6099c9.tar.xz puppet-3dc06dfd8b69423d67df09283ec61e762b6099c9.zip |
allow to have more than one ldap group with aliases
Diffstat (limited to 'modules/postfix/templates')
-rw-r--r-- | modules/postfix/templates/ldap_aliases.conf | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/postfix/templates/ldap_aliases.conf b/modules/postfix/templates/ldap_aliases.conf index e249b8ee..8bca9017 100644 --- a/modules/postfix/templates/ldap_aliases.conf +++ b/modules/postfix/templates/ldap_aliases.conf @@ -1,10 +1,13 @@ -<% -# TODO add some code to take a array of group where people -# have the aliasing -%> +<%- +# TODO I am sure that a more elegant way could be find +query_string = '' +aliases_group.each do |g| + query_string += '(memberOf=cn=' + g + ',ou=Group,' + dc_suffix + ')' +end +-%> server_host = ldaps://ldap.<%= domain %>:636 search_base = <%= dc_suffix %> -query_filter = (&(uid=%u)(memberOf=cn=mga-founders,ou=Group,<%= dc_suffix %>)) +query_filter = (&(uid=%u)(|<%= query_string %>)) result_attribute = mail bind = yes bind_dn = cn=postfix-alamut,ou=System Accounts,<%= dc_suffix %> |