dnsbl.m4 revision 157001
138032Speterdivert(-1) 238032Speter# 3261194Sgshapiro# Copyright (c) 1998-2002, 2005 Sendmail, 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 1238032Speterifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')') 1338032Speterdivert(0) 1438032Speterifdef(`_DNSBL_R_',`dnl',`dnl 1538032SpeterVERSIONID(`$Id: dnsbl.m4,v 8.30 2005/07/25 20:56:53 ca Exp $') 1638032Speterdefine(`_DNSBL_R_',`') 1738032SpeterLOCAL_CONFIG 1838032Speter# map for DNS based blacklist lookups 1938032SpeterKdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')') 2038032Speterdivert(-1) 2138032Speterdefine(`_DNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl 2238032Speterdefine(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_DNSBL_SRV_`"',`_ARG2_')')dnl 2338032Speterdefine(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl 2438032Speterdivert(8) 2538032Speter# DNS based IP address spam list _DNSBL_SRV_ 2638032SpeterR$* $: $&{client_addr} 2738032SpeterR$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $) 2838032SpeterR<?>OK $: OKSOFAR 2938032Speterifelse(len(X`'_ARG3_),`1', 3038032Speter`R<?>$+<TMP> $: TMPOK', 3138032Speter`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_') 32266527SgshapiroR<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_ 3364562Sgshapirodivert(-1) 3438032Speter