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