xref: /onnv-gate/usr/src/cmd/sendmail/cf/feature/enhdnsbl.m4 (revision 3544:8dfb1c11a5d7)
10Sstevel@tonic-gatedivert(-1)
20Sstevel@tonic-gate#
3*3544Sjbeck# Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
40Sstevel@tonic-gate#	All rights reserved.
50Sstevel@tonic-gate#
60Sstevel@tonic-gate# By using this file, you agree to the terms and conditions set
70Sstevel@tonic-gate# forth in the LICENSE file which can be found at the top level of
80Sstevel@tonic-gate# the sendmail distribution.
90Sstevel@tonic-gate#
10616Sjbeck# ident	"%Z%%M%	%I%	%E% SMI"
110Sstevel@tonic-gate#
120Sstevel@tonic-gate
132197Sjbeckifelse(defn(`_ARG_'), `',
142197Sjbeck	`errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
150Sstevel@tonic-gatedivert(0)
160Sstevel@tonic-gateifdef(`_EDNSBL_R_',`dnl',`dnl
17*3544SjbeckVERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
180Sstevel@tonic-gateLOCAL_CONFIG
190Sstevel@tonic-gatedefine(`_EDNSBL_R_',`')dnl
200Sstevel@tonic-gate# map for enhanced DNS based blacklist lookups
210Sstevel@tonic-gateKednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
220Sstevel@tonic-gate')
230Sstevel@tonic-gatedivert(-1)
242197Sjbeckdefine(`_EDNSBL_SRV_', `_ARG_')dnl
25*3544Sjbeckdefine(`_EDNSBL_MSG_',
26*3544Sjbeck	`ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',
27*3544Sjbeck		X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_',
28*3544Sjbeck		`_ARG2_')')dnl
290Sstevel@tonic-gatedefine(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
300Sstevel@tonic-gatedefine(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl
31*3544Sjbeckdefine(`_EDNSBL_ACTION_',
32*3544Sjbeck	`ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine',
33*3544Sjbeck		X`'_ARG2_,`Xdiscard',`$`'#discard',
34*3544Sjbeck		`$`'#error $`'@ 5.7.1')')dnl
350Sstevel@tonic-gatedivert(8)
360Sstevel@tonic-gate# DNS based IP address spam list _EDNSBL_SRV_
370Sstevel@tonic-gateR$*			$: $&{client_addr}
380Sstevel@tonic-gateR$-.$-.$-.$-		$: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
390Sstevel@tonic-gateR<?>OK			$: OKSOFAR
400Sstevel@tonic-gateifelse(len(X`'_ARG3_),`1',
410Sstevel@tonic-gate`R<?>$+<TMP>		$: TMPOK',
42616Sjbeck`R<?>$+<TMP>		$#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
43*3544SjbeckR<?>_EDNSBL_MATCH_	_EDNSBL_ACTION_ $: _EDNSBL_MSG_
440Sstevel@tonic-gateifelse(len(X`'_ARG5_),`1',`dnl',
45*3544Sjbeck`R<?>_ARG5_		_EDNSBL_ACTION_ $: _EDNSBL_MSG_')
460Sstevel@tonic-gateifelse(len(X`'_ARG6_),`1',`dnl',
47*3544Sjbeck`R<?>_ARG6_		_EDNSBL_ACTION_ $: _EDNSBL_MSG_')
480Sstevel@tonic-gateifelse(len(X`'_ARG7_),`1',`dnl',
49*3544Sjbeck`R<?>_ARG7_		_EDNSBL_ACTION_ $: _EDNSBL_MSG_')
500Sstevel@tonic-gateifelse(len(X`'_ARG8_),`1',`dnl',
51*3544Sjbeck`R<?>_ARG8_		_EDNSBL_ACTION_ $: _EDNSBL_MSG_')
520Sstevel@tonic-gateifelse(len(X`'_ARG9_),`1',`dnl',
53*3544Sjbeck`R<?>_ARG9_		_EDNSBL_ACTION_ $: _EDNSBL_MSG_')
540Sstevel@tonic-gatedivert(-1)
55