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