diff options
Diffstat (limited to 'modules/postfix/templates/ldap_aliases.conf')
-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 %> |