access_db.m4 revision 90792
150477Speterdivert(-1)
244212Snewton#
344212Snewton# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
444212Snewton#	All rights reserved.
544212Snewton#
644212Snewton# By using this file, you agree to the terms and conditions set
744212Snewton# forth in the LICENSE file which can be found at the top level of
853846Sbde# the sendmail distribution.
944212Snewton#
1051712Speter#
1144212Snewton
1244212Snewtondivert(0)
1344212SnewtonVERSIONID(`$Id: access_db.m4,v 8.23 2001/03/16 00:51:25 gshapiro Exp $')
1444212Snewtondivert(-1)
1544212Snewton
1660966Speterdefine(`_ACCESS_TABLE_', `')
17define(`_TAG_DELIM_', `:')dnl should be in OperatorChars
18ifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')')
19ifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
20ifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
21ifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
22define(`_ATMPF_', `<TMPF>')dnl
23dnl check whether arg contains -T`'_ATMPF_
24ifelse(defn(`_ARG_'), `', `',
25	defn(`_ARG_'), `LDAP', `',
26	`ifelse(index(_ARG_, _ATMPF_), `-1',
27	`errprint(`*** WARNING: missing -T'_ATMPF_` in argument of FEATURE(`access_db',' defn(`_ARG_')`)
28')
29	define(`_ABP_', index(_ARG_, ` '))
30	define(`_NARG_', `substr(_ARG_, 0, _ABP_) -T'_ATMPF_` substr(_ARG_, _ABP_)')
31')')
32
33LOCAL_CONFIG
34# Access list database (for spam stomping)
35Kaccess ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE -T`'_ATMPF_ MAIL_SETTINGS_DIR`access',
36	       defn(`_ARG_'), `LDAP', `ldap -T`'_ATMPF_ -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=access)(sendmailMTAKey=%0))',
37	       defn(`_NARG_'), `', `_ARG_', `_NARG_')
38