1*68205Sericdivert(-1)
2*68205Seric#
3*68205Seric# Copyright (c) 1983 Eric P. Allman
4*68205Seric# Copyright (c) 1988, 1993
5*68205Seric#	The Regents of the University of California.  All rights reserved.
6*68205Seric#
7*68205Seric# %sccs.include.redist.sh%
8*68205Seric#
9*68205Seric
10*68205Sericdivert(0)
11*68205SericVERSIONID(`@(#)bestmx_is_local.m4	8.1 (Berkeley) 01/26/95')
12*68205Sericdivert(-1)
13*68205Seric
14*68205SericLOCAL_CONFIG
15*68205SericKbestmx bestmx
16*68205Seric
17*68205SericLOCAL_NET_CONFIG
18*68205Seric
19*68205Seric# If we are the best MX for a site, then we want to accept
20*68205Seric# its mail as local.  We assume we've already weeded out mail to
21*68205Seric# UUCP sites which are connected to us, which should also have
22*68205Seric# listed us as their best MX.
23*68205Seric#
24*68205Seric# Warning: this may generate a lot of extra DNS traffic -- a
25*68205Seric# lower cost method is to list all the expected best MX hosts
26*68205Seric# in $=w.  This should be fine (and easier to administer) for
27*68205Seric# low to medium traffic hosts.
28*68205Seric
29*68205SericR$* < @ $* > $*			$: $1 < @ $2 @@ $(bestmx $2 $) > $3
30*68205SericR$* < @ $* @@ $=w . > $*	$#local $: $1
31*68205SericR$* < @ $* @@ $* > $*		$: $1 < @ $2 > $4
32