xref: /illumos-gate/usr/src/cmd/sendmail/cf/feature/greet_pause.m4 (revision 51396a8ee7fb52fe0ab33bfe7b4f495ad431904a)
1divert(-1)
2#
3# Copyright (c) 2004 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#
12
13divert(0)
14VERSIONID(`$Id: greet_pause.m4,v 1.4 2004/07/06 20:49:51 ca Exp $')
15divert(-1)
16
17ifelse(len(X`'_ARG_),`1',`ifdef(`_ACCESS_TABLE_', `',
18	`errprint(`*** ERROR: FEATURE(`greet_pause') requires FEATURE(`access_db')
19')')')
20
21define(`_GREET_PAUSE_', `')
22
23LOCAL_RULESETS
24######################################################################
25###  greet_pause: lookup pause time before 220 greeting
26###
27###	Parameters:
28###		$1: {client_name}
29###		$2: {client_addr}
30######################################################################
31SLocal_greet_pause
32Sgreet_pause
33R$*			$: <$1><?> $| $>"Local_greet_pause" $1
34R<$*><?> $| $#$*	$#$2
35R<$*><?> $| $*		$: $1
36ifdef(`_ACCESS_TABLE_', `dnl
37R$+ $| $+		$: $>D < $1 > <?> <! GreetPause> < $2 >
38R   $| $+		$: $>A < $1 > <?> <! GreetPause> <>	empty client_name
39R<?> <$+>		$: $>A < $1 > <?> <! GreetPause> <>	no: another lookup
40ifelse(len(X`'_ARG_),`1',
41`R<?> <$*>		$@',
42`R<?> <$*>		$# _ARG_')
43R<$* <TMPF>> <$*>	$@
44R<$+> <$*>		$# $1',`dnl
45R$*			$# _ARG_')
46