BSD 4_3_Tahoe development
[unix-history] / .ref-BSD-4_3 / usr / lib / sendmail.cf
... / ...
CommitLineData
1#
2# Sendmail
3# Copyright (c) 1983 Eric P. Allman
4# Berkeley, California
5#
6# Copyright (c) 1983 Regents of the University of California.
7# All rights reserved. The Berkeley software License Agreement
8# specifies the terms and conditions for redistribution.
9#
10# @(#)monet.mc 5.1 (Berkeley) 6/10/85
11#
12############################################################
13############################################################
14#####
15##### SENDMAIL CONFIGURATION FILE
16#####
17############################################################
18############################################################
19
20
21
22############################################################
23### local info
24############################################################
25
26# internet hostname
27Cwucbmonet monet
28
29
30#################################################
31#
32# General configuration information
33#
34#################################################
35
36######################
37# General Macros #
38######################
39
40# our arpanet gateway
41DABerkeley.EDU
42CABerkeley UCB ucbc70 c70 UCB-C70 u UCB-VAX ucbvax
43
44# local domain names
45DDBERKELEY.EDU
46CDBERKELEY UCB ucbc70 c70 ucb-c70 u UCB-VAX ucbvax
47
48# major relay host
49DRUCBVAX
50CRucbvax vax k
51
52# my official hostname
53Dj$w
54
55# known SMTP/ethernet hosts (this domain only) -- only $R need be complete
56
57CSucbarmstrong armstrong
58CSucbarpa arpa
59CSucbbach bach ucbstatvax statvax
60CSucbbass bass
61CSucbbell bell
62CSucbbizet bizet
63CSucbbob bob
64CSucbbrahms brahms mathstat
65CSucbbud bud
66CSucbbuddy buddy
67CSucbcad cad cad-a
68CSucbcalder calder
69CSucbcartan cartan
70CSucbchip chip
71CSucbcogsci cogsci
72CSucbcorona corona
73CSucbcory cory
74CSucbdab dab
75CSucbdali dali
76CSucbdavinci davinci
77CSucbdavis davis
78CSucbdean dean
79CSucbdeforest deforest
80CSucbdegas degas
81CSucbdim dim
82CSucbdorothy dorothy
83CSucbear ear
84CSucbeast east beast
85CSucbedison edison
86CSucbernie ernie
87CSucbesvax esvax
88CSucbeuler euler
89CSucbfranklin franklin
90CSucbfranny franny
91CSucbheine heine
92CSucbholden holden
93CSucbhuffman huffman
94CSucbic ic ucbic-ec ic-ec cad-b cad-ic
95CSucbicw icw ucbicw-ec icw-ec cad-c cad-icw
96CSucbimage
97CSucbingres ingres
98CSucbjan jan
99CSucbjason jason
100CSucbji ji
101CSucbjoule joule
102CSucbkepler kepler
103CSucbkim kim
104CSucbmarconi marconi
105CSucbmatisse matisse
106CSucbmaxwell maxwell
107CSucbmedea medea
108CSucbmerlin merlin
109CSucbmike mike
110CSucbmiro miro
111CSucbmolson molson
112CSucbmonet monet
113CSucbmote mote
114CSucbnewton newton
115CSucbnyquist nyquist
116CSucbokeeffe okeeffe
117CSucboz oz
118CSucbrenoir renoir
119CSucbrob rob
120CSucbrobert robert
121CSucbseymour seymour
122CSucbshadow shadow
123CSucbshannon shannon
124CSucbsilvia silvia
125CSucbtuborg tuborg
126CSucbugs bugs ucbbugs ugs
127CSucbvangogh vangogh
128CSucbvax
129CSucbweyl weyl
130CSucbzeus zeus
131CSucbzooey zooey
132CSucbzworykin zworykin
133
134# known top-level domains
135CTLOCAL ARPA EDU GOV COM MIL
136CTUUCP BITNET CSNET DEC
137
138
139############################################################
140#
141# General configuration information
142#
143# This information is basically just "boiler-plate"; it must be
144# there, but is essentially constant.
145#
146# Information in this file should be independent of location --
147# i.e., although there are some policy decisions made, they are
148# not specific to Berkeley per se.
149#
150############################################################
151
152
153######################
154# Version Number #
155######################
156
157DZ5.17
158
159
160##########################
161### Special macros ###
162##########################
163
164# my name
165DnMAILER-DAEMON
166# UNIX header format
167DlFrom $g $d
168# delimiter (operator) characters
169Do.:%@!^=/[]
170# format of a total name
171Dq$g$?x ($x)$.
172# SMTP login message
173De$j Sendmail $v/$Z ready at $b
174
175# forwarding host -- redefine this if you can't talk to the relay directly
176DF$R
177
178###################
179### Options ###
180###################
181
182# location of alias file
183OA/usr/lib/aliases
184# wait up to ten minutes for alias file rebuild
185Oa10
186# substitution for space (blank) characters
187OB.
188# (don't) connect to "expensive" mailers
189#Oc
190# default delivery mode (deliver in background)
191Odbackground
192# temporary file mode
193OF0600
194# default GID
195Og1
196# location of help file
197OH/usr/lib/sendmail.hf
198# log level
199OL9
200# default network name
201ONARPA
202# default messages to old style
203Oo
204# queue directory
205OQ/usr/spool/mqueue
206# read timeout -- violates protocols
207Or2h
208# status file
209OS/usr/lib/sendmail.st
210# queue up everything before starting transmission
211Os
212# default timeout interval
213OT3d
214# time zone names (V6 only)
215OtPST,PDT
216# default UID
217Ou1
218# wizard's password
219OW*
220# load average at which we just queue messages
221Ox8
222# load average at which we refuse connections
223OX12
224
225###############################
226### Message precedences ###
227###############################
228
229Pfirst-class=0
230Pspecial-delivery=100
231Pbulk=-60
232Pjunk=-100
233
234#########################
235### Trusted users ###
236#########################
237
238Troot
239Tdaemon
240Tuucp
241Teric
242Tnetwork
243
244#############################
245### Format of headers ###
246#############################
247
248H?P?Return-Path: <$g>
249HReceived: $?sfrom $s $.by $j ($v/$Z)
250 id $i; $b
251H?D?Resent-Date: $a
252H?D?Date: $a
253H?F?Resent-From: $q
254H?F?From: $q
255H?x?Full-Name: $x
256HSubject:
257# HPosted-Date: $a
258# H?l?Received-Date: $b
259H?M?Resent-Message-Id: <$t.$i@$j>
260H?M?Message-Id: <$t.$i@$j>
261
262###########################
263### Rewriting rules ###
264###########################
265
266
267################################
268# Sender Field Pre-rewriting #
269################################
270S1
271#R$*<$*>$* $1$2$3 defocus
272
273###################################
274# Recipient Field Pre-rewriting #
275###################################
276S2
277#R$*<$*>$* $1$2$3 defocus
278
279#################################
280# Final Output Post-rewriting #
281#################################
282S4
283
284R@ $@ handle <> error addr
285
286# externalize local domain info
287R$*<$*LOCAL>$* $1<$2$D>$3 change local info
288R$*<$*LOCAL.ARPA>$* $1<$2$D>$3 change local info
289R$*<$*.CC>$* $1$2$3 strip .CC
290R$*<$+>$* $1$2$3 defocus
291R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical
292
293# UUCP must always be presented in old form
294R$+@$-.UUCP $2!$1 u@h.UUCP => h!u
295
296# delete duplicate local names -- mostly for arpaproto.mc
297R$+%$=w@$=w $1@$3 u%UCB@UCB => u@UCB
298R$+%$=w@$=w.ARPA $1@$3.ARPA u%UCB@UCB => u@UCB
299
300###########################
301# Name Canonicalization #
302###########################
303S3
304
305# handle "from:<>" special case
306R<> $@@ turn into magic token
307
308# basic textual canonicalization -- note RFC733 heuristic here
309R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
310R$*<$*<$+>$*>$* $3 2-level <> nesting
311R$*<$+>$* $2 basic RFC821/822 parsing
312R$+ at $+ $1@$2 "at" -> "@" for RFC 822
313
314# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
315R@$+,$+ @$1:$2 change all "," to ":"
316
317# localize and dispose of route-based addresses
318R@$+:$+ $@$>6<@$1>:$2 handle <route-addr>
319
320# more miscellaneous cleanup
321R$+ $:$>8$1 host dependent cleanup
322R$+:$*;@$+ $@$1:$2;@$3 list syntax
323R$+:$*; $@$1:$2; list syntax
324R$+@$+ $:$1<@$2> focus on domain
325R$+<$+@$+> $1$2<@$3> move gaze right
326R$+<@$+> $@$>6$1<@$2> already canonical
327
328# convert old-style addresses to a domain-based address
329R$-:$+ $@$>6$2<@$1> host:user
330R$+^$+ $1!$2 convert ^ to !
331R$-.$+!$+ $@$>6$3<@$1.$2> host.domain!user
332R$-!$+ $@$>6$2<@$1.UUCP> host!user (uucp)
333R$+%$+ $@$>6$1<@$2> user%host
334R$-=$+ $@$>6$2<@$1.BITNET> host=user (bitnet)
335R$-.$+ $@$>6$2<@$1> host.user
336
337# always include local and tcp mailers (tcp for [w.x.y.z]-style addrs)
338
339############################################################
340############################################################
341#####
342##### Local and Program Mailer specification
343#####
344############################################################
345############################################################
346
347Mlocal, P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u
348Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u
349
350S10
351R@ $n errors to mailer-daemon
352
353
354############################################################
355############################################################
356#####
357##### Arpanet TCP Mailer specification
358#####
359##### Messages processed by this specification are assumed to leave
360##### the local domain -- hence, they must be canonical according to
361##### RFC822 etc.
362#####
363############################################################
364############################################################
365
366Mtcp, P=[IPC], F=mDFMueXL, S=14, R=14, A=IPC $h, E=\r\n
367
368S14
369
370# pass <route-addr>'s through
371R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
372
373# map colons to dots everywhere.....
374R$*:$* $1.$2 map colons to dots
375
376# handle the simple case....
377R$+<@$-.ARPA> $@$1<@$[$2.ARPA$]> user@host.ARPA
378
379# output local hosts in user@host.Berkeley.EDU syntax
380R$+<@LOCAL> $@$1<@$w.$A> local names
381R$+<@$+.LOCAL> $@$1<@$2.$A> local hosts
382R$+<@$*$=S> $@$1<@$2$3.$A>
383R$+<@$*$=Z> $@$1<@$2$3.$A>
384R$+<@$+.BITNET> $@$1%$2.BITNET<@$w.$A> user@host.BITNET
385R$+<@$+.CSNET> $@$1%$2.CSNET<@CSNET-RELAY.ARPA> user@host.CSNET
386R$+<@$+.DEC> $@$1%$2.DEC<@decwrl.ARPA> user@host.DEC
387R$+<@$+.UUCP> $@$2!$1<@$w.$A> user@host.UUCP
388
389# handle other external cases
390R$+<@$-> $@$1<@$[$2$]> no .ARPA on simple names
391#R$+<@$+.$-.ARPA> $@$1%$2<@$[$3.ARPA$]> approximate something
392R$+<@[$+]> $@$1<@[$2]> already ok
393R$+<@$+> $@$1<@$[$2$]> set for named
394
395# convert remaining addresses to old format and externalize appropriately
396R$+ $:$>5$1 => old format
397R$-:$+ $@$2<@$1.$A> convert berk hosts
398#R$+<@$+> $@$1<@$2@$A> pessmize
399R$+ $:$1<@$w.$A> tack on our hostname
400R$+%$=R<@$=A> $1<@$[$3$]> strip unneeded relay
401
402
403
404#######################
405# Rewriting rules #
406#######################
407
408##### special local conversions
409S6
410R$*<@$*$=D>$* $1<@$2LOCAL>$4 convert local domain
411R$*<@$*$=D.ARPA>$* $1<@$2LOCAL>$4
412R$*<@$*$=D.EDU>$* $1<@$2LOCAL>$4
413R$+%$+<@LOCAL> $>9$1%$2 Hack for % syntax.
414R$*<@$+.$=T.$=T>$* $1<@$2.$3>$5 make UUCP top level
415R$*<@$*$=C.$=T>$* $1<@$2$3>$5 adjust CC hosts (ucbvax)
416R$*<@$*$=C>$* $1<@$2$3.CC>$4 tack on .CC temporarily
417R$*<@$*$=S.UUCP>$* $1<@$2$3.LOCAL>$4 trap u@etherhost.UUCP
418R$*<@ucsfcgl.UUCP>$* $1<@ucsf-cgl.ARPA>$2 ucsfcgl now on Internet
419
420################################
421# Change rightmost % to @.
422S9
423R$*%$* $1@$2 First make them all @'s
424R$*@$*@$* $1%$2@$3 Undo all but the last.
425R$*@$* $@$1<@$2> Put back the brackets.
426#
427###############################
428
429
430############################################################
431############################################################
432#####
433##### Ethernet Mailer specification
434#####
435##### Messages processed by this configuration are assumed to remain
436##### in the same domain. Hence, they may not necessarily correspond
437##### to RFC822 in all details.
438#####
439############################################################
440############################################################
441
442Mether, P=[IPC], F=mDFMueCX, S=11, R=21, A=IPC $h
443
444S11
445R$*<@$+>$* $@$1<@$2>$3 already ok
446R$+ $@$1<@$w> tack on our hostname
447
448S21
449
450
451
452############################################################
453############################################################
454#####
455##### BASIC ETHERNET RULES
456#####
457############################################################
458############################################################
459
460
461
462
463############################################################
464############################################################
465#####
466##### RULESET ZERO PREAMBLE
467#####
468##### The beginning of ruleset zero is constant through all
469##### configurations.
470#####
471############################################################
472############################################################
473
474S0
475
476# first make canonical
477R$*<$*>$* $1$2$3 defocus
478R$+ $:$>3$1 make canonical
479
480# handle special cases.....
481R@ $#local$:$n handle <> form
482R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec
483
484# arrange for local names to be fully qualified
485R$*<$*$=S>$* $1<$2$3.LOCAL>$4 user@etherhost
486R$*<$*$=Z>$* $1<$2$3.LOCAL>$4 user@berkhost
487R$*<$+.ARPA.LOCAL>$* $1<$2.ARPA>$3 because ARPA is a host
488
489# now delete the local info
490R$*<$*$=w.$=T>$* $1<$2>$5 thishost.LOCAL
491R$*<$*$=w>$* $1<$2>$4 thishost
492R$*<$*.>$* $1<$2>$3 drop trailing dot
493R<@>:$* $@$>0$1 retry after route strip
494R$*<@> $@$>0$1 strip null trash & retry
495
496# forward around hosts with communication problems
497R$*<@$=F.LOCAL>$* $#ether$@$F$:$1<@$2.LOCAL>$3 reroute message
498
499##################################
500# End of ruleset zero preamble #
501##################################
502
503
504################################################
505### Machine dependent part of ruleset zero ###
506################################################
507
508# resolve names that can go via the ethernet
509R$*<@$*$=S.LOCAL>$* $#ether$@$3$:$1<@$2$3>$4 user@etherhost
510
511# other non-local names will be kicked upstairs
512R$*<@$+>$* $#ether$@$F$:$1<@$2>$3 user@some.where
513
514# remaining names must be local
515R$+ $#local$:$1 everything else
516