home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / usr / template / client / etc / sendmail / sendmail.sharedsubsidiary.cf < prev    next >
Encoding:
Text File  |  1992-07-21  |  8.5 KB  |  324 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. OT3Wtdefault UID
  92. Ou1
  93.  
  94. ###   Message precedences
  95. Pfirst-class=0
  96. Pspecial-delivery=100
  97. Pjunk=-100
  98.  
  99. ###   Trusted users
  100. T root agent uucp
  101.  
  102. ###   Format of headers 
  103. H?P?Return-Path: <$g>
  104. HReceived: $?sfrom $s $.by $j ($v/$V)
  105.     id $i; $b
  106. H?D?Resent-Date: $a
  107. H?D?Date: $a
  108. H?F?Resent-From: $q
  109. H?F?From: $q
  110. H?x?Full-Name: $x
  111. HSubject:
  112. H?M?Resent-Message-Id: <$t.$i@$j>
  113. H?M?Message-Id: <$t.$i@$j>
  114. HErrors-To:
  115.  
  116. ###########################
  117. ###   Rewriting rules   ###
  118. ###########################
  119.  
  120.  
  121. #  Sender Field Pre-rewriting
  122. S1
  123. # None needed.
  124.  
  125. #  Recipient Field Pre-rewriting
  126. S2
  127. # None needed.
  128.  
  129. # Name Canonicalization
  130.  
  131. # Internal format of names within the rewriting rules is:
  132. #     anything<@host.domain.domain...>anything
  133. # We try to get every kind of name into this format, except for local
  134. # names, which have no host part.  The reason for the "<>" stuff is
  135. # that the relevant host name could be on the front of the name (for
  136. # source routing), or on the back (normal form).  We enclose the one that
  137. # we want to route on in the <>'s to make it easy to find.
  138. S3
  139.  
  140. # handle "from:<>" special case
  141. R<>            $@@                turn into magic token
  142.  
  143. # basic textual canonicalization
  144. R$*<$+>$*        $2                basic RFC822 parsing
  145.  
  146. # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
  147. R@$+,$+:$+        @$1:$2:$3            change all "," to ":"
  148. R@$+:$+            $@$>6<@$1>:$2            src route canonical
  149.  
  150. R$+:$*;@$+        $@$1:$2;@$3            list syntax
  151. R$+@$+            $:$1<@$2>            focus on domain
  152. R$+<$+@$+>        $1$2<@$3>            move gaze right
  153. R$+<@$+>        $@$>6$1<@$2>            already canonical
  154.  
  155. # convert old-style names to domain-based names
  156. # All old-style names parse from left to right, without precedence.
  157. R$-!$+            $@$>6$2<@$1.uucp>        uucphost!user
  158. R$-.$+!$+        $@$>6$3<@$1.$2>            host.domain!user
  159. R$+%$+            $:$1%%$2            user%host
  160. R$+%%$+%$+        $1%$2%%$3            move gaze right
  161. R$+%%$+            $@$>3$1@$2            re-canonicalize
  162.  
  163. #  Final Output Post-rewriting 
  164. S4
  165. R$+<@$+.uucp>        $2!$1                u@h.uucp => h!u
  166. R$+            $: $>9 $1            Clean up addr
  167. R$*<$+>$*        $1$2$3                defocus
  168.  
  169.  
  170. #  Clean up an name for passing to a mailer
  171. #  (but leave it focused)
  172. S9
  173. R@            $@$n                handle <> error addr
  174. R$*<$*LOCAL>$*        $1<$2$m>$3            change local info
  175. R<@$+>$*:$+:$+        <@$1>$2,$3:$4            <route-addr> canonical
  176.  
  177.  
  178. #############################################################
  179. #####
  180. #####        Rewriting rules
  181. #####
  182.  
  183. # special local conversions
  184. S6
  185. R$*<@$*.uucp>$*        $@$1<@$2.uucp>$3        no Wge to UUCP hosts
  186. R$*<@$+>$*        $:$1<@$[$2$]>$3            find canonical hostname
  187. R$*<@$*$=m>$*        $1<@$2LOCAL>$4            convert local domain
  188.  
  189. ############################################################
  190. #####
  191. #####        Local and Program Mailer specification
  192. #####
  193. Mlocal,    P=/bin/mail, F=rlsDFMmnP, S=10, R=20, A=mail -d $u
  194. Mprog,    P=/bin/sh,   F=lsDFMeuP,  S=10, R=20, A=sh -c $u
  195.  
  196. S10
  197. # None needed.
  198.  
  199. S20
  200. # None needed.
  201.  
  202. ############################################################
  203. #####
  204. #####        Ethernet Mailer specification
  205. #####
  206. #####    Messages processed by this configuration are assumed to remain
  207. #####    in the same domain.  This really has nothing particular to do
  208. #####   with Ethernet - the name is historical.
  209.  
  210. Mether,    P=[TCP], F=msDFMuX, S=11, R=21, A=TCP $h
  211. S11
  212. R$*<@$+>$*        $@$1<@$2>$3            already ok
  213. R$+            $@$1<@$w>            tack on our hostname
  214.  
  215. S21
  216. # None needed.
  217.  
  218.  
  219.  
  220. ############################################################
  221. #####
  222. #####        Local Ethernet Mailer specification
  223. #####
  224. #####    This mailer acts as the local mailer for those machines
  225. #####    that have a remotely mounted mail partition.
  226.  
  227. Metherl, P=[TCP], F=msDFuXn, S=12, R=22, A=TCP $h
  228. S12
  229. # None needed.
  230.  
  231. S22
  232. R$*<@LOCAL>        $@$1            remove ugly old local
  233.  
  234.  
  235. ############################################################
  236. #####
  237. #####    General code to convert back to old style UUCP names
  238. #####
  239. S5
  240. R$+<@LOCAL>        $@ $w!$1            name@LOCAL => host!name
  241. R$+<@$-.LOCAL>        $@ $2!$1            u@h.LOCAL => h!u
  242. R$+<@$+.uucp>        $@ $2!$1            u@h.uucp => h!u
  243. R$+<@$*>        $@ $2!$1            u@h => h!u
  244. # Route-addrs do not work here.  Punt til uucp-mail comes up with something.
  245. R<@$+>$*        $@ @$1$2            just defocus and punt
  246. R$*<$*>$*        $@ $1$2$3            Defocus strange stuff
  247.  
  248. ############################################################
  249. #####
  250. #####        UUCP Mailer specification
  251. #####
  252. Muucp,    P=/usr/bin/uux, F=msDFMhuU, S=13, R=23, E=\n,
  253.     A=uux - -r $h!rmail ($u)
  254.  
  255. # Convert uucp sender (From) field
  256. S13
  257. R$+            $:$>5$1                convert to old style
  258. R$=w!$+            $2                strip local name
  259. R$+            $:$w!$1                stick on real host name
  260.  
  261. # Convert uucp recipient (To, Cc) fields
  262. S23
  263. R$+            $:$>5$1                convert to old style
  264.  
  265.  
  266. ############################################################
  267. #####
  268. #####        RULESET ZERO PREAMBLE
  269.  
  270. # Ruleset 30 just calls rulesets 3 then 0.
  271. S30
  272. R$*            $: $>3 $1            First canonicalize
  273. R$*            $@ $>0 $1            Then rerun ruleset 0
  274.  
  275. S0
  276. # On entry, the address has been canonWized and focused by ruleset 3.
  277. # Handle special cases.....
  278. R@            $#local $:$n            handle <> form
  279. # For numeric spec, you can't pass spec on to receiver, since rcvr's
  280. # are not smart enough to know that [x.y.z.a] is their own name.
  281. R<@[$+]>:$*        $:$>9 <@[$1]>:$2        Clean it up, then...
  282. R<@[$+]>:$*        $#ether $@[$1] $:$2        numeric internet spec
  283. R<@[$+]>,$*        $#ether $@[$1] $:$2        numeric internet spec
  284. R$*<@[$+]>        $#ether $@[$2] $:$1        numeric internet spec
  285.  
  286. # now delete redundant local info
  287. R$*<$*$=w.LOCAL>$*    $1<$2>$4            thishost.LOCAL
  288. R$*<@LOCAL>$*        $1<@$m>$2            host == domain gateway
  289. R$*<$*$=w.uucp>$*    $1<$2>$4            thishost.uucp
  290. R$*<$*$=w>$*        $1<$2>$4            thishost
  291. R$*<$*.>$*        $1<$2>$3            drop trailing dot
  292. R<@>:$*            $@$>30$1            retry after route strip
  293. R$*<@>            $@$>30$1            strip null trash & retry
  294.  
  295.  
  296. ################################################
  297. ###  Machine dependent part of ruleset zero  ###
  298. ################################################
  299.  
  300. # resolve names we can handle locally
  301. R<@$=V.uucp>:$+        $:$>9 $1            First clean up, then...
  302. R<@$=V.uucp>:$+        $#uucp  $@$1 $:$2        @host.uucp:...
  303. R$+<@$=V.uucp>        $#uucp  $@$2 $:$1        user@host.uucp
  304.  
  305. # non-local UUCP hosts get kicked upstairs
  306. R$+<@$+.uucp>        $#$M  $@$R $:$2!$1
  307.  
  308. # optimize names of known ethernet hosts
  309. R$*<@$+.LOCAL>$*    $#ether $@$2 $:$1<@$2>$3    user@host.here
  310. # hosts in no domains are assumed to be local
  311. R$*<@$->$*        $#ether $@$2 $:$1<@$2>$3    user@host
  312.  
  313. # other non-local names will be kicked upstairs
  314. R$+            $:$>9 $1            Clean up, keep <>
  315. R$*<@$+>$*        $#$M    $@$R $:$1<@$2>$3    user@some.where
  316. R$*@$*            $#$M    $@$R $:$1<@$2>        strangeness with @
  317.  
  318. # Local names with % are really not local!
  319. R$+%$+            $@$>30$1%$2            retry
  320.  
  321. # everything else is a local name which gets delivered to mailhost
  322. R$+            $#$M    $@$R $:$1        local names
  323.