Deleted Added
full compact
dnsbl.m4 (157001) dnsbl.m4 (159609)
1divert(-1)
2#
1divert(-1)
2#
3# Copyright (c) 1998-2002, 2005 Sendmail, Inc. and its suppliers.
3# Copyright (c) 1998-2002, 2005, 2006 Sendmail, Inc. and its suppliers.
4# All rights reserved.
5#
6# By using this file, you agree to the terms and conditions set
7# forth in the LICENSE file which can be found at the top level of
8# the sendmail distribution.
9#
10#
11
12ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')')
13divert(0)
14ifdef(`_DNSBL_R_',`dnl',`dnl
4# All rights reserved.
5#
6# By using this file, you agree to the terms and conditions set
7# forth in the LICENSE file which can be found at the top level of
8# the sendmail distribution.
9#
10#
11
12ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')')
13divert(0)
14ifdef(`_DNSBL_R_',`dnl',`dnl
15VERSIONID(`$Id: dnsbl.m4,v 8.30 2005/07/25 20:56:53 ca Exp $')
15VERSIONID(`$Id: dnsbl.m4,v 8.32 2006/03/29 22:50:16 ca Exp $')
16define(`_DNSBL_R_',`')
16define(`_DNSBL_R_',`')
17ifelse(defn(`_ARG_'), `',
18 `errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')')
17LOCAL_CONFIG
18# map for DNS based blacklist lookups
19Kdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')')
20divert(-1)
19LOCAL_CONFIG
20# map for DNS based blacklist lookups
21Kdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')')
22divert(-1)
21define(`_DNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
23define(`_DNSBL_SRV_', `_ARG_')dnl
22define(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_DNSBL_SRV_`"',`_ARG2_')')dnl
23define(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl
24divert(8)
25# DNS based IP address spam list _DNSBL_SRV_
26R$* $: $&{client_addr}
27R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
28R<?>OK $: OKSOFAR
29ifelse(len(X`'_ARG3_),`1',
30`R<?>$+<TMP> $: TMPOK',
31`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_')
32R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_
33divert(-1)
24define(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_DNSBL_SRV_`"',`_ARG2_')')dnl
25define(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl
26divert(8)
27# DNS based IP address spam list _DNSBL_SRV_
28R$* $: $&{client_addr}
29R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
30R<?>OK $: OKSOFAR
31ifelse(len(X`'_ARG3_),`1',
32`R<?>$+<TMP> $: TMPOK',
33`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_')
34R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_
35divert(-1)