dnsbl.m4 revision 261194
164562Sgshapirodivert(-1) 264562Sgshapiro# 3261194Sgshapiro# Copyright (c) 1998-2002, 2005-2007 Proofpoint, Inc. and its suppliers. 464562Sgshapiro# All rights reserved. 564562Sgshapiro# 664562Sgshapiro# By using this file, you agree to the terms and conditions set 764562Sgshapiro# forth in the LICENSE file which can be found at the top level of 864562Sgshapiro# the sendmail distribution. 964562Sgshapiro# 1064562Sgshapiro# 1164562Sgshapiro 12132943Sgshapiroifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') 1364562Sgshapirodivert(0) 1464562Sgshapiroifdef(`_DNSBL_R_',`dnl',`dnl 15261194SgshapiroVERSIONID(`$Id: dnsbl.m4,v 8.34 2013/11/22 20:51:11 ca Exp $') 1690792Sgshapirodefine(`_DNSBL_R_',`') 17159609Sgshapiroifelse(defn(`_ARG_'), `', 18159609Sgshapiro `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')') 1990792SgshapiroLOCAL_CONFIG 2090792Sgshapiro# map for DNS based blacklist lookups 2198121SgshapiroKdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')') 2264562Sgshapirodivert(-1) 23159609Sgshapirodefine(`_DNSBL_SRV_', `_ARG_')dnl 2498121Sgshapirodefine(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_DNSBL_SRV_`"',`_ARG2_')')dnl 2590792Sgshapirodefine(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl 2664562Sgshapirodivert(8) 2764562Sgshapiro# DNS based IP address spam list _DNSBL_SRV_ 2864562SgshapiroR$* $: $&{client_addr} 2990792SgshapiroR$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $) 3064562SgshapiroR<?>OK $: OKSOFAR 3190792Sgshapiroifelse(len(X`'_ARG3_),`1', 3290792Sgshapiro`R<?>$+<TMP> $: TMPOK', 33157001Sgshapiro`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_') 34168515Sgshapiroifelse(`X'_ARG2_,`Xquarantine', 35168515Sgshapiro`R<?>$+ $#error $@ quarantine $: _DNSBL_SRV_', 36168515Sgshapiro`X'_ARG2_,`Xdiscard', 37168515Sgshapiro`R<?>$+ $#discard $: _DNSBL_SRV_', 38168515Sgshapiro`R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_') 3964562Sgshapirodivert(-1) 40