106f25ae9SGregory Neil Shapirodivert(-1) 206f25ae9SGregory Neil Shapiro# 306f25ae9SGregory Neil Shapiro# Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers. 406f25ae9SGregory Neil Shapiro# All rights reserved. 506f25ae9SGregory Neil Shapiro# 606f25ae9SGregory Neil Shapiro# By using this file, you agree to the terms and conditions set 706f25ae9SGregory Neil Shapiro# forth in the LICENSE file which can be found at the top level of 806f25ae9SGregory Neil Shapiro# the sendmail distribution. 906f25ae9SGregory Neil Shapiro# 1006f25ae9SGregory Neil Shapiro# 1106f25ae9SGregory Neil Shapiro 1206f25ae9SGregory Neil Shapirodivert(0) 1306f25ae9SGregory Neil ShapiroVERSIONID(`$Id: ldap_routing.m4,v 8.5.4.1 2000/07/15 18:05:05 gshapiro Exp $') 1406f25ae9SGregory Neil Shapirodivert(-1) 1506f25ae9SGregory Neil Shapiro 1606f25ae9SGregory Neil Shapiro# Check first two arguments. If they aren't set, may need to warn in proto.m4 1706f25ae9SGregory Neil Shapiroifelse(len(X`'_ARG1_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')') 1806f25ae9SGregory Neil Shapiroifelse(len(X`'_ARG2_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')') 1906f25ae9SGregory Neil Shapiro 2006f25ae9SGregory Neil Shapiro# Check for third argument to indicate how to deal with non-existant 2106f25ae9SGregory Neil Shapiro# LDAP records 2206f25ae9SGregory Neil Shapiroifelse(len(X`'_ARG3_), `1', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')', 2306f25ae9SGregory Neil Shapiro _ARG3_, `passthru', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')', 2406f25ae9SGregory Neil Shapiro `define(`_LDAP_ROUTING_', `_MUST_EXIST_')') 2506f25ae9SGregory Neil Shapiro 2606f25ae9SGregory Neil ShapiroLOCAL_CONFIG 2706f25ae9SGregory Neil Shapiro# LDAP routing maps 2806f25ae9SGregory Neil ShapiroKldapmh ifelse(len(X`'_ARG1_), `1', 2906f25ae9SGregory Neil Shapiro `ldap -1 -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', 3006f25ae9SGregory Neil Shapiro `_ARG1_') 3106f25ae9SGregory Neil Shapiro 3206f25ae9SGregory Neil ShapiroKldapmra ifelse(len(X`'_ARG2_), `1', 3306f25ae9SGregory Neil Shapiro `ldap -1 -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))', 3406f25ae9SGregory Neil Shapiro `_ARG2_') 35