access_db.m4 revision 168515
12116Sjkhdivert(-1) 22116Sjkh# 32116Sjkh# Copyright (c) 1998-2002, 2004, 2006 Sendmail, Inc. and its suppliers. 42116Sjkh# All rights reserved. 52116Sjkh# 62116Sjkh# By using this file, you agree to the terms and conditions set 72116Sjkh# forth in the LICENSE file which can be found at the top level of 82116Sjkh# the sendmail distribution. 92116Sjkh# 102116Sjkh# 118870Srgrimes 122116Sjkhdivert(0) 132116SjkhVERSIONID(`$Id: access_db.m4,v 8.27 2006/07/06 21:10:10 ca Exp $') 142116Sjkhdivert(-1) 152116Sjkh 162116Sjkhdefine(`_ACCESS_TABLE_', `') 1750476Speterdefine(`_TAG_DELIM_', `:')dnl should be in OperatorChars 182116Sjkhifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')') 192116Sjkhifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 202116Sjkhifelse(lower(_ARG2_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 212116Sjkhifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')') 222116Sjkhifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 232116Sjkhifelse(lower(_ARG3_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 242116Sjkhifelse(lower(_ARG4_),`skip',`define(`_ACCESS_SKIP_', `1')') 2597413Salfredifelse(lower(_ARG4_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')') 2697413Salfredifelse(lower(_ARG4_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')') 278870Srgrimesdefine(`_ATMPF_', `<TMPF>')dnl 282116Sjkhdnl check whether arg contains -T`'_ATMPF_ 292116Sjkhdnl unless it is a sequence map 302116Sjkhifelse(defn(`_ARG_'), `', `', 312116Sjkh defn(`_ARG_'), `LDAP', `', 322116Sjkh `ifelse(index(_ARG_, `sequence '), `0', `', 332116Sjkh `ifelse(index(_ARG_, _ATMPF_), `-1', 342116Sjkh `errprint(`*** WARNING: missing -T'_ATMPF_` in argument of FEATURE(`access_db',' defn(`_ARG_')`) 358870Srgrimes') 362116Sjkh define(`_ABP_', index(_ARG_, ` ')) 372116Sjkh define(`_NARG_', `substr(_ARG_, 0, _ABP_) -T'_ATMPF_` substr(_ARG_, _ABP_)') 382116Sjkh ') 392116Sjkh ') 402116Sjkh ') 412116Sjkhifdef(`_GREET_PAUSE_', 422116Sjkh `errprint(`*** WARNING: FEATURE(`greet_pause') before FEATURE(`access_db') 432116Sjkh greet_pause will not use access_db!')') 442116Sjkh 452116SjkhLOCAL_CONFIG 462116Sjkh# Access list database (for spam stomping) 472116SjkhKaccess ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE -T`'_ATMPF_ MAIL_SETTINGS_DIR`access', 482116Sjkh 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))', 492116Sjkh defn(`_NARG_'), `', `_ARG_', `_NARG_') 502116Sjkh