3 # Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
13 VERSIONID(`$Id: ldap_routing.m4,v 8.10 2002/03/27 22:17:43 ca Exp $')
16 # Check first two arguments. If they aren't set, may need to warn in proto.m4
17 ifelse(len(X`'_ARG1_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')')
18 ifelse(len(X`'_ARG2_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')')
20 # Check for third argument to indicate how to deal with non-existant
22 ifelse(len(X`'_ARG3_), `1', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
23 _ARG3_, `passthru', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
24 `define(`_LDAP_ROUTING_', `_MUST_EXIST_')')
26 # Check for fouth argument to indicate how to deal with +detail info
27 ifelse(len(X`'_ARG4_), `1', `',
28 _ARG4_, `strip', `define(`_LDAP_ROUTE_DETAIL_', `_STRIP_')',
29 _ARG4_, `preserve', `define(`_LDAP_ROUTE_DETAIL_', `_PRESERVE_')')
33 Kldapmh ifelse(len(X`'_ARG1_), `1',
34 `ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
37 Kldapmra ifelse(len(X`'_ARG2_), `1',
38 `ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',