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