BSD 4_3_Tahoe development
[unix-history] / .ref-BSD-4_3 / usr / lib / sendmail.cf
CommitLineData
95f51977
C
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#
e804469b
C
12############################################################
13############################################################
14#####
15##### SENDMAIL CONFIGURATION FILE
16#####
e804469b
C
17############################################################
18############################################################
19
20
21
22############################################################
23### local info
24############################################################
25
26# internet hostname
27Cwucbmonet monet
28
95f51977 29
e804469b
C
30#################################################
31#
32# General configuration information
33#
e804469b
C
34#################################################
35
36######################
37# General Macros #
38######################
39
40# our arpanet gateway
95f51977 41DABerkeley.EDU
e804469b
C
42CABerkeley UCB ucbc70 c70 UCB-C70 u UCB-VAX ucbvax
43
44# local domain names
95f51977 45DDBERKELEY.EDU
e804469b
C
46CDBERKELEY UCB ucbc70 c70 ucb-c70 u UCB-VAX ucbvax
47
48# major relay host
49DRUCBVAX
50CRucbvax vax k
51
0f4556f1 52# my official hostname
95f51977 53Dj$w
0f4556f1 54
e804469b 55# known SMTP/ethernet hosts (this domain only) -- only $R need be complete
95f51977
C
56
57CSucbarmstrong armstrong
e804469b 58CSucbarpa arpa
0f4556f1 59CSucbbach bach ucbstatvax statvax
95f51977
C
60CSucbbass bass
61CSucbbell bell
62CSucbbizet bizet
63CSucbbob bob
0f4556f1 64CSucbbrahms brahms mathstat
95f51977
C
65CSucbbud bud
66CSucbbuddy buddy
e804469b
C
67CSucbcad cad cad-a
68CSucbcalder calder
0f4556f1 69CSucbcartan cartan
95f51977
C
70CSucbchip chip
71CSucbcogsci cogsci
72CSucbcorona corona
73CSucbcory cory
74CSucbdab dab
e804469b 75CSucbdali dali
95f51977
C
76CSucbdavinci davinci
77CSucbdavis davis
78CSucbdean dean
79CSucbdeforest deforest
e804469b 80CSucbdegas degas
95f51977
C
81CSucbdim dim
82CSucbdorothy dorothy
83CSucbear ear
84CSucbeast east beast
85CSucbedison edison
e804469b 86CSucbernie ernie
0f4556f1 87CSucbesvax esvax
95f51977
C
88CSucbeuler euler
89CSucbfranklin franklin
90CSucbfranny franny
91CSucbheine heine
92CSucbholden holden
93CSucbhuffman huffman
0f4556f1
C
94CSucbic ic ucbic-ec ic-ec cad-b cad-ic
95CSucbicw icw ucbicw-ec icw-ec cad-c cad-icw
95f51977 96CSucbimage
0f4556f1 97CSucbingres ingres
95f51977
C
98CSucbjan jan
99CSucbjason jason
100CSucbji ji
101CSucbjoule joule
102CSucbkepler kepler
e804469b 103CSucbkim kim
95f51977 104CSucbmarconi marconi
e804469b 105CSucbmatisse matisse
95f51977 106CSucbmaxwell maxwell
e804469b 107CSucbmedea medea
0f4556f1 108CSucbmerlin merlin
95f51977 109CSucbmike mike
e804469b 110CSucbmiro miro
95f51977 111CSucbmolson molson
e804469b 112CSucbmonet monet
95f51977
C
113CSucbmote mote
114CSucbnewton newton
115CSucbnyquist nyquist
116CSucbokeeffe okeeffe
0f4556f1 117CSucboz oz
95f51977
C
118CSucbrenoir renoir
119CSucbrob rob
120CSucbrobert robert
121CSucbseymour seymour
122CSucbshadow shadow
123CSucbshannon shannon
124CSucbsilvia silvia
125CSucbtuborg tuborg
126CSucbugs bugs ucbbugs ugs
127CSucbvangogh vangogh
e804469b 128CSucbvax
0f4556f1 129CSucbweyl weyl
95f51977
C
130CSucbzeus zeus
131CSucbzooey zooey
132CSucbzworykin zworykin
0f4556f1
C
133
134# known top-level domains
95f51977
C
135CTLOCAL ARPA EDU GOV COM MIL
136CTUUCP BITNET CSNET DEC
137
e804469b
C
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#
e804469b
C
150############################################################
151
e804469b 152
95f51977
C
153######################
154# Version Number #
155######################
156
157DZ5.17
e804469b
C
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)$.
e804469b 172# SMTP login message
95f51977 173De$j Sendmail $v/$Z ready at $b
e804469b 174
0f4556f1
C
175# forwarding host -- redefine this if you can't talk to the relay directly
176DF$R
177
e804469b
C
178###################
179### Options ###
180###################
181
182# location of alias file
183OA/usr/lib/aliases
95f51977
C
184# wait up to ten minutes for alias file rebuild
185Oa10
186# substitution for space (blank) characters
187OB.
e804469b
C
188# (don't) connect to "expensive" mailers
189#Oc
95f51977
C
190# default delivery mode (deliver in background)
191Odbackground
e804469b 192# temporary file mode
95f51977 193OF0600
e804469b
C
194# default GID
195Og1
196# location of help file
197OH/usr/lib/sendmail.hf
198# log level
199OL9
95f51977
C
200# default network name
201ONARPA
e804469b
C
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
95f51977
C
219OW*
220# load average at which we just queue messages
221Ox8
222# load average at which we refuse connections
223OX12
e804469b
C
224
225###############################
226### Message precedences ###
227###############################
228
229Pfirst-class=0
230Pspecial-delivery=100
95f51977 231Pbulk=-60
e804469b
C
232Pjunk=-100
233
234#########################
235### Trusted users ###
236#########################
237
238Troot
239Tdaemon
240Tuucp
241Teric
242Tnetwork
243
244#############################
245### Format of headers ###
246#############################
247
0f4556f1 248H?P?Return-Path: <$g>
95f51977 249HReceived: $?sfrom $s $.by $j ($v/$Z)
0f4556f1
C
250 id $i; $b
251H?D?Resent-Date: $a
e804469b 252H?D?Date: $a
0f4556f1 253H?F?Resent-From: $q
e804469b
C
254H?F?From: $q
255H?x?Full-Name: $x
256HSubject:
e804469b
C
257# HPosted-Date: $a
258# H?l?Received-Date: $b
0f4556f1 259H?M?Resent-Message-Id: <$t.$i@$j>
e804469b 260H?M?Message-Id: <$t.$i@$j>
e804469b
C
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
95f51977
C
288R$*<$*LOCAL.ARPA>$* $1<$2$D>$3 change local info
289R$*<$*.CC>$* $1$2$3 strip .CC
e804469b 290R$*<$+>$* $1$2$3 defocus
95f51977 291R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical
0f4556f1
C
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
e804469b
C
299
300###########################
301# Name Canonicalization #
302###########################
303S3
304
305# handle "from:<>" special case
306R<> $@@ turn into magic token
307
95f51977
C
308# basic textual canonicalization -- note RFC733 heuristic here
309R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
310R$*<$*<$+>$*>$* $3 2-level <> nesting
e804469b
C
311R$*<$+>$* $2 basic RFC821/822 parsing
312R$+ at $+ $1@$2 "at" -> "@" for RFC 822
e804469b
C
313
314# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
315R@$+,$+ @$1:$2 change all "," to ":"
316
95f51977 317# localize and dispose of route-based addresses
e804469b
C
318R@$+:$+ $@$>6<@$1>:$2 handle <route-addr>
319
320# more miscellaneous cleanup
321R$+ $:$>8$1 host dependent cleanup
322R$+:$*;@$+ $@$1:$2;@$3 list syntax
95f51977 323R$+:$*; $@$1:$2; list syntax
e804469b
C
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
0f4556f1 329R$-:$+ $@$>6$2<@$1> host:user
e804469b 330R$+^$+ $1!$2 convert ^ to !
95f51977
C
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
e804469b 336
95f51977 337# always include local and tcp mailers (tcp for [w.x.y.z]-style addrs)
e804469b
C
338
339############################################################
340############################################################
341#####
342##### Local and Program Mailer specification
343#####
e804469b
C
344############################################################
345############################################################
346
347Mlocal, P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u
0f4556f1 348Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u
e804469b
C
349
350S10
95f51977
C
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
e804469b
C
429
430############################################################
431############################################################
432#####
433##### Ethernet Mailer specification
434#####
95f51977
C
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.
e804469b
C
438#####
439############################################################
440############################################################
441
95f51977 442Mether, P=[IPC], F=mDFMueCX, S=11, R=21, A=IPC $h
e804469b
C
443
444S11
445R$*<@$+>$* $@$1<@$2>$3 already ok
446R$+ $@$1<@$w> tack on our hostname
447
448S21
449
450
95f51977 451
e804469b
C
452############################################################
453############################################################
454#####
455##### BASIC ETHERNET RULES
456#####
e804469b
C
457############################################################
458############################################################
459
460
461
95f51977 462
e804469b
C
463############################################################
464############################################################
465#####
466##### RULESET ZERO PREAMBLE
467#####
468##### The beginning of ruleset zero is constant through all
469##### configurations.
470#####
e804469b
C
471############################################################
472############################################################
473
474S0
475
476# first make canonical
477R$*<$*>$* $1$2$3 defocus
478R$+ $:$>3$1 make canonical
479
480# handle special cases.....
95f51977 481R@ $#local$:$n handle <> form
e804469b
C
482R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec
483
0f4556f1
C
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
e804469b 489# now delete the local info
95f51977 490R$*<$*$=w.$=T>$* $1<$2>$5 thishost.LOCAL
e804469b
C
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
0f4556f1
C
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
e804469b
C
503
504################################################
505### Machine dependent part of ruleset zero ###
506################################################
507
508# resolve names that can go via the ethernet
95f51977 509R$*<@$*$=S.LOCAL>$* $#ether$@$3$:$1<@$2$3>$4 user@etherhost
e804469b
C
510
511# other non-local names will be kicked upstairs
0f4556f1 512R$*<@$+>$* $#ether$@$F$:$1<@$2>$3 user@some.where
e804469b
C
513
514# remaining names must be local
515R$+ $#local$:$1 everything else
516