crans_bcfg2/etc/python/template/postfix/ldap.py
Jeremie Dimino 81ab684f93 Ajout de fichiers dans le plugins python.
darcs-hash:20071218042114-af139-8ce65c1c19fb24d871bddf18dfc29bd0627a40b1.gz
2007-12-18 05:21:14 +01:00

23 lines
637 B
Python

# -*- mode: python; coding: utf-8 -*-
# Ce fichier sert de template pour les fichiers /etc/postfix/ldap-*.cf
# Pour l'utuliser, il faut l'inclure en instanciant les variables:
# query: requete faite a la base
# result: le champ a recuperer dans le resultat
include("secrets")
@# Connexion LDAP
%server_host = ldap_host
%search_base = "ou=data,dc=crans,dc=org"
%version = 3
%bind = True
%bind_dn = secrets.ldap_postfix_auth_dn
%bind_pw = secrets.ldap_postfix_password
@# Requete faite a la base, %s est remplace
@# par l'alias recherche
%query_filter = query
@# Le champ qui nous interresse en particulier
%result_attribute = result