xref: /freebsd/contrib/sendmail/cf/feature/mtamark.m4 (revision ee7b0571c2c18bdec848ed2044223cc88db29bd8)
1e92d3f3fSGregory Neil Shapirodivert(-1)
2e92d3f3fSGregory Neil Shapiro#
35dd76dd0SGregory Neil Shapiro# Copyright (c) 2004, 2005 Proofpoint, Inc. and its suppliers.
4e92d3f3fSGregory Neil Shapiro#	All rights reserved.
5e92d3f3fSGregory Neil Shapiro#
6e92d3f3fSGregory Neil Shapiro# By using this file, you agree to the terms and conditions set
7e92d3f3fSGregory Neil Shapiro# forth in the LICENSE file which can be found at the top level of
8e92d3f3fSGregory Neil Shapiro# the sendmail distribution.
9e92d3f3fSGregory Neil Shapiro#
10e92d3f3fSGregory Neil Shapiro#
11e92d3f3fSGregory Neil Shapiro
12e92d3f3fSGregory Neil Shapirodivert(0)
13e92d3f3fSGregory Neil Shapiroifdef(`_MTAMARK_R',`dnl',`dnl
14*4313cc83SGregory Neil ShapiroVERSIONID(`$Id: mtamark.m4,v 1.3 2013-11-22 20:51:11 ca Exp $')
15e92d3f3fSGregory Neil ShapiroLOCAL_CONFIG
16e92d3f3fSGregory Neil Shapirodefine(`_MTAMARK_R',`')dnl
17e92d3f3fSGregory Neil Shapiro# map for MTA mark
18e92d3f3fSGregory Neil ShapiroKmtamark dns -R TXT -a. -T<TMP> -r`'ifdef(`MTAMARK_TO',`MTAMARK_TO',`5')
19e92d3f3fSGregory Neil Shapiro')
20e92d3f3fSGregory Neil Shapirodivert(-1)
21e92d3f3fSGregory Neil Shapirodefine(`_MTAMARK_RR_', `ifelse(len(X`'_ARG3_),`1',`_perm._smtp._srv',`_ARG3_')')dnl
22e92d3f3fSGregory Neil Shapirodefine(`_MTAMARK_MSG_', `ifelse(len(X`'_ARG_),`1',`"550 Rejected: " $`'&{client_addr} " not listed as MTA"',`_ARG_')')dnl
23e92d3f3fSGregory Neil Shapirodefine(`_MTAMARK_MSG_TMP_', `ifelse(_ARG2_,`t',`"451 Temporary lookup failure of " _MTAMARK_RR_.$`'&{client_addr}',`_ARG2_')')dnl
24e92d3f3fSGregory Neil Shapirodivert(8)
25e92d3f3fSGregory Neil Shapiro# DNS based IP MTA list
26e92d3f3fSGregory Neil ShapiroR$*		$: $&{client_addr}
27e92d3f3fSGregory Neil ShapiroR$-.$-.$-.$-	$: <?> $(mtamark _MTAMARK_RR_.$4.$3.$2.$1.in-addr.arpa. $: OK $)
28e92d3f3fSGregory Neil ShapiroR<?>1.		$: OKSOFAR
29e92d3f3fSGregory Neil ShapiroR<?>0.		$#error $@ 5.7.1 $: _MTAMARK_MSG_
30e92d3f3fSGregory Neil Shapiroifelse(len(X`'_ARG2_),`1',
31e92d3f3fSGregory Neil Shapiro`R<?>$+<TMP>	$: TMPOK',
324e4196cbSGregory Neil Shapiro`R<?>$+<TMP>	$#error $@ 4.4.3 $: _MTAMARK_MSG_TMP_')
33e92d3f3fSGregory Neil Shapirodivert(-1)
34