1divert(-1)
2#
3# Copyright (c) 1983 Eric P. Allman
4# Copyright (c) 1988, 1993
5#	The Regents of the University of California.  All rights reserved.
6#
7# %sccs.include.redist.sh%
8#
9divert(0)
10
11VERSIONID(`@(#)nullrelay.m4	8.1 (Berkeley) 08/21/93')
12
13#
14#  This configuration applies only to relay-only hosts.  They send
15#  all mail to a hub without consideration of the address syntax
16#  or semantics, except for adding the hub qualification to the
17#  addresses.
18#
19
20# hub host (to which all mail is sent)
21DH`'ifdef(`MAIL_HUB', MAIL_HUB,
22	ifdef(`LOCAL_RELAY', LOCAL_RELAY,
23	ifdef(`SMART_HOST', SMART_HOST)))
24
25# route-addr separators
26C: : ,
27
28undivert(6)dnl
29
30######################
31#   Special macros   #
32######################
33
34# SMTP initial login message
35De`'confSMTP_LOGIN_MSG
36
37# UNIX initial From header format
38Dl`'confFROM_LINE
39
40# my name for error messages
41Dn`'confMAILER_NAME
42
43# delimiter (operator) characters
44Do`'confOPERATORS
45
46# format of a total name
47Dq<$g>
48include(`../m4/version.m4')
49
50###############
51#   Options   #
52###############
53
54# strip message body to 7 bits on input?
55O7`'confSEVEN_BIT_INPUT
56
57# no aliases here
58
59# substitution for space (blank) characters
60OB`'confBLANK_SUB
61
62# default delivery mode
63Od`'confDELIVERY_MODE
64
65# error message header/file
66ifdef(`confERROR_MESSAGE',
67	OE`'confERROR_MESSAGE,
68	#OE/etc/sendmail.oE)
69
70# error mode
71ifdef(`confERROR_MODE',
72	Oe`'confERROR_MODE,
73	#Oep)
74
75# save Unix-style "From_" lines at top of header?
76Of`'confSAVE_FROM_LINES
77
78# temporary file mode
79OF`'confTEMP_FILE_MODE
80
81# default GID
82Og`'confDEF_GROUP_ID
83
84# maximum hop count
85Oh`'confMAX_HOP
86
87# location of help file
88OH`'ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf)
89
90# ignore dots as terminators in incoming messages?
91Oi`'confIGNORE_DOTS
92
93# Insist that the BIND name server be running to resolve names
94ifdef(`confBIND_OPTS',
95	OI`'confBIND_OPTS,
96	#OI)
97
98# deliver MIME-encapsulated error messages?
99Oj`'confMIME_FORMAT_ERRORS
100
101# open connection cache size
102Ok`'confMCI_CACHE_SIZE
103
104# open connection cache timeout
105OK`'confMCI_CACHE_TIMEOUT
106
107# use Errors-To: header?
108Ol`'confUSE_ERRORS_TO
109
110# log level
111OL`'confLOG_LEVEL
112
113# send to me too, even in an alias expansion?
114Om`'confME_TOO
115
116# default messages to old style headers if no special punctuation?
117Oo`'confOLD_STYLE_HEADERS
118
119# SMTP daemon options
120ifdef(`confDAEMON_OPTIONS',
121	OO`'confDAEMON_OPTIONS,
122	#OOPort=esmtp)
123
124# privacy flags
125Op`'confPRIVACY_FLAGS
126
127# who (if anyone) should get extra copies of error messages
128ifdef(`confCOPY_ERRORS_TO',
129	OP`'confCOPY_ERRORS_TO,
130	#OPPostmaster)
131
132# slope of queue-only function
133ifdef(`confQUEUE_FACTOR',
134	Oq`'confQUEUE_FACTOR,
135	#Oq600000)
136
137# queue directory
138OQ`'ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue)
139
140# read timeout -- now OK per RFC 1123 section 5.3.2
141ifdef(`confREAD_TIMEOUT',
142	Or`'confREAD_TIMEOUT,
143	#Ordatablock=10m)
144
145# queue up everything before forking?
146Os`'confSAFE_QUEUE
147
148# status file
149OS`'ifdef(`STATUS_FILE', STATUS_FILE, /etc/sendmail.st)
150
151# default message timeout interval
152OT`'confMESSAGE_TIMEOUT
153
154# time zone handling:
155#  if undefined, use system default
156#  if defined but null, use TZ envariable passed in
157#  if defined and non-null, use that info
158ifelse(confTIME_ZONE, `USE_SYSTEM', `#Ot',
159	confTIME_ZONE, `USE_TZ', `',
160	`Ot`'confTIME_ZONE')
161
162# default UID
163Ou`'confDEF_USER_ID
164
165# deliver each queued job in a separate process?
166OY`'confSEPARATE_PROC
167
168# work class factor
169ifdef(`confWORK_CLASS_FACTOR',
170	Oz`'confWORK_CLASS_FACTOR,
171	#Oz1800)
172
173# work time factor
174ifdef(`confWORK_TIME_FACTOR',
175	OZ`'confWORK_TIME_FACTOR,
176	#OZ90000)
177
178###########################
179#   Message precedences   #
180###########################
181
182Pfirst-class=0
183Pspecial-delivery=100
184Plist=-30
185Pbulk=-60
186Pjunk=-100
187
188#####################
189#   Trusted users   #
190#####################
191
192Troot
193Tdaemon
194Tuucp
195
196#########################
197#   Format of headers   #
198#########################
199
200H?P?Return-Path: $g
201HReceived: $?sfrom $s $.$?_($_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b
202H?D?Resent-Date: $a
203H?D?Date: $a
204H?F?Resent-From: $q
205H?F?From: $q
206H?x?Full-Name: $x
207HSubject:
208# HPosted-Date: $a
209# H?l?Received-Date: $b
210H?M?Resent-Message-Id: <$t.$i@$j>
211H?M?Message-Id: <$t.$i@$j>
212#
213######################################################################
214######################################################################
215#####
216#####			REWRITING RULES
217#####
218######################################################################
219######################################################################
220
221###########################################
222###  Rulset 3 -- Name Canonicalization  ###
223###########################################
224S3
225
226# handle null input and list syntax (translate to <@> special case)
227R$@			$@ <@>
228R$*:;$*			$@ $1 :; <@>
229
230# basic textual canonicalization -- note RFC733 heuristic here
231R$*<$*>$*<$*>$*		$2$3<$4>$5			strip multiple <> <>
232R$*<$*<$+>$*>$*		<$3>$5				2-level <> nesting
233R$*<>$*			$@ <@>				MAIL FROM:<> case
234R$*<$+>$*		$2				basic RFC821/822 parsing
235
236# eliminate local host if present
237R@ $=w $=: $+		$@ @ $H $2 $3			@thishost ...
238R@ $+			$@ $1				@somewhere ...
239
240R$+ @ $=w		$@ $1 @ $H			...@thishost
241R$+ @ $+		$@ $1 @ $2			...@somewhere
242
243R$=w ! $+		$@ $2 @ $H			thishost!...
244R$+ ! $+		$@ $1 ! $2 @ $H			somewhere ! ...
245
246R$+ % $=w		$@ $1 @ $H			...%thishost
247R$+ % $+		$@ $1 @ $2			...%somewhere
248
249R$+			$@ $1 @ $H			unadorned user
250
251
252######################################
253###   Ruleset 0 -- Parse Address   ###
254######################################
255
256S0
257
258R$*:;<@>		$#error $@ USAGE $: "list:; syntax illegal for recipient addresses"
259
260# pass everything else to a relay host
261R$*			$#_RELAY_ $@ $H $: $1
262
263#
264######################################################################
265######################################################################
266#####
267`#####			MAILER DEFINITIONS'
268#####
269######################################################################
270######################################################################
271undivert(7)dnl
272