Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | ############################################################ |
2 | # | |
3 | # Sendmail | |
4 | # Copyright (c) 1983 Eric P. Allman | |
5 | # Berkeley, California | |
6 | # | |
7 | # Copyright (c) 1983 Regents of the University of California. | |
8 | # All rights reserved. The Berkeley software License Agreement | |
9 | # specifies the terms and conditions for redistribution. | |
10 | # | |
11 | # @(#)ucbvax.mc 1.39 (Berkeley) 1/3/89 | |
12 | # | |
13 | # built by phil on Wed Jan 25 11:47:20 PST 1989 | |
14 | # in /usr/src/local/nettables/sendmail.cf/cf on monet.Berkeley.EDU | |
15 | # | |
16 | ############################################################ | |
17 | ############################################################ | |
18 | ##### | |
19 | ##### SENDMAIL CONFIGURATION FILE | |
20 | ##### | |
21 | ##### This one is the big daddy. There is no "upstairs" | |
22 | ##### to bounce a message to -- except perhaps the arpanet. | |
23 | ##### | |
24 | ##### | |
25 | ############################################################ | |
26 | ############################################################ | |
27 | ||
28 | ||
29 | ||
30 | ###################### | |
31 | ### local info ### | |
32 | ###################### | |
33 | ||
34 | # internet hostnames | |
35 | Cwucbvax vax k UCB-VAX Berkeley UCB-C70 UCB | |
36 | ||
37 | # UUCP hostnames | |
38 | DUucbvax | |
39 | CUucbvax | |
40 | ||
41 | # local UUCP connections | |
42 | CV Padova | |
43 | CV Shasta | |
44 | CV alice | |
45 | CV allegra | |
46 | CV amdcad | |
47 | CV anlams | |
48 | CV att | |
49 | CV attunix | |
50 | CV avsd | |
51 | CV bellcore bellcor | |
52 | CV calma | |
53 | CV cithep | |
54 | CV craylab | |
55 | CV decusj | |
56 | CV decvax | |
57 | CV decwrl | |
58 | CV dssovax | |
59 | CV eagle | |
60 | CV ecovax | |
61 | CV floyd | |
62 | CV geoff | |
63 | CV harpo | |
64 | CV ho3e2 | |
65 | CV hpda | |
66 | CV hplabs | |
67 | CV ibmsupt ibmuupa ibmpa | |
68 | CV iiasa70 | |
69 | CV imagen | |
70 | CV isunix menlo70 | |
71 | CV kentmth | |
72 | CV kentvax | |
73 | CV lbl-csam lbl-csa | |
74 | CV lime | |
75 | CV mebazf | |
76 | CV molbio | |
77 | CV mothra | |
78 | CV mseonyx | |
79 | CV mtxinu | |
80 | CV nbires | |
81 | CV pixar | |
82 | CV pur-ee | |
83 | CV purdue | |
84 | CV pwbd | |
85 | CV research researc | |
86 | CV sdcarl | |
87 | CV sdcsvax | |
88 | CV sftig | |
89 | CV sgi olympus | |
90 | CV sii | |
91 | CV srivisi | |
92 | CV ssyx | |
93 | CV sun | |
94 | CV tektronix tektron | |
95 | CV tolerant toleran | |
96 | CV trwrb | |
97 | CV twg | |
98 | CV ucbcad | |
99 | CV ucdavis | |
100 | CV ucivax | |
101 | CV ucla-se ucla-cs | |
102 | CV ucsbcsl ucsbhub | |
103 | CV ucscc | |
104 | CV ucsd | |
105 | CV ucsfcgl | |
106 | CV ucsfmis | |
107 | CV ulysses | |
108 | CV unisoft | |
109 | CV unmvax | |
110 | CV usenix | |
111 | CV uw | |
112 | CV uwvax | |
113 | CV vax135 | |
114 | CV voder | |
115 | CV wheps | |
116 | CV whuxle | |
117 | CV whuxlj | |
118 | CV xprin | |
119 | CV zehntel | |
120 | CV zilog | |
121 | ||
122 | # UUCP connections on ucbarpa | |
123 | DWucbarpa.Berkeley.EDU | |
124 | CW endotsew | |
125 | CW fateman | |
126 | CW franz | |
127 | CW interlan | |
128 | CW metron | |
129 | ||
130 | # UUCP connections on ucbcad | |
131 | DXcad.Berkeley.EDU | |
132 | CX a | |
133 | CX ames | |
134 | CX analog | |
135 | CX ardent dana | |
136 | CX arthur | |
137 | CX biosys | |
138 | CX black | |
139 | CX boulder | |
140 | CX evans | |
141 | CX harpo | |
142 | CX harris | |
143 | CX hpda | |
144 | CX hpsrla | |
145 | CX island | |
146 | CX jupiter | |
147 | CX masscomp masscom | |
148 | CX nsc | |
149 | CX oakhill | |
150 | CX octal | |
151 | CX sda | |
152 | CX stellar | |
153 | CX teklds | |
154 | CX tektronix tektron | |
155 | CX binky tonto | |
156 | CX toshiba tsb0 | |
157 | CX ucbcad | |
158 | CX ucbvax | |
159 | CX voder | |
160 | CX vogon | |
161 | ||
162 | # UUCP connections on cogsci | |
163 | DYcogsci.Berkeley.EDU | |
164 | CY capmkt | |
165 | CY contessa | |
166 | CY emind | |
167 | CY hoptoad | |
168 | CY nkainc | |
169 | CY well | |
170 | CY ferdy | |
171 | ||
172 | # known uucp connections with a smart uucp | |
173 | CMdecvax | |
174 | ||
175 | # we have full sendmail support here | |
176 | Oa | |
177 | ||
178 | ############################# | |
179 | ### Setup Information ### | |
180 | ############################# | |
181 | ||
182 | ||
183 | ###################### | |
184 | # General Macros # | |
185 | ###################### | |
186 | ||
187 | # local domain name | |
188 | # YOUR DOMAIN NAME GOES HERE! | |
189 | DDYOUR_DOMAIN_NAME | |
190 | ||
191 | ||
192 | ||
193 | ||
194 | ||
195 | ||
196 | ||
197 | ||
198 | ||
199 | # my official hostname | |
200 | Dj$w | |
201 | ||
202 | ||
203 | ||
204 | ############### | |
205 | # Classes # | |
206 | ############### | |
207 | ||
208 | # Internal ("fake") domains that we use in rewriting | |
209 | CIUUCP BITNET CSNET | |
210 | ||
211 | ||
212 | ||
213 | ############################################################ | |
214 | ############################################################ | |
215 | ##### | |
216 | ##### BERKELEY HOSTS REGISTERED WITH THE NIC | |
217 | ##### | |
218 | ############################################################ | |
219 | ############################################################ | |
220 | ||
221 | ||
222 | CNbach ucbbach | |
223 | CNbizet ucbbizet | |
224 | CNcad ucbcad | |
225 | CNdegas ucbdegas | |
226 | CNeast ucbeast | |
227 | CNernie ucbernie | |
228 | CNesvax ucbesvax | |
229 | CNjade ucbjade | |
230 | CNji ucbji | |
231 | CNmike ucbmike | |
232 | CNmonet ucbmonet | |
233 | CNpostgres | |
234 | CNrenoir ucbrenoir | |
235 | CNucbarpa | |
236 | CNucbvax | |
237 | CNviolet ucbviolet | |
238 | ||
239 | ||
240 | ###################### | |
241 | # Version Number # | |
242 | ###################### | |
243 | ||
244 | DZ1.34 | |
245 | ||
246 | ||
247 | ###################### | |
248 | # Special macros # | |
249 | ###################### | |
250 | ||
251 | # my name | |
252 | DnMAILER-DAEMON | |
253 | # UNIX header format | |
254 | DlFrom $g $d | |
255 | # delimiter (operator) characters | |
256 | Do.:%@!^=/[] | |
257 | # format of a total name | |
258 | Dq$g$?x ($x)$. | |
259 | # SMTP login message | |
260 | De$j Sendmail $v/$Z ready at $b | |
261 | ||
262 | ############### | |
263 | # Options # | |
264 | ############### | |
265 | ||
266 | # location of alias file | |
267 | OA/usr/lib/aliases | |
268 | # wait up to ten minutes for alias file rebuild | |
269 | Oa10 | |
270 | # substitution for space (blank) characters | |
271 | OB. | |
272 | # (don't) connect to "expensive" mailers | |
273 | #Oc | |
274 | # default delivery mode (deliver in background) | |
275 | Odbackground | |
276 | # temporary file mode | |
277 | OF0600 | |
278 | # default GID | |
279 | Og1 | |
280 | # location of help file | |
281 | OH/usr/lib/sendmail.hf | |
282 | # log level | |
283 | OL9 | |
284 | # default network name | |
285 | ONARPA | |
286 | # default messages to old style | |
287 | Oo | |
288 | # queue directory | |
289 | OQ/usr/spool/mqueue | |
290 | # read timeout -- violates protocols | |
291 | Or2h | |
292 | # status file | |
293 | OS/usr/lib/sendmail.st | |
294 | # queue up everything before starting transmission | |
295 | Os | |
296 | # default timeout interval | |
297 | OT3d | |
298 | # time zone names (V6 only) | |
299 | OtPST,PDT | |
300 | # default UID | |
301 | Ou1 | |
302 | # wizard's password | |
303 | OW* | |
304 | # load average at which we just queue messages | |
305 | Ox8 | |
306 | # load average at which we refuse connections | |
307 | OX12 | |
308 | ||
309 | ########################### | |
310 | # Message precedences # | |
311 | ########################### | |
312 | ||
313 | Pfirst-class=0 | |
314 | Pspecial-delivery=100 | |
315 | Pbulk=-60 | |
316 | Pjunk=-100 | |
317 | ||
318 | ##################### | |
319 | # Trusted users # | |
320 | ##################### | |
321 | ||
322 | Troot | |
323 | Tdaemon | |
324 | Tuucp | |
325 | ||
326 | ######################### | |
327 | # Format of headers # | |
328 | ######################### | |
329 | ||
330 | H?P?Return-Path: <$g> | |
331 | HReceived: $?sfrom $s $.by $j ($v/$Z) | |
332 | id $i; $b | |
333 | H?D?Resent-Date: $a | |
334 | H?D?Date: $a | |
335 | H?F?Resent-From: $q | |
336 | H?F?From: $q | |
337 | H?x?Full-Name: $x | |
338 | HSubject: | |
339 | # HPosted-Date: $a | |
340 | # H?l?Received-Date: $b | |
341 | H?M?Resent-Message-Id: <$t.$i@$j> | |
342 | H?M?Message-Id: <$t.$i@$j> | |
343 | ||
344 | ||
345 | ||
346 | ########################### | |
347 | ### Rewriting Rules ### | |
348 | ########################### | |
349 | ||
350 | ||
351 | ################################ | |
352 | # Sender Field Pre-rewriting # | |
353 | ################################ | |
354 | S1 | |
355 | #R$*<$*>$* $1$2$3 defocus | |
356 | ||
357 | ################################### | |
358 | # Recipient Field Pre-rewriting # | |
359 | ################################### | |
360 | S2 | |
361 | #R$*<$*>$* $1$2$3 defocus | |
362 | ||
363 | ||
364 | ||
365 | ################################# | |
366 | # Final Output Post-rewriting # | |
367 | ################################# | |
368 | S4 | |
369 | ||
370 | R@ $@ handle <> error addr | |
371 | ||
372 | # resolve numeric addresses to name if possible | |
373 | R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 lookup numeric internet addr | |
374 | ||
375 | # externalize local domain info | |
376 | R$*<$+>$* $1$2$3 defocus | |
377 | R@$+:@$+:$+ @$1,@$2:$3 <route-addr> canonical | |
378 | ||
379 | # UUCP must always be presented in old form | |
380 | R$+@$-.UUCP $2!$1 u@h.UUCP => h!u | |
381 | ||
382 | # delete duplicate local names | |
383 | R$+%$=w@$=w $1@$w u%host@host => u@host | |
384 | R$+%$=w@$=w.$D $1@$w u%host@host => u@host | |
385 | ||
386 | ||
387 | # addition to Post-rewrite Rule | |
388 | R$+%$=w@$=w.EDU $1@$w u%UCB@UCB.edu => u@UCB.berk.edu | |
389 | R$+%$=w@$=w.$=w.EDU $1@$w u%UCB@UCB.berk.edu => u@UCB | |
390 | ||
391 | ||
392 | ########################### | |
393 | # Name Canonicalization # | |
394 | ########################### | |
395 | S3 | |
396 | ||
397 | # handle "from:<>" special case | |
398 | R$*<>$* $@@ turn into magic token | |
399 | ||
400 | # basic textual canonicalization -- note RFC733 heuristic here | |
401 | R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting | |
402 | R$*<$*<$+>$*>$* $3 2-level <> nesting | |
403 | R$*<$+>$* $2 basic RFC821/822 parsing | |
404 | ||
405 | # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later | |
406 | R@$+,$+ @$1:$2 change all "," to ":" | |
407 | ||
408 | # localize and dispose of route-based addresses | |
409 | R@$+:$+ $@$>6<@$1>:$2 handle <route-addr> | |
410 | ||
411 | # more miscellaneous cleanup | |
412 | R$+ $:$>8$1 host dependent cleanup | |
413 | R$+:$*;@$+ $@$1:$2;@$3 list syntax | |
414 | R$+:$*; $@$1:$2; list syntax | |
415 | R$+@$+ $:$1<@$2> focus on domain | |
416 | R$+<$+@$+> $1$2<@$3> move gaze right | |
417 | R$+<@$+> $@$>6$1<@$2> already canonical | |
418 | ||
419 | # convert old-style addresses to a domain-based address | |
420 | R$+^$+ $1!$2 convert ^ to ! | |
421 | R$-!$+ $@$>6$2<@$1.UUCP> resolve uucp names | |
422 | R$+.$-!$+ $@$>6$3<@$1.$2> domain uucps | |
423 | R$+!$+ $@$>6$2<@$1.UUCP> uucp subdomains | |
424 | R$+%$+ $:$>9$1%$2 user%host | |
425 | R$+<@$+> $@$>6$1<@$2> already canonical | |
426 | R$-.$+ $@$>6$2<@$1> host.user | |
427 | ||
428 | ||
429 | ################################# | |
430 | # special local conversions # | |
431 | ################################# | |
432 | ||
433 | S6 | |
434 | R$*<@$=w>$* $:$1<@$w>$3 get into u@$w form | |
435 | R$*<@$=w.$D>$* $:$1<@$w>$3 | |
436 | R$*<@$=U.UUCP>$* $:$1<@$w>$3 | |
437 | ||
438 | ################################ | |
439 | # Change rightmost % to @. # | |
440 | ################################ | |
441 | ||
442 | S9 | |
443 | R$*%$* $1@$2 First make them all @'s. | |
444 | R$*@$*@$* $1%$2@$3 Undo all but the last. | |
445 | R$*@$* $@$1<@$2> Put back the brackets. | |
446 | ||
447 | ||
448 | ||
449 | ############################################################ | |
450 | ############################################################ | |
451 | ##### | |
452 | ##### Provide Backward Compatibility | |
453 | ##### | |
454 | ############################################################ | |
455 | ############################################################ | |
456 | ||
457 | ##################################################### | |
458 | # General code to convert back to old style names # | |
459 | ##################################################### | |
460 | S5 | |
461 | ||
462 | R$+<@$w> $1 strip host | |
463 | R$+<@$-.UUCP> $2!$1 u@host.UUCP => host!u | |
464 | ||
465 | ||
466 | ################### | |
467 | ### Mailers ### | |
468 | ################### | |
469 | ||
470 | ||
471 | ############################################################ | |
472 | ############################################################ | |
473 | ##### | |
474 | ##### Local and Program Mailer specification | |
475 | ##### | |
476 | ############################################################ | |
477 | ############################################################ | |
478 | ||
479 | Mlocal, P=/bin/mail, F=rlsDFMmn, S=10, R=20, A=mail -d $u | |
480 | Mprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u | |
481 | ||
482 | S10 | |
483 | R@ $n errors to mailer-daemon | |
484 | ||
485 | ||
486 | ||
487 | ############################################################ | |
488 | ############################################################ | |
489 | ##### | |
490 | ##### UUCP Smart Mailer specification | |
491 | ##### (handles multiple recipients) | |
492 | ##### | |
493 | ############################################################ | |
494 | ############################################################ | |
495 | ||
496 | ||
497 | ||
498 | Msuucp, P=/usr/bin/uux, F=mDFMhuU, S=13, R=23, M=100000, | |
499 | A=uux - -r $h!rmail ($u) | |
500 | ||
501 | ||
502 | ||
503 | ||
504 | ############################################################ | |
505 | ############################################################ | |
506 | ##### | |
507 | ##### UUCP Mailer specification | |
508 | ##### | |
509 | ############################################################ | |
510 | ############################################################ | |
511 | ||
512 | ||
513 | Muucp, P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000, | |
514 | A=uux - -r -z -a$f -gC $h!rmail ($u) | |
515 | ||
516 | S13 | |
517 | R$+ $:$>5$1 convert to old style | |
518 | R$*<@$=w>$* $1<@$w>$2 resolve abbreviations | |
519 | R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations | |
520 | R$+<@$+> $2!$1 uucpize (no @'s in addr) | |
521 | R$w!$+ $1 strip local name | |
522 | R$+ $:$U!$1 stick on our host name | |
523 | R$=U!$-%$- $:$1!$2@$3.$D ucbvax!user@host.domain | |
524 | ||
525 | S23 | |
526 | R$+ $:$>5$1 convert to old style | |
527 | R$*<@$=w>$* $1<@$w>$2 resolve abbreviations | |
528 | R$*<@$->$* $1<@$2.$D>$3 resolve abbreviations | |
529 | R$+<@$w> $U!$1 a!b@here -> here!a!b | |
530 | R$=U!$+ $2 here!a!b -> a!b | |
531 | # sanity ... should not happen. | |
532 | R$=U.$D!$+ $2 strip local name.domain | |
533 | ||
534 | ||
535 | ############################################################ | |
536 | ############################################################ | |
537 | ##### | |
538 | ##### SMTP UUCP Mailer specification | |
539 | ##### | |
540 | ##### This mailer sends UUCP traffic over an SMTP connection. | |
541 | ##### Obviously, we only want to do this with UUCP hosts with | |
542 | ##### whom we have SMTP connectivity. The idea here is to | |
543 | ##### avoid having to double queue (once for sendmail, once | |
544 | ##### for UUCP) when there's no need. Since we need to | |
545 | ##### preserve uucp-ness (e.g., bangs), we use the UUCP mailer | |
546 | ##### rewriting rulesets. | |
547 | ##### | |
548 | ############################################################ | |
549 | ############################################################ | |
550 | ||
551 | Msmtpuucp, P=[IPC], F=mDFMueXLC, S=13, R=23, A=IPC $h, E=\r\n | |
552 | ||
553 | ||
554 | ||
555 | ||
556 | ############################################################ | |
557 | ############################################################ | |
558 | ##### | |
559 | ##### Internet SMTP Mailer specification | |
560 | ##### | |
561 | ##### Messages processed by this specification are assumed to leave | |
562 | ##### the local domain -- hence, they must be canonical according to | |
563 | ##### RFC822 etc. This means that machines not registered with | |
564 | ##### the NIC must be hidden behind our Internet relay. | |
565 | ##### | |
566 | ############################################################ | |
567 | ############################################################ | |
568 | ||
569 | Mtcp, P=[IPC], F=mDFMueXLC, S=14, R=24, A=IPC $h, E=\r\n | |
570 | ||
571 | S14 | |
572 | ||
573 | # pass <route-addr>'s through | |
574 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
575 | ||
576 | # map colons to dots everywhere | |
577 | R$*:$* $1.$2 map colons to dots | |
578 | ||
579 | # output local host in user@host.domain syntax | |
580 | R$- $1<@$w> user w/o host | |
581 | R$+<@$=w> $:$1<@$w> this host | |
582 | R$+<@$-> $:$1<@$[$2$]> canonicalize into dom | |
583 | R$+<@$-> $:$1<@$2.$D> if nameserver fails | |
584 | R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok | |
585 | R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway | |
586 | ||
587 | # if not local, and not a "fake" domain, ask the nameserver | |
588 | R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain | |
589 | R$+<@[$+]> $@$1<@[$2]> already ok | |
590 | ||
591 | # output internal ("fake") domains as "user%host@relay" | |
592 | ||
593 | ||
594 | ||
595 | R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP | |
596 | ||
597 | ||
598 | S24 | |
599 | ||
600 | # put in <> kludge | |
601 | R$*<$*>$* $1$2$3 defocus | |
602 | R$* $:$>3$1 now canonical form | |
603 | ||
604 | # pass <route-addr>'s through | |
605 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
606 | ||
607 | # map colons to dots everywhere..... | |
608 | R$*:$* $1.$2 map colons to dots | |
609 | ||
610 | # output local host in user@host.domain syntax | |
611 | R$- $1<@$w> user w/o host | |
612 | R$+<@$=w> $:$1<@$w> this host | |
613 | R$+<@$-> $:$1<@$[$2$]> canonicalize into dom | |
614 | R$+<@$-> $:$1<@$2.$D> if nameserver fails | |
615 | R$+<@$=N.$D> $@$1<@$2.$D> nic-reg hosts are ok | |
616 | R$+<@$*.$D> $@$1%$2.$D<@$A> else -> u%h@gateway | |
617 | ||
618 | # if not local, and not a "fake" domain, ask the nameserver | |
619 | R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain | |
620 | R$+<@[$+]> $@$1<@[$2]> already ok | |
621 | ||
622 | # Hide fake domains behind relays | |
623 | ||
624 | ||
625 | ||
626 | R$+<@$+.UUCP> $@$2!$1 user@host.UUCP | |
627 | ||
628 | ||
629 | ||
630 | ############################################################ | |
631 | ############################################################ | |
632 | ##### | |
633 | ##### Local Domain SMTP Mailer specification | |
634 | ##### | |
635 | ##### Messages processed by this specification are assumed to remain | |
636 | ##### the local domain. Hence, they can refer to hosts that are | |
637 | ##### not registered in the NIC host table. | |
638 | ##### | |
639 | ############################################################ | |
640 | ############################################################ | |
641 | ||
642 | Mtcpld, P=[IPC], F=mDFMueXLC, S=17, R=27, A=IPC $h, E=\r\n | |
643 | ||
644 | S17 | |
645 | ||
646 | # cleanup forwarding a bit | |
647 | R$*<$*>$* $1$2$3 defocus | |
648 | R$* $:$>3$1 canonicalize | |
649 | R$*%$*<@$w> $:$>9$1%$2 user%localhost@localdomain | |
650 | ||
651 | # pass <route-addr>'s through | |
652 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
653 | ||
654 | # map colons to dots everywhere | |
655 | R$*:$* $1.$2 map colons to dots | |
656 | ||
657 | # output local host as user@host.domain | |
658 | R$- $@$1<@$w> user w/o host | |
659 | R$+<@$w> $@$1<@$w> this host | |
660 | R$+<@$=w> $@$1<@$w> or an alias | |
661 | R$+<@$-> $:$1<@$[$2$]> ask nameserver | |
662 | R$+<@$w> $@$1<@$w> this host | |
663 | R$+<@$-> $@$1<@$2.$D> if nameserver fails | |
664 | ||
665 | # if not local, and not a "fake" domain, ask the nameserver | |
666 | R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain | |
667 | R$+<@[$+]> $@$1<@[$2]> already ok | |
668 | ||
669 | # output fake domains as user%fake@relay | |
670 | ||
671 | ||
672 | ||
673 | R$+<@$+.UUCP> $@$2!$1<@$w> user@host.UUCP | |
674 | ||
675 | ||
676 | S27 | |
677 | ||
678 | # cleanup | |
679 | R$*<$*>$* $1$2$3 defocus | |
680 | R$* $:$>3$1 now canonical form | |
681 | R$*%$*<@$w> $:$>9$1%$2 user%localhost@localdomain | |
682 | ||
683 | # pass <route-addr>'s through | |
684 | R<@$+>$* $@<@$[$1$]>$2 resolve <route-addr> | |
685 | ||
686 | # map colons to dots everywhere | |
687 | R$*:$* $1.$2 map colons to dots | |
688 | ||
689 | # output local host as user@host.domain | |
690 | R$- $@$1<@$w> user w/o host | |
691 | R$+<@$w> $@$1<@$w> this host | |
692 | R$+<@$=w> $@$1<@$w> or an alias | |
693 | R$+<@$-> $:$1<@$[$2$]> ask nameserver | |
694 | R$+<@$w> $@$1<@$w> this host | |
695 | R$+<@$-> $@$1<@$2.$D> if nameserver fails | |
696 | ||
697 | # if not local, and not a "fake" domain, ask the nameserver | |
698 | R$+<@$+.$~I> $@$1<@$[$2.$3$]> user@host.domain | |
699 | R$+<@[$+]> $@$1<@[$2]> already ok | |
700 | ||
701 | # output fake domains as user%fake@relay | |
702 | ||
703 | ||
704 | ||
705 | R$+<@$+.UUCP> $@$2!$1 user@host.UUCP | |
706 | ||
707 | ||
708 | ||
709 | ##################### | |
710 | ### Rule Zero ### | |
711 | ##################### | |
712 | ||
713 | ||
714 | ############################################################ | |
715 | ############################################################ | |
716 | ##### | |
717 | ##### RULESET ZERO PREAMBLE | |
718 | ##### | |
719 | ##### The beginning of ruleset zero is constant through all | |
720 | ##### configurations. | |
721 | ##### | |
722 | ############################################################ | |
723 | ############################################################ | |
724 | ||
725 | S0 | |
726 | ||
727 | # first make canonical | |
728 | R$*<$*>$* $1$2$3 defocus | |
729 | R$+ $:$>3$1 make canonical | |
730 | ||
731 | # handle special cases | |
732 | R$*<@[$+]>$* $:$1<@$[[$2]$]>$3 numeric internet addr | |
733 | R$*<@[$+]>$* $#tcp$@[$2]$:$1@[$2]$3 numeric internet spec | |
734 | R$+ $:$>6$1 | |
735 | R$-<@$w> $#local$:$1 | |
736 | R@ $#error$:Invalid address handle <> form | |
737 | ||
738 | # canonicalize using the nameserver if not internal domain | |
739 | R$*<@$*.$~I>$* $:$1<@$[$2.$3$]>$4 | |
740 | R$*<@$->$* $:$1<@$[$2$]>$3 | |
741 | R$*<@$->$* $:$1<@$2.$D>$3 if nameserver fails | |
742 | ||
743 | # now delete the local info | |
744 | R<@$w>:$* $@$>0$1 @here:... -> ... | |
745 | R$*<@$w> $@$>0$1 ...@here -> ... | |
746 | ||
747 | ################################## | |
748 | # End of ruleset zero preamble # | |
749 | ################################## | |
750 | ||
751 | ||
752 | ################################################ | |
753 | ### Machine dependent part of ruleset zero ### | |
754 | ################################################ | |
755 | ||
756 | # resolve SMTP UUCP connections | |
757 | ||
758 | R<@bellcore.uucp>:$+ $#smtpuucp$@bellcore.com$:$2 | |
759 | R$*<@bellcore.uucp> $#smtpuucp$@bellcore.com$:$1 | |
760 | R<@decvax.uucp>:$+ $#smtpuucp$@decvax.dec.com$:$2 | |
761 | R$*<@decvax.uucp> $#smtpuucp$@decvax.dec.com$:$1 | |
762 | R<@decwrl.uucp>:$+ $#smtpuucp$@decwrl.dec.com$:$2 | |
763 | R$*<@decwrl.uucp> $#smtpuucp$@decwrl.dec.com$:$1 | |
764 | R<@hplabs.uucp>:$+ $#smtpuucp$@hplabs.hp.com$:$2 | |
765 | R$*<@hplabs.uucp> $#smtpuucp$@hplabs.hp.com$:$1 | |
766 | R<@lbl-csam.uucp>:$+ $#smtpuucp$@lbl-csam.arpa$:$2 | |
767 | R$*<@lbl-csam.uucp> $#smtpuucp$@lbl-csam.arpa$:$1 | |
768 | R<@pur-ee.uucp>:$+ $#smtpuucp$@ecn.purdue.edu$:$2 | |
769 | R$*<@pur-ee.uucp> $#smtpuucp$@ecn.purdue.edu$:$1 | |
770 | R<@purdue.uucp>:$+ $#smtpuucp$@purdue.edu$:$2 | |
771 | R$*<@purdue.uucp> $#smtpuucp$@purdue.edu$:$1 | |
772 | R<@sdcarl.uucp>:$+ $#smtpuucp$@sdcarl.ucsd.edu$:$2 | |
773 | R$*<@sdcarl.uucp> $#smtpuucp$@sdcarl.ucsd.edu$:$1 | |
774 | R<@sun.uucp>:$+ $#smtpuucp$@sun.com$:$2 | |
775 | R$*<@sun.uucp> $#smtpuucp$@sun.com$:$1 | |
776 | R<@ucbcad.uucp>:$+ $#smtpuucp$@cad.berkeley.edu$:$2 | |
777 | R$*<@ucbcad.uucp> $#smtpuucp$@cad.berkeley.edu$:$1 | |
778 | R<@ucdavis.uucp>:$+ $#smtpuucp$@ucdavis.ucdavis.edu$:$2 | |
779 | R$*<@ucdavis.uucp> $#smtpuucp$@ucdavis.ucdavis.edu$:$1 | |
780 | R<@ucla-se.uucp>:$+ $#smtpuucp$@seas.ucla.edu$:$2 | |
781 | R$*<@ucla-se.uucp> $#smtpuucp$@seas.ucla.edu$:$1 | |
782 | R<@ucscc.uucp>:$+ $#smtpuucp$@c.ucsc.edu$:$2 | |
783 | R$*<@ucscc.uucp> $#smtpuucp$@c.ucsc.edu$:$1 | |
784 | R<@ucsfcgl.uucp>:$+ $#smtpuucp$@cgl.ucsf.edu$:$2 | |
785 | R$*<@ucsfcgl.uucp> $#smtpuucp$@cgl.ucsf.edu$:$1 | |
786 | R<@uwvax.uucp>:$+ $#smtpuucp$@spool.cs.wisc.edu$:$2 | |
787 | R$*<@uwvax.uucp> $#smtpuucp$@spool.cs.wisc.edu$:$1 | |
788 | ||
789 | ||
790 | # resolve local UUCP links | |
791 | R<@$=V.UUCP>:$+ $#uucp$@$1$:$1:$2 @host.UUCP: ... | |
792 | R$+<@$=V.UUCP> $#uucp$@$2$:$1 user@host.UUCP | |
793 | ||
794 | # resolve explicit arpanet names (to avoid with machine name "arpa" below) | |
795 | R$*<@$*$-.ARPA>$* $#tcp$@$3.ARPA$:$1<@$2$3.ARPA>$4 user@domain.ARPA | |
796 | ||
797 | # resolve fake top level domains by forwarding to other hosts | |
798 | ||
799 | ||
800 | ||
801 | ||
802 | # resolve non-local UUCP links | |
803 | R$*<@$=W.UUCP>$* $#tcpld$@$W$:$1<@$2.UUCP>$3 user@host.UUCP | |
804 | R$*<@$=X.UUCP>$* $#tcpld$@$X$:$1<@$2.UUCP>$3 user@host.UUCP | |
805 | R$*<@$=Y.UUCP>$* $#tcpld$@$Y$:$1<@$2.UUCP>$3 user@host.UUCP | |
806 | ||
807 | # this uucp stuff is wrong for domain uucp addresses | |
808 | # - we should pass the whole "host.domain" to uucp so it can | |
809 | # find the best route. But that depends on a uucp router | |
810 | # which doesn't exist here yet, so for now, we'll settle for | |
811 | # trying to route to the domain (pretending its a host). | |
812 | # Suitable L.sys entries can make this work. If it doesn't | |
813 | # then returned mail will just say "dom unknown", which is true .. | |
814 | ||
815 | # resolve smart UUCP links | |
816 | R<@$=M.$-.UUCP>:$+ $#suucp$@$2$:@$1.$2.UUCP:$3 @host.domain.UUCP: ... | |
817 | R<@$=M.UUCP>:$+ $#suucp$@$1$:$2 @host.UUCP: ... | |
818 | R$+<@$=M.$-.UUCP> $#suucp$@$3$:$1@$2.$3.UUCP user@host.domain.UUCP | |
819 | R$+<@$=M.UUCP> $#suucp$@$2$:$1 user@host.UUCP | |
820 | ||
821 | # local domain sites | |
822 | R$*<@$*.$D>$* $#tcpld$@$2.$D$:$1<@$2.$D>$3 user@host.our.domain | |
823 | R$*<@$->$* $#tcpld$@$2.$D$:$1<@$2.$D>$3 user@host | |
824 | R$*<@$-.UUCP>$* $#tcpld$@$2.$D$:$1<@$2.$D>$3 user@host.UUCP | |
825 | ||
826 | # other non-local names will be kicked upstairs | |
827 | R$*<@$+>$* $#tcp$@$2$:$1<@$2>$3 user@some.where | |
828 | ||
829 | # remaining names must be local | |
830 | R$+ $#local$:$1 everything else | |
831 | ||
832 | ######################################## | |
833 | ### Host dependent address cleanup ### | |
834 | ######################################## | |
835 | ||
836 | S8 | |
837 | R$*$=U!$+@$+ $3@$4 drop uucp forward |