8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sendmail / cf / feature / ldap_routing.m4
blob82fa3e59fd541d8496588b5200ac8d1840564b65
1 divert(-1)
3 # Copyright (c) 1999-2002, 2004 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
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.
10 # ident "%Z%%M% %I%     %E% SMI"
13 divert(0)
14 VERSIONID(`$Id: ldap_routing.m4,v 8.14 2004/02/18 02:45:11 gshapiro Exp $')
15 divert(-1)
17 # Check first two arguments.  If they aren't set, may need to warn in proto.m4
18 ifelse(len(X`'_ARG1_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')')
19 ifelse(len(X`'_ARG2_), `1', `define(`_LDAP_ROUTING_WARN_', `yes')')
20 ifelse(len(X`'_ARG5_), `1', `', `define(`_LDAP_ROUTE_NODOMAIN_', `yes')')
22 # Check for third argument to indicate how to deal with non-existant
23 # LDAP records
24 ifelse(len(X`'_ARG3_), `1', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
25        _ARG3_, `passthru', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
26        _ARG3_, `sendertoo', `define(`_LDAP_ROUTING_', `_MUST_EXIST_')define(`_LDAP_SENDER_MUST_EXIST_')',
27        `define(`_LDAP_ROUTING_', `_MUST_EXIST_')')
29 # Check for fourth argument to indicate how to deal with +detail info
30 ifelse(len(X`'_ARG4_), `1', `',
31        _ARG4_, `strip', `define(`_LDAP_ROUTE_DETAIL_', `_STRIP_')',
32        _ARG4_, `preserve', `define(`_LDAP_ROUTE_DETAIL_', `_PRESERVE_')')
34 # Check for sixth argument to indicate how to deal with tempfails
35 ifelse(len(X`'_ARG6_), `1', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')',
36        _ARG6_, `tempfail', `define(`_LDAP_ROUTE_MAPTEMP_', `_TEMPFAIL_')',
37        _ARG6_, `queue', `define(`_LDAP_ROUTE_MAPTEMP_', `_QUEUE_')')
39 LOCAL_CONFIG
40 # LDAP routing maps
41 Kldapmh ifelse(len(X`'_ARG1_), `1',
42                `ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
43                `_ARG1_')
45 Kldapmra ifelse(len(X`'_ARG2_), `1',
46                 `ldap -1 -T<TMPF> -v mailRoutingAddress -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0))',
47                 `_ARG2_')