Merge from vendor branch CVS:
[dragonfly.git] / contrib / sendmail-8.13.4 / cf / feature / compat_check.m4
1 divert(-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 #
11 divert(0)
12 VERSIONID(`$Id: compat_check.m4,v 1.4 2002/02/26 22:15:31 gshapiro Exp $')
13 divert(-1)
14 ifdef(`_ACCESS_TABLE_', `',
15 `errprint(`FEATURE(`compat_check') requires FEATURE(`access_db')
16 ')')
17
18 LOCAL_RULESETS
19 Scheck_compat
20 # look up the pair of addresses
21 # (we use <@> as the separator.  Note this in the map too!)
22 R< $+ > $| $+           $: $1 $| $2
23 R$+ $| < $+ >           $: $1 $| $2
24 R$+ $| $+               $: <$(access Compat:$1<@>$2 $:OK $)>
25 R$* $| $*               $@ ok
26 # act on the result,
27 # it must be one of the following... anything else will be allowed..
28 dnl for consistency with the other two even though discard does not take a
29 dnl reply code
30 R< DISCARD:$* > $#discard $: $1 " - discarded by check_compat"
31 R< DISCARD $* > $#discard $: $1 " - discarded by check_compat"
32 R< TEMP:$* >    $#error $@ TEMPFAIL $: $1 " error from check_compat. Try again later"
33 R< ERROR:$* >   $#error $@ UNAVAILABLE $: $1 " error from check_compat"