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

  1. #ident    "@(#)//usr/ucblib/sendmail.cf.sl 1.1 4.0 12/08/90 53105 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 SUBSIDIARY MACHINES
  26. #
  27. #    You should install this file as /etc/sendmail.cf
  28. #    if your machine is a subsidiary machine (that is, some
  29. #    other machine in your domain is the main mail-relaying
  30. #    machine).  Then edit the file to customize it for your
  31. #    network configuration.
  32. #
  33. #
  34. #
  35.  
  36. # local UUCP connections -- not forwarded to mailhost
  37. CV
  38.  
  39. # my official hostname
  40. Dj$w.$m
  41.  
  42. # major relay mailer
  43. DMether
  44.  
  45. # major relay host
  46. DRmailhost
  47. CRmailhost
  48.  
  49. #################################################
  50. #
  51. #    General configuration information
  52.  
  53. # local domain names
  54. #
  55. # These can now be set from the domainname system call.
  56. # If your YP domain is different from the domain name you would like to have
  57. # appear in your mail headers, edit them to be your mail domain name.
  58. # Note that the first component of the YP domain name is stripped off unless
  59. # it begins with a dot or a plus sign.
  60. # DmPodunk.EDU
  61. # CmPodunk.EDU
  62. #
  63. # The Dm value is what is set in outgoing mail.  The Cm value is what is
  64. # accepted in incoming mail.  usually these are the same, but you might
  65. # want to have more than one Cm line to recognize more than one domain 
  66. # name during a transition.
  67.  
  68. # known hosts in this domain are obtained from gethostbyname() call
  69.  
  70. # Version number of configuration file
  71. DVSMI-4.1
  72.  
  73.  
  74. ###   Standard macros
  75.  
  76. # name used for error messages
  77. DnMailer-Daemon
  78. # UNIX header format
  79. DlFrom $g  $d
  80. # delimiter (operator) characters
  81. Do.:%@!^=/[]
  82. # format of a total name
  83. Dq$g$?x ($x)$.
  84. # SMTP login message
  85. De$j Sendmail $v/$V ready at $b
  86.  
  87. ###   Options
  88.  
  89. # Remote mode - send through server if mailbox directory is mounted
  90. OR
  91. # location of alias file
  92. OA/usr/ucblib/aliases
  93. # default delivery mode (deliver in background)
  94. Odbackground
  95. # rebuild the alias file automagically
  96. OD
  97. # temporary file mode -- 0600 for secure mail, 0644 for permissive
  98. OF0600
  99. # default GID
  100. Og1
  101. # location of help file
  102. OH/usr/ucblib/sendmail.hf
  103. # log level
  104. OL9
  105. # default messages to old style
  106. Oo
  107. # Cc my postmaster on error replies I generate
  108. OPPostmaster
  109. # queue directory
  110. OQ/usr/ucblib/mqueue
  111. # read timeout for SMTP protocols
  112. Or15m
  113. # status file -- none
  114. OS/usr/ucblib/sendmail.st
  115. # queue up everything before starting transmission, for safety
  116. Os
  117. # return queued mail after this long
  118. OT3d
  119. # default UID
  120. Ou1
  121.  
  122. ###   Message precedences
  123. Pfirst-class=0
  124. Pspecial-delivery=100
  125. Pjunk=-100
  126.  
  127. ###   Trusted users
  128. T root daemon uucp
  129.  
  130. ###   Format of headers 
  131. H?P?Return-Path: <$g>
  132. HReceived: $?sfrom $s $.by $j ($v/$V)
  133.     id $i; $b
  134. H?D?Resent-Date: $a
  135. H?D?Date: $a
  136. H?F?Resent-From: $q
  137. H?F?From: $q
  138. H?x?Full-Name: $x
  139. HSubject:
  140. H?M?Resent-Message-Id: <$t.$i@$j>
  141. H?M?Message-Id: <$t.$i@$j>
  142. HErrors-To:
  143.  
  144. ###########################
  145. ###   Rewriting rules   ###
  146. ###########################
  147.  
  148.  
  149. #  Sender Field Pre-rewriting
  150. S1
  151. # None needed.
  152.  
  153. #  Recipient Field Pre-rewriting
  154. S2
  155. # None needed.
  156.  
  157. # Name Canonicalization
  158.  
  159. # Internal format of names within the rewriting rules is:
  160. #     anything<@host.domain.domain...>anything
  161. # We try to get every kind of name into this format, except for local
  162. # names, which have no host part.  The reason for the "<>" stuff is
  163. # that the relevant host name could be on the front of the name (for
  164. # source routing), or on the back (normal form).  We enclose the one that
  165. # we want to route on in the <>'s to make it easy to find.
  166. S3
  167.  
  168. # handle "from:<>" special case
  169. R<>            $@@                turn into magic token
  170.  
  171. # basic textual canonicalization
  172. R$*<$+>$*        $2                basic RFC822 parsing
  173.  
  174. # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
  175. R@$+,$+:$+        @$1:$2:$3            change all "," to ":"
  176. R@$+:$+            $@$>6<@$1>:$2            src route canonical
  177.  
  178. R$+:$*;@$+        $@$1:$2;@$3            list syntax
  179. R$+@$+            $:$1<@$2>            focus on domain
  180. R$+<$+@$+>        $1$2<@$3>            move gaze right
  181. R$+<@$+>        $@$>6$1<@$2>            already canonical
  182.  
  183. # convert old-style names to domain-based names
  184. # All old-style names parse from left to right, without precedence.
  185. R$-!$+            $@$>6$2<@$1.uucp>        uucphost!user
  186. R$-.$+!$+        $@$>6$3<@$1.$2>            host.domain!user
  187. R$+%$+            $@$>3$1@$2            user%host
  188.  
  189. #  Final Output Post-rewriting 
  190. S4
  191. R$+<@$+.uucp>        $2!$1                u@h.uucp => h!u
  192. R$+            $: $>9 $1            Clean up addr
  193. R$*<$+>$*        $1$2$3                defocus
  194.  
  195.  
  196. #  Clean up an name for passing to a mailer
  197. #  (but leave it focused)
  198. S9
  199. R@            $@$n                handle <> error addr
  200. R$*<$*LOCAL>$*        $1<$2$m>$3            change local info
  201. R<@$+>$*:$+:$+        <@$1>$2,$3:$4            <route-addr> canonical
  202.  
  203.  
  204. #######################
  205. #   Rewriting rules
  206.  
  207. # special local conversions
  208. S6
  209. R$*<@$*$=m>$*        $1<@$2LOCAL>$4            convert local domain
  210.  
  211. # Local and Program Mailer specification
  212.  
  213. Mlocal,    P=/bin/mail, F=rlsDFMmnP, S=10, R=20, A=mail -d $u
  214. Mprog,    P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
  215.  
  216. S10
  217. # None needed.
  218.  
  219. S20
  220. # None needed.
  221.  
  222. ############################################################
  223. #####
  224. #####        Ethernet Mailer specification
  225. #####
  226. #####    Messages processed by this configuration are assumed to remain
  227. #####    in the same domain.  This really has nothing particular to do
  228. #####   with Ethernet - the name is historical.
  229.  
  230. Mether,    P=[TCP], F=msDFMuCX, S=11, R=21, A=TCP $h
  231. S11
  232. R$*<@$+>$*        $@$1<@$2>$3            already ok
  233. R$+            $@$1<@$w>            tack on our hostname
  234.  
  235. S21
  236. # None needed.
  237.  
  238.  
  239.  
  240. ##########################################################
  241. #  General code to convert back to old style UUCP names
  242. S5
  243. R$+<@LOCAL>        $@ $D!$1            name@LOCAL => sun!name
  244. R$+<@$-.LOCAL>        $@ $2!$1            u@h.LOCAL => h!u
  245. R$+<@$+.uucp>        $@ $2!$1            u@h.uucp => h!u
  246. R$+<@$*>        $@ $2!$1            u@h => h!u
  247. # Route-addrs do not work here.  Punt til uucp-mail comes up with something.
  248. R<@$+>$*        $@ @$1$2            just defocus and punt
  249. R$*<$*>$*        $@ $1$2$3            Defocus strange stuff
  250.  
  251. #    UUCP Mailer specification
  252.  
  253. Muucp,    P=/usr/bin/uux, F=msDFMhuU, S=13, R=23,
  254.     A=uux - -r $h!rmail ($u)
  255.  
  256. # Convert uucp sender (From) field
  257. S13
  258. R$+            $:$>5$1                convert to old style
  259. R$=w!$+            $2                strip local name
  260. R$+            $:$w!$1                stick on real host name
  261.  
  262. # Convert uucp recipient (To, Cc) fields
  263. S23
  264. R$+            $:$>5$1                convert to old style
  265.  
  266.  
  267. #####        RULESET ZERO PREAMBLE
  268.  
  269. # Ruleset 30 just calls rulesets 3 then 0.
  270. S30
  271. R$*            $: $>3 $1            First canonicalize
  272. R$*            $@ $>0 $1            Then rerun ruleset 0
  273.  
  274. S0
  275. # On entry, the address has been canonicalized and focused by ruleset 3.
  276. # Handle special cases.....
  277. R@            $#local $:$n            handle <> form
  278. # For numeric spec, you can't pass spec on to receiver, since rcvr's
  279. # are not smart enough to know that [x.y.z.a] is their own name.
  280. R<@[$+]>:$*        $:$>9 <@[$1]>:$2        Clean it up, then...
  281. R<@[$+]>:$*        $#ether $@[$1] $:$2        numeric internet spec
  282. R<@[$+]>,$*        $#ether $@[$1] $:$2        numeric internet spec
  283. R$*<@[$+]>        $#ether $@[$2] $:$1        numeric internet spec
  284.  
  285. # arrange for local names to be fully qualified
  286. R$*<@$%y>$*        $1<@$2.LOCAL>$3            user@etherhost
  287.  
  288. # now delete redundant local info
  289. R$*<$*$=w.LOCAL>$*    $1<$2>$4            thishost.LOCAL
  290. R$*<@LOCAL>$*        $1<@$m>$2            host == domain gateway
  291. R$*<$*$=w.uucp>$*    $1<$2>$4            thishost.uucp
  292. R$*<$*$=w>$*        $1<$2>$4            thishost
  293. R$*<$*.>$*        $1<$2>$3            drop trailing dot
  294. R<@>:$*            $@$>30$1            retry after route strip
  295. R$*<@>            $@$>30$1            strip null trash & retry
  296.  
  297.  
  298. ################################################
  299. ###  Machine dependent part of ruleset zero  ###
  300. ################################################
  301.  
  302. # resolve names we can handle locally
  303. R<@$=V.uucp>:$+        $:$>9 $1            First clean up, then...
  304. R<@$=V.uucp>:$+        $#uucp  $@$1 $:$2        @host.uucp:...
  305. R$+<@$=V.uucp>        $#uucp  $@$2 $:$1        user@host.uucp
  306.  
  307. # optimize names of known ethernet hosts
  308. R$*<@$%y.LOCAL>$*    $#ether $@$2 $:$1<@$2>$3    user@host.here
  309.  
  310. # other non-local names will be kicked upstairs
  311. R$+            $:$>9 $1            Clean up, keep <>
  312. R$*<@$+>$*        $#$M    $@$R $:$1<@$2>$3    user@some.where
  313. R$*@$*            $#$M    $@$R $:$1<@$2>        strangeness with @
  314.  
  315. # Local names with % are really not local!
  316. R$+%$+            $@$>30$1@$2            turn % => @, retry
  317.  
  318. # everything else is a local name
  319. R$+            $#local $:$1            local names
  320.