access_db.m4 revision 98121
190792Sgshapirodivert(-1)
290792Sgshapiro#
3132943Sgshapiro# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
490792Sgshapiro#	All rights reserved.
590792Sgshapiro#
690792Sgshapiro# By using this file, you agree to the terms and conditions set
790792Sgshapiro# forth in the LICENSE file which can be found at the top level of
890792Sgshapiro# the sendmail distribution.
990792Sgshapiro#
1090792Sgshapiro#
1190792Sgshapiro
1290792Sgshapirodivert(0)
13132943SgshapiroVERSIONID(`$Id: access_db.m4,v 8.24 2002/03/06 21:50:25 ca Exp $')
1490792Sgshapirodivert(-1)
1590792Sgshapiro
1690792Sgshapirodefine(`_ACCESS_TABLE_', `')
1790792Sgshapirodefine(`_TAG_DELIM_', `:')dnl should be in OperatorChars
1890792Sgshapiroifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')')
1990792Sgshapiroifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
2090792Sgshapiroifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
21132943Sgshapiroifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
2290792Sgshapirodefine(`_ATMPF_', `<TMPF>')dnl
23dnl check whether arg contains -T`'_ATMPF_
24dnl unless it is a sequence map
25ifelse(defn(`_ARG_'), `', `',
26  defn(`_ARG_'), `LDAP', `',
27  `ifelse(index(_ARG_, `sequence '), `0', `',
28    `ifelse(index(_ARG_, _ATMPF_), `-1',
29      `errprint(`*** WARNING: missing -T'_ATMPF_` in argument of FEATURE(`access_db',' defn(`_ARG_')`)
30')
31      define(`_ABP_', index(_ARG_, ` '))
32      define(`_NARG_', `substr(_ARG_, 0, _ABP_) -T'_ATMPF_` substr(_ARG_, _ABP_)')
33      ')
34    ')
35  ')
36
37LOCAL_CONFIG
38# Access list database (for spam stomping)
39Kaccess ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE -T`'_ATMPF_ MAIL_SETTINGS_DIR`access',
40	       defn(`_ARG_'), `LDAP', `ldap -T`'_ATMPF_ -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=access)(sendmailMTAKey=%0))',
41	       defn(`_NARG_'), `', `_ARG_', `_NARG_')
42