138032Speterdivert(-1) 238032Speter# 3261194Sgshapiro# Copyright (c) 1998-2002, 2004, 2006 Proofpoint, Inc. and its suppliers. 464562Sgshapiro# All rights reserved. 538032Speter# 638032Speter# By using this file, you agree to the terms and conditions set 738032Speter# forth in the LICENSE file which can be found at the top level of 838032Speter# the sendmail distribution. 938032Speter# 1038032Speter# 1138032Speter 1238032Speterdivert(0) 13266527SgshapiroVERSIONID(`$Id: access_db.m4,v 8.28 2013-11-22 20:51:11 ca Exp $') 1438032Speterdivert(-1) 1538032Speter 1664562Sgshapirodefine(`_ACCESS_TABLE_', `') 1764562Sgshapirodefine(`_TAG_DELIM_', `:')dnl should be in OperatorChars 1890792Sgshapiroifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')') 1990792Sgshapiroifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 20168515Sgshapiroifelse(lower(_ARG2_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 2190792Sgshapiroifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')') 2290792Sgshapiroifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 23168515Sgshapiroifelse(lower(_ARG3_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 24168515Sgshapiroifelse(lower(_ARG4_),`skip',`define(`_ACCESS_SKIP_', `1')') 25168515Sgshapiroifelse(lower(_ARG4_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 26168515Sgshapiroifelse(lower(_ARG4_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 2790792Sgshapirodefine(`_ATMPF_', `<TMPF>')dnl 2890792Sgshapirodnl check whether arg contains -T`'_ATMPF_ 2994334Sgshapirodnl unless it is a sequence map 3090792Sgshapiroifelse(defn(`_ARG_'), `', `', 3194334Sgshapiro defn(`_ARG_'), `LDAP', `', 3294334Sgshapiro `ifelse(index(_ARG_, `sequence '), `0', `', 3394334Sgshapiro `ifelse(index(_ARG_, _ATMPF_), `-1', 3494334Sgshapiro `errprint(`*** WARNING: missing -T'_ATMPF_` in argument of FEATURE(`access_db',' defn(`_ARG_')`) 3590792Sgshapiro') 3694334Sgshapiro define(`_ABP_', index(_ARG_, ` ')) 3794334Sgshapiro define(`_NARG_', `substr(_ARG_, 0, _ABP_) -T'_ATMPF_` substr(_ARG_, _ABP_)') 3894334Sgshapiro ') 3994334Sgshapiro ') 4094334Sgshapiro ') 41132943Sgshapiroifdef(`_GREET_PAUSE_', 42132943Sgshapiro `errprint(`*** WARNING: FEATURE(`greet_pause') before FEATURE(`access_db') 43132943Sgshapiro greet_pause will not use access_db!')') 4464562Sgshapiro 4564562SgshapiroLOCAL_CONFIG 4664562Sgshapiro# Access list database (for spam stomping) 4790792SgshapiroKaccess ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE -T`'_ATMPF_ MAIL_SETTINGS_DIR`access', 48132943Sgshapiro defn(`_ARG_'), `LDAP', `ldap -T`'_ATMPF_ -1 -v sendmailMTAMapValue,sendmailMTAMapSearch:FILTER:sendmailMTAMapObject,sendmailMTAMapURL:URL:sendmailMTAMapObject -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=access)(sendmailMTAKey=%0))', 4990792Sgshapiro defn(`_NARG_'), `', `_ARG_', `_NARG_') 50