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

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