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