home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / mail / sendmail / 1960 < prev    next >
Encoding:
Text File  |  1992-07-29  |  5.2 KB  |  198 lines

  1. Newsgroups: comp.mail.sendmail
  2. Path: sparky!uunet!think.com!paperboy.osf.org!rsalz
  3. From: rsalz@osf.org (Rich Salz)
  4. Subject: Re: OR (remote mode)?
  5. Message-ID: <1992Jul29.142537.15421@osf.org>
  6. Sender: news@osf.org (USENET News System)
  7. Organization: Open Software Foundation
  8. References: <1992Jul24.115200.26786@mp.cs.niu.edu> <1992Jul28.155421.20972@newsgate.sps.mot.com> <1992Jul28.205339.25825@eua.ericsson.se>
  9. Date: Wed, 29 Jul 1992 14:25:37 GMT
  10. Lines: 186
  11.  
  12. >I definitely recommend using one of the minimalist sendmail.cf's for this
  13. >purpose that has been floating around the net instead of the OR option ...
  14. > ... essentially the version that Rich Salz sent out
  15. >on comp.mail.sendmail a while back (the smallest one I've seen so far:-),
  16. >and all of the problems went away.
  17. Since a few people have asked...
  18.  
  19. ###
  20. ###  This is a SendMail configuration file for a client who can make a TCP
  21. ###  connection to a mail relay.  No local mail happens here.  SendMail is
  22. ###  not run in daemon mode, either, just hourly out of cron to pick up
  23. ###  anything left when the server was not reachable.
  24. ###
  25.  
  26. ##
  27. ##  HOSTNAME MACROS AND CLASSES
  28.  
  29. ##  The name of our corporate domain.
  30. DCbbn.com
  31.  
  32. ##  The official name of this host (from gethostname(2)).
  33. Dj$w
  34.  
  35. ##  The relay host where everything gets forwarded to.
  36. DRpineapple.bbn.com
  37.  
  38. ##
  39. ##  GENERAL CONFIGURATION INFORMATION
  40. ##  Stuff here is required and reflects some policy decisions.
  41.  
  42. ##  SMTP login message.
  43. De$j Sendmail $v/$V ready at $b; how did you get here?
  44. ##  Format of the UNIX from line -- essentially a constant.
  45. DlFrom $g $d
  46. ##  Name to use for returned mail -- essentially a constant.
  47. DnMAILER-DAEMON
  48. ##  Token delimeters -- word separators in the rewrite rules below.
  49. Do.:%@![]
  50. ##  Format of a sender's address; use full name.
  51. Dq$x <$g>
  52. ##  Version of this .cf file.
  53. DVrsalz-13-nov-89
  54.  
  55. ##  Location of the alias file.
  56. OA/usr/lib/aliases
  57. ##  Default delivery mode (one of background, foreground, queue).
  58. Odbackground
  59. ##  Permissions for any temporary files we create.
  60. OF0644
  61. ##  Default group id for mailers to run under.
  62. Og1
  63. ##  Location of the SMTP help file.
  64. OH/dev/null
  65. ##  Logging level.
  66. OL9
  67. ##  Send to sender if an alias expansion includes her (a/k/a "me too")?
  68. OmT
  69. ##  Allow headers to be in old style (i.e., spaces delimit names)?
  70. OoT
  71. ##  Where to send important error messages.
  72. OPpostmaster
  73. ##  Location of the queue directory.
  74. OQ/usr/spool/mqueue
  75. ##  Give up on connections after this long a time period.
  76. Or2h
  77. ##  Queue up everything before starting transmission?
  78. OsT
  79. ##  How long message can sit in queue before it's bounced back?
  80. OT3d
  81. ##  Default user id for mailers to run under.
  82. Ou1
  83. ##  Password to enter wizard/debug mode.
  84. OW*
  85.  
  86. ##  Message precedences.
  87. Pfirst-class=0
  88. Pspecial-delivery=100
  89. Pbulk=-50
  90. Pjunk=-100
  91.  
  92. ##  Trusted users -- these people can fake headers.
  93. Troot
  94.  
  95. ##  Format of headers.
  96. HReceived: $?sfrom $s $.by $j id <$i@$j>; $b
  97. HDate: $a
  98. HFrom: $q
  99. HMessage-Id: <$t.$i@$j>
  100. HResent-Date: $a
  101. HResent-From: $q
  102. HResent-Message-Id: <$t.$i@$j>
  103.  
  104. ##
  105. ##  REWRITING RULES
  106. ##
  107. ##  These are the rules used for the following fields:
  108. ##     From    3 -> 1 -> 4 -> 3 -> 1 -> S -> 4
  109. ##     To    3 -> 0 -> 4
  110. ##     From:    3 -> 1 -> 5 -> 4
  111. ##     To:    3 -> 2 -> R -> 4
  112. ##  where S and R stand for the mailer-specific rewrite rules named in
  113. ##  the mailer definition.
  114.  
  115.  
  116. ##
  117. ##  RULESET  0 -- Pick a mailer.
  118. S0
  119. R$*<$*>$*        $1$2$3            defocus
  120. R$+            $:$>3$1            make canonical
  121. R$*<@[$+]>$*        $#TCPrelay$@[$2]$:$1@[$2]$3    numeric internet spec
  122. R$*<$*.>$*        $1<$2>$3        drop trailing dot
  123. R<@>:$*            $@$>0$1            retry after route strip
  124. R$*<@>            $@$>0$1            strip null trash & retry
  125. ## Machine dependent part of ruleset 0.
  126. ## Here is where we actually find a mailer to invoke.
  127. R$*            $#TCPrelay$@$R$:$1    forward everything
  128.  
  129.  
  130. ##
  131. ##  RULESET  1 -- From and From: fields.
  132. S1
  133.  
  134.  
  135. ##
  136. ##  RULESET  2 -- To: field.
  137. S2
  138.  
  139.  
  140. ##
  141. ##  RULESET  3 -- Basic name canonicalization.
  142. S3
  143. # Handle the SMTP "from:<>" as a special case.
  144. R<>            $@@            turn into magic token
  145. # Basic textual canonicalization.
  146. R$*<$+>$*        $2            basic RFC821/822 parsing
  147. R$*<$*>$*        $1$2$3            in case recursive
  148. R$+:$*;@$+        $@$1:$2;@$3        list syntax
  149. R@$+,$+            $2            Ignore source routes, as
  150. R@$+:$+            $2            RFC-1123 suggests
  151. R$+@$+            $:$1<@$2>        focus on domain
  152. R$+<$+@$+>        $1$2<@$3>        move gaze right
  153. R$+<@$+>        $@$>6$1<@$2>        already canonical
  154. # Convert old-style addresses to a domain-based address.
  155. R$+%$+            $@$>6$1<@$2>        u%h
  156. R$-!$+            $@$>6$2<@$1.UUCP>    resolve uucp names
  157.  
  158.  
  159. ##
  160. ##  RULESET  4 -- Final output rewriting.
  161. S4
  162. R@            $@            handle <> error addr
  163. # Externalize local domain info.
  164. R$*<$*LOCAL>$*        $1<$2$R>$3        change local info
  165. R$*<$+>$*        $1$2$3            defocus
  166. R$+<@$w>        $1            remove our name
  167. R$+@$-.UUCP        $2!$1            u@h.UUCP->h!u
  168.  
  169.  
  170. ##
  171. ##  RULESET  5 -- From: field post-processing (just before final).
  172. S5
  173.  
  174.  
  175. ##
  176. ##  RULESET  6 -- Canonicalize hostname (called from ruleset 3).
  177. S6
  178. R$+<@$+.$+.UUCP>    $1<@$2.$3>        u@h.d.uucp->u@h.d
  179.  
  180.  
  181. ##
  182. ##  RULESET 14 -- All fields for all mailers
  183. S14
  184.  
  185.  
  186. ##
  187. ##  MAILER SPECIFICATIONS
  188. ##
  189.  
  190. ##  local; an error as we do no mail delivery here
  191. Mlocal, P=/usr/lib/sendmail, F=DFILMmsuX, S=14, R=14, A=sendmail $n
  192.  
  193. ##  prog; an error as we do no mail delivery here
  194. Mprog,  P=/usr/lib/sendmail, F=DFILMmsuX, S=14, R=14, A=sendmail $n
  195.  
  196. ##  TCPrelay; connect to Sendmail on relay host.
  197. MTCPrelay, P=[IPC], F=DFLMmsuX, S=14, R=14, A=IPC $h, E=\r\n
  198.