home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / template / client / etc / sendmail / sendmail.subsidiary.cf < prev   
Text File  |  1997-03-28  |  8KB  |  312 lines

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