local.m4 revision 42575
1PUSHDIVERT(-1)
2#
3# Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
4# Copyright (c) 1983 Eric P. Allman.  All rights reserved.
5# Copyright (c) 1988, 1993
6#	The Regents of the University of California.  All rights reserved.
7#
8# By using this file, you agree to the terms and conditions set
9# forth in the LICENSE file which can be found at the top level of
10# the sendmail distribution.
11#
12#
13ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmn9')')
14ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/mail)')
15ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d $u')')
16ifdef(`LOCAL_SHELL_FLAGS',, `define(`LOCAL_SHELL_FLAGS', `eu9')')
17ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /bin/sh)')
18ifdef(`LOCAL_SHELL_ARGS',, `define(`LOCAL_SHELL_ARGS', `sh -c $u')')
19ifdef(`LOCAL_SHELL_DIR',, `define(`LOCAL_SHELL_DIR', `$z:/')')
20POPDIVERT
21
22##################################################
23###   Local and Program Mailer specification   ###
24##################################################
25
26VERSIONID(`@(#)local.m4	8.30 (Berkeley) 6/30/1998')
27
28Mlocal,		P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40,
29		_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix,
30		A=LOCAL_MAILER_ARGS
31Mprog,		P=LOCAL_SHELL_PATH, F=CONCAT(`lsDFMoq', LOCAL_SHELL_FLAGS), S=10/30, R=20/40, D=LOCAL_SHELL_DIR,
32		_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix,
33		A=LOCAL_SHELL_ARGS
34
35#
36#  Envelope sender rewriting
37#
38S10
39R<@>			$n			errors to mailer-daemon
40R@ <@ $*>		$n			temporarily bypass Sun bogosity
41R$+			$: $>50 $1		add local domain if needed
42R$*			$: $>94 $1		do masquerading
43
44#
45#  Envelope recipient rewriting
46#
47S20
48R$+ < @ $* >		$: $1			strip host part
49
50#
51#  Header sender rewriting
52#
53S30
54R<@>			$n			errors to mailer-daemon
55R@ <@ $*>		$n			temporarily bypass Sun bogosity
56R$+			$: $>50 $1		add local domain if needed
57R$*			$: $>93 $1		do masquerading
58
59#
60#  Header recipient rewriting
61#
62S40
63R$+			$: $>50 $1		add local domain if needed
64ifdef(`_ALL_MASQUERADE_', `dnl
65R$*			$: $>93 $1		do all-masquerading', `dnl')
66
67#
68#  Common code to add local domain name (only if always-add-domain)
69#
70S50
71ifdef(`_ALWAYS_ADD_DOMAIN_', `dnl
72R$* < @ $* > $* 	$@ $1 < @ $2 > $3		already fully qualified
73R$+			$@ $1 < @ *LOCAL* >		add local qualification',
74`dnl')
75