home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 25.ddi / root.2 / usr / ucblib / main.cf < prev    next >
Encoding:
Text File  |  1990-12-20  |  15.4 KB  |  566 lines

  1. #ident    "@(#)//usr/ucblib/main.cf.sl 1.1 4.0 12/08/90 2580 AT&T-USL"
  2.  
  3.  
  4. #        PROPRIETARY NOTICE (Combined)
  5. #
  6. #This source code is unpublished proprietary information
  7. #constituting, or derived under license from AT&T's UNIX(r) System V.
  8. #In addition, portions of such source code were derived from Berkeley
  9. #4.3 BSD under license from the Regents of the University of
  10. #California.
  11. #
  12. #
  13. #
  14. #        Copyright Notice 
  15. #
  16. #Notice of copyright on this source code product does not indicate 
  17. #publication.
  18. #
  19. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  20. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  21. #              All rights reserved.
  22.  
  23. ############################################################
  24. #
  25. #    Sendmail configuration file for "MAIN MACHINES"
  26. #
  27. #    You should install this file as /etc/sendmail.cf
  28. #    if your machine is the main (or only) mail-relaying
  29. #    machine in your domain.  Then edit the file to
  30. #    customize it for your network configuration.
  31. #
  32. #
  33. #
  34.  
  35. ###    local info
  36.  
  37. # my official hostname
  38. # You have two choices here.  If you want the gateway machine to identify
  39. # itself as the DOMAIN, use this line:
  40. Dj$m
  41. # If you want the gateway machine to appear to be INSIDE the domain, use:
  42. #Dj$w.$m
  43. # Unless you are using sendmail.mx (or have a fully-qualified hostname), use:
  44. #Dj$w
  45.  
  46. # major relay mailer - typical choice is "ddn" if you are on the
  47. # Defense Data Network (e.g. Arpanet or Milnet)
  48. DMsmartuucp
  49.  
  50. # major relay host: use the $M mailer to send mail to other domains
  51. DR ddn-gateway
  52. CR ddn-gateway
  53.  
  54. # If you want to pre-load the "mailhosts" then use a line like
  55. # FS /usr/lib/mailhosts
  56. # and then change all the occurences of $%y to be $=S instead.
  57. # Otherwise, the default is to use the hosts.byname map if YP
  58. # is running (or else the /etc/hosts file if no YP).
  59.  
  60. # valid top-level domains (default passes ALL unknown domains up)
  61. CT arpa com edu gov mil net org 
  62. CT us de fr jp kr nz il uk no au fi nl se ca ch my dk ar
  63.  
  64. # options that you probably want on a mailhost:
  65.  
  66. # checkpoint the queue after this many receipients
  67. OC10
  68.  
  69. # refuse to send tiny messages to more than these recipients
  70. Ob10
  71.  
  72. #ident    "@(#)ucbsendmail:cf/sunbase.m4    1.1"
  73.  
  74.  
  75. #        PROPRIETARY NOTICE (Combined)
  76. #
  77. #This source code is unpublished proprietary information
  78. #constituting, or derived under license from AT&T's UNIX(r) System V.
  79. #In addition, portions of such source code were derived from Berkeley
  80. #4.3 BSD under license from the Regents of the University of
  81. #California.
  82. #
  83. #
  84. #
  85. #        Copyright Notice 
  86. #
  87. #Notice of copyright on this source code product does not indicate 
  88. #publication.
  89. #
  90. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  91. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  92. #              All rights reserved.
  93.  
  94. #################################################
  95. #
  96. #    General configuration information
  97.  
  98. # local domain names
  99. #
  100. # These can now be set from the domainname system call.
  101. # If your YP domain is different from the domain name you would like to have
  102. # appear in your mail headers, edit them to be your mail domain name.
  103. # Note that the first component of the YP domain name is stripped off unless
  104. # it begins with a dot or a plus sign.
  105. # DmPodunk.EDU
  106. # CmPodunk.EDU
  107. #
  108. # The Dm value is what is set in outgoing mail.  The Cm value is what is
  109. # accepted in incoming mail.  usually these are the same, but you might
  110. # want to have more than one Cm line to recognize more than one domain 
  111. # name during a transition.
  112.  
  113. # known hosts in this domain are obtained from gethostbyname() call
  114.  
  115. #ident    "@(#)ucbsendmail:cf/base.m4    1.1"
  116.  
  117.  
  118. #        PROPRIETARY NOTICE (Combined)
  119. #
  120. #This source code is unpublished proprietary information
  121. #constituting, or derived under license from AT&T's UNIX(r) System V.
  122. #In addition, portions of such source code were derived from Berkeley
  123. #4.3 BSD under license from the Regents of the University of
  124. #California.
  125. #
  126. #
  127. #
  128. #        Copyright Notice 
  129. #
  130. #Notice of copyright on this source code product does not indicate 
  131. #publication.
  132. #
  133. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  134. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  135. #              All rights reserved.
  136.  
  137. # Version number of configuration file
  138. #ident    "@(#)ucbsendmail:cf/version.m4    1.1"
  139.  
  140.  
  141. #        PROPRIETARY NOTICE (Combined)
  142. #
  143. #This source code is unpublished proprietary information
  144. #constituting, or derived under license from AT&T's UNIX(r) System V.
  145. #In addition, portions of such source code were derived from Berkeley
  146. #4.3 BSD under license from the Regents of the University of
  147. #California.
  148. #
  149. #
  150. #
  151. #        Copyright Notice 
  152. #
  153. #Notice of copyright on this source code product does not indicate 
  154. #publication.
  155. #
  156. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  157. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  158. #              All rights reserved.
  159.  
  160. DVSMI-4.1
  161.  
  162.  
  163. ###   Standard macros
  164.  
  165. # name used for error messages
  166. DnMailer-Daemon
  167. # UNIX header format
  168. DlFrom $g  $d
  169. # delimiter (operator) characters
  170. Do.:%@!^=/[]
  171. # format of a total name
  172. Dq$g$?x ($x)$.
  173. # SMTP login message
  174. De$j Sendmail $v/$V ready at $b
  175.  
  176. ###   Options
  177.  
  178. # Remote mode - send through server if mailbox directory is mounted
  179. OR
  180. # location of alias file
  181. OA/usr/ucblib/aliases
  182. # default delivery mode (deliver in background)
  183. Odbackground
  184. # rebuild the alias file automagically
  185. OD
  186. # temporary file mode -- 0600 for secure mail, 0644 for permissive
  187. OF0600
  188. # default GID
  189. Og1
  190. # location of help file
  191. OH/usr/ucblib/sendmail.hf
  192. # log level
  193. OL9
  194. # default messages to old style
  195. Oo
  196. # Cc my postmaster on error replies I generate
  197. OPPostmaster
  198. # queue directory
  199. OQ/usr/ucblib/mqueue
  200. # read timeout for SMTP protocols
  201. Or15m
  202. # status file -- none
  203. OS/usr/ucblib/sendmail.st
  204. # queue up everything before starting transmission, for safety
  205. Os
  206. # return queued mail after this long
  207. OT3d
  208. # default UID
  209. Ou1
  210.  
  211. ###   Message precedences
  212. Pfirst-class=0
  213. Pspecial-delivery=100
  214. Pjunk=-100
  215.  
  216. ###   Trusted users
  217. T root daemon uucp
  218.  
  219. ###   Format of headers 
  220. H?P?Return-Path: <$g>
  221. HReceived: $?sfrom $s $.by $j ($v/$V)
  222.     id $i; $b
  223. H?D?Resent-Date: $a
  224. H?D?Date: $a
  225. H?F?Resent-From: $q
  226. H?F?From: $q
  227. H?x?Full-Name: $x
  228. HSubject:
  229. H?M?Resent-Message-Id: <$t.$i@$j>
  230. H?M?Message-Id: <$t.$i@$j>
  231. HErrors-To:
  232.  
  233. ###########################
  234. ###   Rewriting rules   ###
  235. ###########################
  236.  
  237.  
  238. #  Sender Field Pre-rewriting
  239. S1
  240. # None needed.
  241.  
  242. #  Recipient Field Pre-rewriting
  243. S2
  244. # None needed.
  245.  
  246. # Name Canonicalization
  247.  
  248. # Internal format of names within the rewriting rules is:
  249. #     anything<@host.domain.domain...>anything
  250. # We try to get every kind of name into this format, except for local
  251. # names, which have no host part.  The reason for the "<>" stuff is
  252. # that the relevant host name could be on the front of the name (for
  253. # source routing), or on the back (normal form).  We enclose the one that
  254. # we want to route on in the <>'s to make it easy to find.
  255. S3
  256.  
  257. # handle "from:<>" special case
  258. R<>            $@@                turn into magic token
  259.  
  260. # basic textual canonicalization
  261. R$*<$+>$*        $2                basic RFC822 parsing
  262.  
  263. # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
  264. R@$+,$+:$+        @$1:$2:$3            change all "," to ":"
  265. R@$+:$+            $@$>6<@$1>:$2            src route canonical
  266.  
  267. R$+:$*;@$+        $@$1:$2;@$3            list syntax
  268. R$+@$+            $:$1<@$2>            focus on domain
  269. R$+<$+@$+>        $1$2<@$3>            move gaze right
  270. R$+<@$+>        $@$>6$1<@$2>            already canonical
  271.  
  272. # convert old-style names to domain-based names
  273. # All old-style names parse from left to right, without precedence.
  274. R$-!$+            $@$>6$2<@$1.uucp>        uucphost!user
  275. R$-.$+!$+        $@$>6$3<@$1.$2>            host.domain!user
  276. R$+%$+            $@$>3$1@$2            user%host
  277.  
  278. #  Final Output Post-rewriting 
  279. S4
  280. R$+<@$+.uucp>        $2!$1                u@h.uucp => h!u
  281. R$+            $: $>9 $1            Clean up addr
  282. R$*<$+>$*        $1$2$3                defocus
  283.  
  284.  
  285. #  Clean up an name for passing to a mailer
  286. #  (but leave it focused)
  287. S9
  288. R@            $@$n                handle <> error addr
  289. R$*<$*LOCAL>$*        $1<$2$m>$3            change local info
  290. R<@$+>$*:$+:$+        <@$1>$2,$3:$4            <route-addr> canonical
  291.  
  292.  
  293. #######################
  294. #   Rewriting rules
  295.  
  296. # special local conversions
  297. S6
  298. R$*<@$*$=m>$*        $1<@$2LOCAL>$4            convert local domain
  299.  
  300. #ident    "@(#)ucbsendmail:cf/localm.m4    1.1"
  301.  
  302.  
  303. #        PROPRIETARY NOTICE (Combined)
  304. #
  305. #This source code is unpublished proprietary information
  306. #constituting, or derived under license from AT&T's UNIX(r) System V.
  307. #In addition, portions of such source code were derived from Berkeley
  308. #4.3 BSD under license from the Regents of the University of
  309. #California.
  310. #
  311. #
  312. #
  313. #        Copyright Notice 
  314. #
  315. #Notice of copyright on this source code product does not indicate 
  316. #publication.
  317. #
  318. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  319. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  320. #              All rights reserved.
  321.  
  322. # Local and Program Mailer specification
  323.  
  324. Mlocal,    P=/usr/ucblib/binmail, F=rlsDFMmnPSr, S=10, R=20, A=mail -d $u
  325. Mprog,    P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
  326.  
  327. S10
  328. # None needed.
  329.  
  330. S20
  331. # None needed.
  332.  
  333. #ident    "@(#)ucbsendmail:cf/etherm.m4    1.1"
  334.  
  335.  
  336. #        PROPRIETARY NOTICE (Combined)
  337. #
  338. #This source code is unpublished proprietary information
  339. #constituting, or derived under license from AT&T's UNIX(r) System V.
  340. #In addition, portions of such source code were derived from Berkeley
  341. #4.3 BSD under license from the Regents of the University of
  342. #California.
  343. #
  344. #
  345. #
  346. #        Copyright Notice 
  347. #
  348. #Notice of copyright on this source code product does not indicate 
  349. #publication.
  350. #
  351. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  352. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  353. #              All rights reserved.
  354.  
  355. ############################################################
  356. #####
  357. #####        Ethernet Mailer specification
  358. #####
  359. #####    Messages processed by this configuration are assumed to remain
  360. #####    in the same domain.  This really has nothing particular to do
  361. #####   with Ethernet - the name is historical.
  362.  
  363. Mether,    P=[TCP], F=msDFMuCX, S=11, R=21, A=TCP $h
  364. S11
  365. R$*<@$+>$*        $@$1<@$2>$3            already ok
  366. R$+            $@$1<@$w>            tack on our hostname
  367.  
  368. S21
  369. # None needed.
  370.  
  371.  
  372.  
  373. #ident    "@(#)ucbsendmail:cf/uucpm.m4    1.1"
  374.  
  375.  
  376. #        PROPRIETARY NOTICE (Combined)
  377. #
  378. #This source code is unpublished proprietary information
  379. #constituting, or derived under license from AT&T's UNIX(r) System V.
  380. #In addition, portions of such source code were derived from Berkeley
  381. #4.3 BSD under license from the Regents of the University of
  382. #California.
  383. #
  384. #
  385. #
  386. #        Copyright Notice 
  387. #
  388. #Notice of copyright on this source code product does not indicate 
  389. #publication.
  390. #
  391. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  392. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  393. #              All rights reserved.
  394.  
  395. #ident    "@(#)ucbsendmail:cf/compat.m4    1.1"
  396.  
  397.  
  398. #        PROPRIETARY NOTICE (Combined)
  399. #
  400. #This source code is unpublished proprietary information
  401. #constituting, or derived under license from AT&T's UNIX(r) System V.
  402. #In addition, portions of such source code were derived from Berkeley
  403. #4.3 BSD under license from the Regents of the University of
  404. #California.
  405. #
  406. #
  407. #
  408. #        Copyright Notice 
  409. #
  410. #Notice of copyright on this source code product does not indicate 
  411. #publication.
  412. #
  413. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  414. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  415. #              All rights reserved.
  416.  
  417. ##########################################################
  418. #  General code to convert back to old style UUCP names
  419. S5
  420. R$+<@LOCAL>        $@ $D!$1            name@LOCAL => sun!name
  421. R$+<@$-.LOCAL>        $@ $2!$1            u@h.LOCAL => h!u
  422. R$+<@$+.uucp>        $@ $2!$1            u@h.uucp => h!u
  423. R$+<@$*>        $@ $2!$1            u@h => h!u
  424. # Route-addrs do not work here.  Punt til uucp-mail comes up with something.
  425. R<@$+>$*        $@ @$1$2            just defocus and punt
  426. R$*<$*>$*        $@ $1$2$3            Defocus strange stuff
  427.  
  428. #    UUCP Mailer specification
  429.  
  430. Muucp,    P=/usr/bin/uux, F=msDFMhuU, S=13, R=23,
  431.     A=uux - -r $h!rmail ($u)
  432.  
  433. # Convert uucp sender (From) field
  434. S13
  435. R$+            $:$>5$1                convert to old style
  436. R$=w!$+            $2                strip local name
  437. R$+            $:$w!$1                stick on real host name
  438.  
  439. # Convert uucp recipient (To, Cc) fields
  440. S23
  441. R$+            $:$>5$1                convert to old style
  442.  
  443.  
  444. #ident    "@(#)ucbsendmail:cf/ddnm.m4    1.1"
  445.  
  446.  
  447. #        PROPRIETARY NOTICE (Combined)
  448. #
  449. #This source code is unpublished proprietary information
  450. #constituting, or derived under license from AT&T's UNIX(r) System V.
  451. #In addition, portions of such source code were derived from Berkeley
  452. #4.3 BSD under license from the Regents of the University of
  453. #California.
  454. #
  455. #
  456. #
  457. #        Copyright Notice 
  458. #
  459. #Notice of copyright on this source code product does not indicate 
  460. #publication.
  461. #
  462. #    (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  463. #    (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  464. #              All rights reserved.
  465.  
  466. ############################################################
  467. #
  468. #        DDN Mailer specification
  469. #
  470. #    Send mail on the Defense Data Network
  471. #       (such as Arpanet or Milnet)
  472.  
  473. Mddn,    P=[TCP], F=msDFMuCX, S=22, R=22, A=TCP $h, E=\r\n
  474.  
  475. # map containing the inverse of mail.aliases
  476. DZmail.byaddr
  477.  
  478. S22
  479. R$*<@LOCAL>$*        $:$1
  480. R$-<@$->        $:$>3${Z$1@$2$}            invert aliases
  481. R$*<@$+.$*>$*        $@$1<@$2.$3>$4            already ok
  482. R$+<@$+>$*        $@$1<@$2.$m>$3            tack on our domain
  483. R$+            $@$1<@$m>            tack on our domain
  484.  
  485.  
  486. # "Smart" UUCP mailer: Uses UUCP transport but domain-style naming
  487. Msmartuucp, P=/usr/bin/uux, F=CmsDFMhuU, S=22, R=22, 
  488.     A=uux - -r $h!rmail ($u)
  489.     
  490.  
  491. ############################################################
  492. #
  493. #        RULESET ZERO
  494. #
  495. #    This is the ruleset that determines which mailer a name goes to.
  496.  
  497. # Ruleset 30 just calls rulesets 3 then 0.
  498. S30
  499. R$*            $: $>3 $1            First canonicalize
  500. R$*            $@ $>0 $1            Then rerun ruleset 0
  501.  
  502. S0
  503. # On entry, the address has been canonicalized and focused by ruleset 3.
  504. # Handle special cases.....
  505. R@            $#local $:$n            handle <> form
  506. # For numeric spec, you can't pass spec on to receiver, since rcvr's
  507. # are not smart enough to know that [x.y.z.a] is their own name.
  508. R<@[$+]>:$*        $:$>9 <@[$1]>:$2        Clean it up, then...
  509. R<@[$+]>:$*        $#ether $@[$1] $:$2        numeric internet spec
  510. R<@[$+]>,$*        $#ether $@[$1] $:$2        numeric internet spec
  511. R$*<@[$+]>        $#ether $@[$2] $:$1        numeric internet spec
  512.  
  513. # resolve the local hostname to "LOCAL".
  514. R$*<$*$=w.LOCAL>$*    $1<$2LOCAL>$4            thishost.LOCAL
  515. R$*<$*$=w.uucp>$*    $1<$2LOCAL>$4            thishost.uucp
  516. R$*<$*$=w>$*        $1<$2LOCAL>$4            thishost
  517.  
  518. # Mail addressed explicitly to the domain gateway (us)
  519. R$*<@LOCAL>        $@$>30$1            strip our name, retry
  520. R<@LOCAL>:$+        $@$>30$1            retry after route strip
  521.  
  522. # deliver to known ethernet hosts explicitly specified in our domain
  523. R$*<@$%y.LOCAL>$*    $#ether $@$2 $:$1<@$2>$3    user@host.sun.com
  524.  
  525. # etherhost.uucp is treated as etherhost.$m for now.
  526. # This allows them to be addressed from uucp as foo!sun!etherhost!user.
  527. R$*<@$%y.uucp>$*    $#ether $@$2 $:$1<@$2>$3    user@etherhost.uucp
  528.  
  529. # Explicitly specified names in our domain -- that we've never heard of
  530. R$*<@$*.LOCAL>$*    $#error $:Never heard of host $2 in domain $m
  531.  
  532. # Clean up addresses for external use -- kills LOCAL, route-addr ,=>: 
  533. R$*            $:$>9 $1            Then continue...
  534.  
  535. # resolve UUCP-style names
  536. R<@$-.uucp>:$+        $#uucp  $@$1 $:$2        @host.uucp:...
  537. R$+<@$-.uucp>        $#uucp  $@$2 $:$1        user@host.uucp
  538.  
  539. # Pass other valid names up the ladder to our forwarder
  540. #R$*<@$*.$=T>$*        $#$M    $@$R $:$1<@$2.$3>$4    user@domain.known
  541.  
  542. # Replace following with above to only forward "known" top-level domains
  543. R$*<@$*.$+>$*        $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain
  544.  
  545. # if you are on the DDN, then comment-out both of the the lines above
  546. # and use the following instead:
  547. #R$*<@$*.$+>$*        $#ddn $@ $2.$3 $:$1<@$2.$3>$4    user@any.domain
  548.  
  549. # All addresses in the rules ABOVE are absolute (fully qualified domains).
  550. # Addresses BELOW can be partially qualified.
  551.  
  552. # deliver to known ethernet hosts
  553. R$*<@$%y>$*        $#ether $@$2 $:$1<@$2>$3    user@etherhost
  554.  
  555. # other non-local names have nowhere to go; return them to sender.
  556. R$*<@$+.$->$*        $#error $:Unknown domain $3
  557. R$*<@$+>$*        $#error $:Never heard of $2 in domain $m
  558. R$*@$*            $#error $:I don't understand $1@$2
  559.  
  560. # Local names with % are really not local!
  561. R$+%$+            $@$>30$1@$2            turn % => @, retry
  562.  
  563. # everything else is a local name
  564. R$+            $#local $:$1            local names
  565.