Hello everyone, I was looking for some way of having hash file fallbacks for our ldap lookup tables.
As 'postmap -s' does not work (yet ?) for ldap-backed tables, I've written a small script that uses a ldap_table(5) .cf file as input and outputs a hash table that (hopefully!) includes all elements that could be retrieved by the initial ldap search. I've attached the script to this mail as it may be of interest to some of you too. This is not perfect as only a subset of ldap_table(5) options are handled, but it fits our needs. It uses plain sh and has only dependencies to the (great) Miller tool available here: https://github.com/johnkerl/miller as well as OpenLDAP client tools (ldapsearch to be precise). Any comment is welcome! Best regards, -- Ganael Laplanche <ganael.laplan...@centralesupelec.fr> Unix Systems Engineer @CentraleSupelec Rennes
postfix-ldap2hash.sh
Description: application/shellscript