]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/sendmail/cf/hack/xconnect.m4
Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
[FreeBSD/FreeBSD.git] / contrib / sendmail / cf / hack / xconnect.m4
1 divert(-1)
2 #
3 # Copyright (c) 1998-2011 Proofpoint, Inc. and its suppliers.
4 #       All rights reserved.
5 # Copyright (c) 1983 Eric P. Allman.  All rights reserved.
6 # Copyright (c) 1988, 1993
7 #       The Regents of the University of California.  All rights reserved.
8 #
9 # By using this file, you agree to the terms and conditions set
10 # forth in the LICENSE file which can be found at the top level of
11 # the sendmail distribution.
12 #
13
14 divert(0)
15 VERSIONID(`$Id: xconnect.m4,v 1.3 2013-11-22 20:51:13 ca Exp $')
16 divert(-1)
17
18 ifdef(`_ACCESS_TABLE_', `dnl
19 LOCAL_RULESETS
20 #
21 # x_connect ruleset for looking up XConnect: tag in access DB to enable
22 # XCONNECT support in MTA
23 # if the RHS of the map entry is haproxy1,
24 # then HAproxy protocol version 1 is used
25 #
26 Sx_connect
27 dnl workspace: {client_name} $| {client_addr}
28 R$+ $| $+               $: $>D < $1 > <?> <! XConnect> < $2 >
29 dnl workspace: <result-of-lookup> <{client_addr}>
30 dnl OR $| $+ if client_name is empty
31 R   $| $+               $: $>A < $1 > <?> <! XConnect> <>       empty client_name
32 dnl workspace: <result-of-lookup> <{client_addr}>
33 R<?> <$+>               $: $>A < $1 > <?> <! XConnect> <>       no: another lookup
34 dnl workspace: <result-of-lookup> (<>|<{client_addr}>)
35 R<?> <$*>               $# no                                   found nothing
36 dnl workspace: <result-of-lookup> (<>|<{client_addr}>) | OK
37 R<$+> <$*>              $@ $1                                   found in access DB',
38         `errprint(`*** ERROR: HACK(xconnect) requires FEATURE(access_db)
39 ')')