xref: /onnv-gate/usr/src/cmd/sendmail/cf/feature/mtamark.m4 (revision 616:058cb0a28853)
10Sstevel@tonic-gatedivert(-1)
20Sstevel@tonic-gate#
3*616Sjbeck# Copyright (c) 2004, 2005 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#
100Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
110Sstevel@tonic-gate#
120Sstevel@tonic-gate
130Sstevel@tonic-gatedivert(0)
140Sstevel@tonic-gateifdef(`_MTAMARK_R',`dnl',`dnl
15*616SjbeckVERSIONID(`$Id: mtamark.m4,v 1.2 2005/07/25 20:56:53 ca Exp $')
160Sstevel@tonic-gateLOCAL_CONFIG
170Sstevel@tonic-gatedefine(`_MTAMARK_R',`')dnl
180Sstevel@tonic-gate# map for MTA mark
190Sstevel@tonic-gateKmtamark dns -R TXT -a. -T<TMP> -r`'ifdef(`MTAMARK_TO',`MTAMARK_TO',`5')
200Sstevel@tonic-gate')
210Sstevel@tonic-gatedivert(-1)
220Sstevel@tonic-gatedefine(`_MTAMARK_RR_', `ifelse(len(X`'_ARG3_),`1',`_perm._smtp._srv',`_ARG3_')')dnl
230Sstevel@tonic-gatedefine(`_MTAMARK_MSG_', `ifelse(len(X`'_ARG_),`1',`"550 Rejected: " $`'&{client_addr} " not listed as MTA"',`_ARG_')')dnl
240Sstevel@tonic-gatedefine(`_MTAMARK_MSG_TMP_', `ifelse(_ARG2_,`t',`"451 Temporary lookup failure of " _MTAMARK_RR_.$`'&{client_addr}',`_ARG2_')')dnl
250Sstevel@tonic-gatedivert(8)
260Sstevel@tonic-gate# DNS based IP MTA list
270Sstevel@tonic-gateR$*		$: $&{client_addr}
280Sstevel@tonic-gateR$-.$-.$-.$-	$: <?> $(mtamark _MTAMARK_RR_.$4.$3.$2.$1.in-addr.arpa. $: OK $)
290Sstevel@tonic-gateR<?>1.		$: OKSOFAR
300Sstevel@tonic-gateR<?>0.		$#error $@ 5.7.1 $: _MTAMARK_MSG_
310Sstevel@tonic-gateifelse(len(X`'_ARG2_),`1',
320Sstevel@tonic-gate`R<?>$+<TMP>	$: TMPOK',
33*616Sjbeck`R<?>$+<TMP>	$#error $@ 4.4.3 $: _MTAMARK_MSG_TMP_')
340Sstevel@tonic-gatedivert(-1)
35