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