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