190792Sgshapirodivert(-1)
290792Sgshapiro#
394334Sgshapiro# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
490792Sgshapiro#	All rights reserved.
590792Sgshapiro#
690792Sgshapiro# By using this file, you agree to the terms and conditions set
790792Sgshapiro# forth in the LICENSE file which can be found at the top level of
890792Sgshapiro# the sendmail distribution.
990792Sgshapiro#
1090792Sgshapiro#
1190792Sgshapirodivert(0)
1298121SgshapiroVERSIONID(`$Id: compat_check.m4,v 1.4 2002/02/26 22:15:31 gshapiro Exp $')
1390792Sgshapirodivert(-1)
1490792Sgshapiroifdef(`_ACCESS_TABLE_', `',
1590792Sgshapiro`errprint(`FEATURE(`compat_check') requires FEATURE(`access_db')
1690792Sgshapiro')')
1790792Sgshapiro
1890792SgshapiroLOCAL_RULESETS
1990792SgshapiroScheck_compat
2090792Sgshapiro# look up the pair of addresses
2190792Sgshapiro# (we use <@> as the separator.  Note this in the map too!)
2290792SgshapiroR< $+ > $| $+		$: $1 $| $2
2390792SgshapiroR$+ $| < $+ >		$: $1 $| $2
2490792SgshapiroR$+ $| $+		$: <$(access Compat:$1<@>$2 $:OK $)>
2590792SgshapiroR$* $| $*		$@ ok
2690792Sgshapiro# act on the result,
2790792Sgshapiro# it must be one of the following... anything else will be allowed..
2894334Sgshapirodnl for consistency with the other two even though discard does not take a
2990792Sgshapirodnl reply code
3090792SgshapiroR< DISCARD:$* >	$#discard $: $1 " - discarded by check_compat"
3190792SgshapiroR< DISCARD $* >	$#discard $: $1 " - discarded by check_compat"
3290792SgshapiroR< TEMP:$* >	$#error $@ TEMPFAIL $: $1 " error from check_compat. Try again later"
3390792SgshapiroR< ERROR:$* >	$#error $@ UNAVAILABLE $: $1 " error from check_compat"
34