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