Add diclaimer of copyright to _osname() manual page.
[unix-history] / usr.sbin / sendmail / src / sendmail.cf
CommitLineData
15637ed4
RG
1# Copyright (c) 1983 Eric P. Allman
2# Copyright (c) 1988 The Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# 2. Redistributions in binary form must reproduce the above copyright
11# notice, this list of conditions and the following disclaimer in the
12# documentation and/or other materials provided with the distribution.
13# 3. All advertising materials mentioning features or use of this software
14# must display the following acknowledgement:
15# This product includes software developed by the University of
16# California, Berkeley and its contributors.
17# 4. Neither the name of the University nor the names of its contributors
18# may be used to endorse or promote products derived from this software
19# without specific prior written permission.
20#
21# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31# SUCH DAMAGE.
32#
33# @(#)sendmail.cf 5.2 (Berkeley) 4/23/91
34#
35
36# built by root on Mon Aug 21 13:47:04 PDT 1989
37# in /usr/src/local/nettables/sendmail.cf/cf on monet.Berkeley.EDU
38#
39############################################################
40############################################################
41#####
42##### SENDMAIL CONFIGURATION FILE
43#####
44############################################################
45############################################################
46
47
48##################
49# local info #
50##################
51
52# file containing our internet aliases
53Fw/etc/sendmail.cw
54
55# uucp hostnames
56DUokeeffe
57CUokeeffe
58
59# local UUCP connections
60CV blia
61CV ccicpg
62CV mjk
63CV oxford
64CV zulu
65
66
67#############################
68### Setup Information ###
69#############################
70
71
72######################
73# General Macros #
74######################
75
76# local domain name
77DDBerkeley.EDU
78
79# Internet relay host -- machines in our domain that are not
80# registered with the NIC will be "hidden" behind this relay machine
81# with the % kludge, although SMTP delivery will still be performed
82# by the sending machine. Someday this will go away.
83DAucbvax.Berkeley.EDU
84
85# UUCP relay host
86DRucbvax.Berkeley.EDU
87
88# csnet relay host
89DCrelay.cs.net
90
91# bitnet relay host
92DBjade.Berkeley.EDU
93
94# my official hostname
95Dj$w
96
97
98
99###############
100# Classes #
101###############
102
103# Internal ("fake") domains that we use in rewriting
104CIUUCP BITNET CSNET
105
106
107
108############################################################
109############################################################
110#####
111##### BERKELEY HOSTS REGISTERED WITH THE NIC
112#####
113############################################################
114############################################################
115
116
117CNbach ucbbach
118CNbizet ucbbizet
119CNcad ucbcad
120CNdegas ucbdegas
121CNeast ucbeast
122CNernie ucbernie
123CNesvax ucbesvax
124CNjade ucbjade
125CNji ucbji
126CNmike ucbmike
127CNmonet ucbmonet
128CNpostgres
129CNrenoir ucbrenoir
130CNucbarpa
131CNucbvax
132CNviolet ucbviolet
133
134
135######################
136# Version Number #
137######################
138
139DZ1.37
140
141
142######################
143# Special macros #
144######################
145
146# my name
147DnMAILER-DAEMON
148# UNIX header format
149DlFrom $g $d
150# delimiter (operator) characters
151Do.:%@!^=/[]
152# format of a total name
153Dq$g$?x ($x)$.
154# SMTP login message
155De$j Sendmail $v/$Z ready at $b
156
157###############
158# Options #
159###############
160
161# location of alias file
162OA/etc/aliases
163# wait up to ten minutes for alias file rebuild
164Oa10
165# substitution for space (blank) characters
166OB.
167# (don't) connect to "expensive" mailers
168#Oc
169# default delivery mode (deliver in background)
170Odbackground
171# temporary file mode
172OF0600
173# default GID
174Og1
175# location of help file
176OH/usr/share/misc/sendmail.hf
177# log level
178OL9
179# default network name
180ONARPA
181# default messages to old style
182Oo
183# queue directory
184OQ/var/spool/mqueue
185# read timeout -- violates protocols
186Or2h
187# status file
188OS/var/log/sendmail.st
189# queue up everything before starting transmission
190Os
191# default timeout interval
192OT3d
193# time zone names (V6 only)
194OtPST,PDT
195# default UID
196Ou1
197# wizard's password
198OW*
199# load average at which we just queue messages
200Ox8
201# load average at which we refuse connections
202OX12
203
204###########################
205# Message precedences #
206###########################
207
208Pfirst-class=0
209Pspecial-delivery=100
210Pbulk=-60
211Pjunk=-100
212
213#####################
214# Trusted users #
215#####################
216
217Troot
218Tdaemon
219Tuucp
220
221#########################
222# Format of headers #
223#########################
224
225H?P?Return-Path: <$g>
226HReceived: $?sfrom $s $.by $j ($v/$Z)
227 id $i; $b
228H?D?Resent-Date: $a
229H?D?Date: $a
230H?F?Resent-From: $q
231H?F?From: $q
232H?x?Full-Name: $x
233HSubject:
234# HPosted-Date: $a
235# H?l?Received-Date: $b
236H?M?Resent-Message-Id: <$t.$i@$j>
237H?M?Message-Id: <$t.$i@$j>
238
239
240
241###########################
242### Rewriting Rules ###
243###########################
244
245
246################################
247# Sender Field Pre-rewriting #
248################################
249S1
250#R$*<$*>$* $1$2$3 defocus
251
252###################################
253# Recipient Field Pre-rewriting #
254###################################
255S2
256#R$*<$*>$* $1$2$3 defocus
257
258
259
260#################################
261# Final Output Post-rewriting #
262#################################
263S4
264
265R@ $@ handle <> error addr
266
267# resolve numeric addresses to name if possible
268R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 lookup numeric internet addr
269
270# externalize local domain info
271R$*<$+>$* $1$2$3 defocus
272R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical
273
274# UUCP must always be presented in old form
275R$+@$-.UUCP $2!$1 u@h.UUCP => h!u
276
277# delete duplicate local names
278R$+%$=w@$=w $1@$w u%host@host => u@host
279R$+%$=w@$=w.$D $1@$w u%host@host => u@host
280
281
282###########################
283# Name Canonicalization #
284###########################
285S3
286
287# handle "from:<>" special case
288R$*<>$* $@@ turn into magic token
289
290# basic textual canonicalization -- note RFC733 heuristic here
291R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
292R$*<$*<$+>$*>$* $3 2-level <> nesting
293R$*<$+>$* $2 basic RFC821/822 parsing
294
295# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
296R@$+,$+ @$1:$2 change all "," to ":"
297
298# localize and dispose of route-based addresses
299R@$+:$+ $@$>6<@$1>:$2 handle <route-addr>
300
301# more miscellaneous cleanup
302R$+ $:$>8$1 host dependent cleanup
303R$+:$*;@$+ $@$1:$2;@$3 list syntax
304R$+:$*; $@$1:$2; list syntax
305R$+@$+ $:$1<@$2> focus on domain
306R$+<$+@$+> $1$2<@$3> move gaze right
307R$+<@$+> $@$>6$1<@$2> already canonical
308
309# convert old-style addresses to a domain-based address
310R$+^$+ $1!$2 convert ^ to !
311R$-!$+ $@$>6$2<@$1.UUCP> resolve uucp names
312R$+.$-!$+ $@$>6$3<@$1.$2> domain uucps
313R$+!$+ $@$>6$2<@$1.UUCP> uucp subdomains
314R$+%$+ $:$>9$1%$2 user%host
315R$+<@$+> $@$>6$1<@$2> already canonical
316R$-.$+ $@$>6$2<@$1> host.user
317
318
319#################################
320# special local conversions #
321#################################
322
323S6
324R$*<@$=w>$* $:$1<@$w>$3 get into u@$w form
325R$*<@$=w.$D>$* $:$1<@$w>$3
326R$*<@$=U.UUCP>$* $:$1<@$w>$3
327
328
329################################
330# Change rightmost % to @. #
331################################
332
333S9
334R$*%$* $1@$2 First make them all @'s.
335R$*@$*@$* $1%$2@$3 Undo all but the last.
336R$*@$* $@$1<@$2> Put back the brackets.
337
338
339
340###################
341### Mailers ###
342###################
343
344
345############################################################
346############################################################
347#####
348##### Local and Program Mailer specification
349#####
350############################################################
351############################################################
352
353Mlocal, P=/usr/libexec/delivermail, F=lsDFMmn, S=10, R=20, A=mail -r $g -d $u
354Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u
355
356S10
357R@ $n errors to mailer-daemon
358
359
360############################################################
361############################################################
362#####
363##### Local Domain SMTP Mailer specification
364#####
365##### Messages processed by this specification are assumed to remain
366##### the local domain. Hence, they can refer to hosts that are
367##### not registered in the NIC host table.
368#####
369############################################################
370############################################################
371
372Mtcpld, P=[IPC], F=mDFMueXLC, S=17, R=27, A=IPC $h, E=\r\n
373
374S17
375
376# cleanup forwarding a bit
377R$*<$*>$* $1$2$3 defocus
378R$* $:$>3$1 canonicalize
379R$*%$*<@$w> $:$>9$1%$2 user%localhost@localdomain
380
381# pass <route-addr>'s through
382R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
383
384# map colons to dots everywhere
385R$*:$* $1.$2 map colons to dots
386
387
388
389# output local host as user@host.domain
390R$- $@$1<@$w> user w/o host
391R$+<@$w> $@$1<@$w> this host
392R$+<@$=w> $@$1<@$w> or an alias
393R$+<@$-> $:$1<@$[$2$]> ask nameserver
394R$+<@$w> $@$1<@$w> this host
395R$+<@$-> $@$1<@$2.$D> if nameserver fails
396
397# if not local, and not a "fake" domain, ask the nameserver
398R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
399R$+<@[$+]> $@$1<@[$2]> already ok
400
401# output fake domains as user%fake@relay
402
403R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.bitnet
404R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET
405R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP
406
407
408S27
409
410# cleanup
411R$*<$*>$* $1$2$3 defocus
412R$* $:$>3$1 now canonical form
413R$*%$*<@$w> $:$>9$1%$2 user%localhost@localdomain
414
415# pass <route-addr>'s through
416R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
417
418# map colons to dots everywhere
419R$*:$* $1.$2 map colons to dots
420
421# output local host as user@host.domain
422R$- $@$1<@$w> user w/o host
423R$+<@$w> $@$1<@$w> this host
424R$+<@$=w> $@$1<@$w> or an alias
425R$+<@$-> $:$1<@$[$2$]> ask nameserver
426R$+<@$w> $@$1<@$w> this host
427R$+<@$-> $@$1<@$2.$D> if nameserver fails
428
429# if not local, and not a "fake" domain, ask the nameserver
430R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
431R$+<@[$+]> $@$1<@[$2]> already ok
432
433# output fake domains as user%fake@relay
434
435R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.BITNET
436R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET
437R$+<@$+.UUCP> $@$2!$1 user@host.UUCP
438
439
440
441############################################################
442############################################################
443#####
444##### Internet SMTP Mailer specification
445#####
446##### Messages processed by this specification are assumed to leave
447##### the local domain -- hence, they must be canonical according to
448##### RFC822 etc. This means that machines not registered with
449##### the NIC must be hidden behind our Internet relay.
450#####
451############################################################
452############################################################
453
454Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n
455
456S14
457
458# pass <route-addr>'s through
459R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
460
461# map colons to dots everywhere
462R$*:$* $1.$2 map colons to dots
463
464# output local host in user@host.domain syntax
465R$- $1<@$w> user w/o host
466R$+<@$=w> $:$1<@$w> this host
467R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
468R$+<@$-> $:$1<@$2.$D> if nameserver fails
469R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
470R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
471
472# if not local, and not a "fake" domain, ask the nameserver
473R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
474R$+<@[$+]> $@$1<@[$2]> already ok
475
476# output internal ("fake") domains as "user%host@relay"
477
478R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.BITNET
479R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET
480R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP
481
482
483S24
484
485# put in <> kludge
486R$*<$*>$* $1$2$3 defocus
487R$* $:$>3$1 now canonical form
488
489# pass <route-addr>'s through
490R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr>
491
492# map colons to dots everywhere.....
493R$*:$* $1.$2 map colons to dots
494
495# output local host in user@host.domain syntax
496R$- $1<@$w> user w/o host
497R$+<@$=w> $:$1<@$w> this host
498R$+<@$-> $:$1<@$[$2$]> canonicalize into dom
499R$+<@$-> $:$1<@$2.$D> if nameserver fails
500R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok
501R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway
502
503# if not local, and not a "fake" domain, ask the nameserver
504R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain
505R$+<@[$+]> $@$1<@[$2]> already ok
506
507# Hide fake domains behind relays
508
509R$+<@$+.BITNET> $@$1%$2.BITNET<@$B> user@host.BITNET
510R$+<@$+.CSNET> $@$1%$2.CSNET<@$C> user@host.CSNET
511R$+<@$+.UUCP> $@$2!$1 user@host.UUCP
512
513
514
515############################################################
516############################################################
517#####
518##### UUCP Mailer specification
519#####
520############################################################
521############################################################
522
523
524Muucp, P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
525 A=uux - -r -z -a$f -gC $h!rmail ($u)
526
527S13
528R$+ $:$>5$1 convert to old style
529R$*<@$=w>$* $1<@$w>$2 resolve abbreviations
530R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations
531R$+<@$+> $2!$1 uucpize (no @'s in addr)
532R$w!$+ $1 strip local name
533R$+ $:$U!$1 stick on our host name
534R$=U!$-%$- $:$1!$2@$3.$D ucbvax!user@host.domain
535
536S23
537R$+ $:$>5$1 convert to old style
538R$*<@$=w>$* $1<@$w>$2 resolve abbreviations
539R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations
540R$+<@$w> $U!$1 a!b@here -> here!a!b
541R$=U!$+ $2 here!a!b -> a!b
542# sanity ... should not happen.
543R$=U.$D!$+ $2 strip local name.domain
544
545
546############################################################
547############################################################
548#####
549##### Provide Backward Compatibility
550#####
551############################################################
552############################################################
553
554#####################################################
555# General code to convert back to old style names #
556#####################################################
557S5
558
559R$+<@$w> $1 strip host
560R$+<@$-.UUCP> $2!$1 u@host.UUCP => host!u
561
562
563
564#####################
565### Rule Zero ###
566#####################
567
568
569############################################################
570############################################################
571#####
572##### RULESET ZERO PREAMBLE
573#####
574##### The beginning of ruleset zero is constant through all
575##### configurations.
576#####
577############################################################
578############################################################
579
580S0
581
582# first make canonical
583R$*<$*>$* $1$2$3 defocus
584R$+ $:$>3$1 make canonical
585
586# handle special cases
587R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 numeric internet addr
588R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec
589R$+ $:$>6$1
590R$-<@$w> $#local$:$1
591R@ $#error$:Invalid address handle <> form
592
593# canonicalize using the nameserver if not internal domain
594R$*<@$*.$~I>$* $:$1<@$[$2.$3$]>$4
595R$*<@$->$* $:$1<@$[$2$]>$3
596R$*<@$->$* $:$1<@$2.$D>$3 if nameserver fails
597
598# now delete the local info
599R<@$w>:$* $@$>0$1 @here:... -> ...
600R$*<@$w> $@$>0$1 ...@here -> ...
601
602##################################
603# End of ruleset zero preamble #
604##################################
605
606
607###############################################
608### Machine dependent part of Rule Zero ###
609###############################################
610
611
612
613# resolve local UUCP connections
614R<@$=V.UUCP>:$+ $#uucp$@$1$:$2 @host.UUCP:...
615R$+<@$=V.UUCP> $#uucp$@$2$:$1 user@host.UUCP
616
617
618
619
620# resolve fake top level domains by forwarding to other hosts
621R$*<@$+.BITNET>$* $#tcp$@$B$:$1<@$2.BITNET>$3 user@host.BITNET
622R$*<@$+.CSNET>$* $#tcp$@$C$:$1<@$2.CSNET>$3 user@host.CSNET
623
624
625# forward non-local UUCP traffic to our UUCP relay
626R$*<@$*.UUCP>$* $#tcpld$@$R$:$1<@$2.UUCP> uucp mail
627
628# resolve SMTP traffic
629R$*<@$*.$D>$* $#tcpld$@$2.$D$:$1<@$2.$D>$3 user@host.ourdomain
630R$*<@$+>$* $#tcp$@$2$:$1<@$2>$3 user@host.ourdomain
631
632# remaining names must be local
633R$+ $#local$:$1 everything else
634