Stopping index_param failed errors in the /var/log/slapd.log file

(UP)

A lot of customers seem to report this message spamming the /var/log/slapd.log file on open directory replicas and masters:

Jun 13 09:04:11 tiger slapd[45]: <= bdb_equality_candidates: (kerio-Mail-Address) index_param failed (18)\n

Jun 15 04:00:59 tiger slapd[45]: <= bdb_equality_candidates: (kerio-Mail-Address) index_param failed (18)\n
Or, another example of this error:
Aug 24 09:58:33 tiger slapd[754]: <= bdb_equality_candidates: (kerio-Mail-AccountEnabled) index_param failed (18)\n

To fix this, perform the following steps on the open directory master and replicas:

  1. Put the following lines at the end of the /etc/openldap/slapd.conf file.

    index kerio-Mail-Address eq
    index kerio-Mail-AccountEnabled eq

    Specifically, it seems these lines must be after the line which "includes" the slapd_macosxserver.conf file.

  2. From a terminal or SSH session, become root then run the following command:

    slapindex
    
  3. Restart slapd as follows:

    killall -HUP slapd