From 520ca74cdac5bc15b0d28f7a313730655c95d9c8 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 10 Jul 2014 02:10:20 +0200 Subject: Add extra indexes on the LDAP provider. Those will be useful for the tools. --- roles/common-LDAP/templates/etc/ldap/database.ldif.j2 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'roles/common-LDAP') diff --git a/roles/common-LDAP/templates/etc/ldap/database.ldif.j2 b/roles/common-LDAP/templates/etc/ldap/database.ldif.j2 index 874bd9d..7d841b8 100644 --- a/roles/common-LDAP/templates/etc/ldap/database.ldif.j2 +++ b/roles/common-LDAP/templates/etc/ldap/database.ldif.j2 @@ -88,17 +88,25 @@ olcSecurity: simple_bind=128 ssf=128 update_ssf=128 # # To reindex an existing database, you have to # * Stop slapd sudo service slapd stop -# * Reindex su openldap -c "slapindex -b 'dc=fripost,dc=org'" +# * Reindex sudo -u openldap slapindex -b 'dc=fripost,dc=org' # * Restart slapd sudo service slapd start # olcDbIndex: objectClass eq # Let us make Postfix's life easier. -{% if 'MX' in group_names or 'MDA' in group_names %} +{% if 'LDAP-provider' in group_names %} +olcDbIndex: fvd,fvl eq,sub +olcDbIndex: fripostIsStatusActive eq +{% elif 'MX' in group_names or 'MDA' in group_names %} olcDbIndex: fripostIsStatusActive,fvd,fvl eq {% endif %} -{% if 'MX' in group_names %} +{% if 'LDAP-provider' in group_names %} +olcDbIndex: fripostOptionalMaildrop,fripostMaildrop eq,sub +olcDbIndex: fripostCanAddAlias,fripostCanAddList,fripostOwner,fripostPostmaster,fripostListManager eq +{% elif 'MX' in group_names %} olcDbIndex: fripostOptionalMaildrop pres {% endif %} +{% if 'LDAP-provider' in group_names %} +{% endif %} {% if ('LDAP-provider' not in group_names and ('MX' in group_names or 'lists' in group_names)) or 'LDAP-provider' in group_names and -- cgit v1.2.3