1*7c478bd9Sstevel@tonic-gatedivert(-1)
2*7c478bd9Sstevel@tonic-gate#
3*7c478bd9Sstevel@tonic-gate# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
4*7c478bd9Sstevel@tonic-gate#	All rights reserved.
5*7c478bd9Sstevel@tonic-gate#
6*7c478bd9Sstevel@tonic-gate# By using this file, you agree to the terms and conditions set
7*7c478bd9Sstevel@tonic-gate# forth in the LICENSE file which can be found at the top level of
8*7c478bd9Sstevel@tonic-gate# the sendmail distribution.
9*7c478bd9Sstevel@tonic-gate#
10*7c478bd9Sstevel@tonic-gate#ident	"%Z%%M%	%I%	%E% SMI"
11*7c478bd9Sstevel@tonic-gate#
12*7c478bd9Sstevel@tonic-gatedivert(0)
13*7c478bd9Sstevel@tonic-gateVERSIONID(`$Id: compat_check.m4,v 1.4 2002/02/26 22:15:31 gshapiro Exp $')
14*7c478bd9Sstevel@tonic-gatedivert(-1)
15*7c478bd9Sstevel@tonic-gateifdef(`_ACCESS_TABLE_', `',
16*7c478bd9Sstevel@tonic-gate`errprint(`FEATURE(`compat_check') requires FEATURE(`access_db')
17*7c478bd9Sstevel@tonic-gate')')
18*7c478bd9Sstevel@tonic-gate
19*7c478bd9Sstevel@tonic-gateLOCAL_RULESETS
20*7c478bd9Sstevel@tonic-gateScheck_compat
21*7c478bd9Sstevel@tonic-gate# look up the pair of addresses
22*7c478bd9Sstevel@tonic-gate# (we use <@> as the separator.  Note this in the map too!)
23*7c478bd9Sstevel@tonic-gateR< $+ > $| $+		$: $1 $| $2
24*7c478bd9Sstevel@tonic-gateR$+ $| < $+ >		$: $1 $| $2
25*7c478bd9Sstevel@tonic-gateR$+ $| $+		$: <$(access Compat:$1<@>$2 $:OK $)>
26*7c478bd9Sstevel@tonic-gateR$* $| $*		$@ ok
27*7c478bd9Sstevel@tonic-gate# act on the result,
28*7c478bd9Sstevel@tonic-gate# it must be one of the following... anything else will be allowed..
29*7c478bd9Sstevel@tonic-gatednl for consistency with the other two even though discard does not take a
30*7c478bd9Sstevel@tonic-gatednl reply code
31*7c478bd9Sstevel@tonic-gateR< DISCARD:$* >	$#discard $: $1 " - discarded by check_compat"
32*7c478bd9Sstevel@tonic-gateR< DISCARD $* >	$#discard $: $1 " - discarded by check_compat"
33*7c478bd9Sstevel@tonic-gateR< TEMP:$* >	$#error $@ TEMPFAIL $: $1 " error from check_compat. Try again later"
34*7c478bd9Sstevel@tonic-gateR< ERROR:$* >	$#error $@ UNAVAILABLE $: $1 " error from check_compat"
35