ldap_routing.m4 revision 64562
164562Sgshapirodivert(-1) 264562Sgshapiro# 364562Sgshapiro# Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers. 464562Sgshapiro# All rights reserved. 564562Sgshapiro# 664562Sgshapiro# By using this file, you agree to the terms and conditions set 764562Sgshapiro# forth in the LICENSE file which can be found at the top level of 864562Sgshapiro# the sendmail distribution. 964562Sgshapiro# 1064562Sgshapiro# 1164562Sgshapiro 1264562Sgshapirodivert(0) 1364562SgshapiroVERSIONID(`$Id: ldap_routing.m4,v 8.5.4.1 2000/07/15 18:05:05 gshapiro Exp $') 1464562Sgshapirodivert(-1) 1564562Sgshapiro 1664562Sgshapiro# Check first two arguments. If they aren't set, may need to warn in proto.m4 1764562Sgshapiroifelse(len(X`'_ARG1_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')') 1864562Sgshapiroifelse(len(X`'_ARG2_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')') 1964562Sgshapiro 2064562Sgshapiro# Check for third argument to indicate how to deal with non-existant 2164562Sgshapiro# LDAP records 2264562Sgshapiroifelse(len(X`'_ARG3_), `1', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')', 2364562Sgshapiro _ARG3_, `passthru', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')', 2464562Sgshapiro `define(`_LDAP_ROUTING_', `_MUST_EXIST_')') 2564562Sgshapiro 2664562SgshapiroLOCAL_CONFIG 2764562Sgshapiro# LDAP routing maps 2864562SgshapiroKldapmh ifelse(len(X`'_ARG1_), `1', 2964562Sgshapiro `ldap -1 -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', 3064562Sgshapiro `_ARG1_') 3164562Sgshapiro 3264562SgshapiroKldapmra ifelse(len(X`'_ARG2_), `1', 3364562Sgshapiro `ldap -1 -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', 3464562Sgshapiro `_ARG2_') 35