home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / smail2 / part05 < prev    next >
Encoding:
Internet Message Format  |  1987-02-16  |  9.6 KB

  1. Subject:  v08i071:  Smail, release 2.3, Part05/05
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by:  Larry Auton <lda@clyde.att.com>
  6. Mod.sources: Volume 8, Issue 71
  7. Archive-name: smail2/Part05
  8.  
  9. [  Anyone for writing the .cf file into EASE?  --r$  ]
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line,
  13. # then unpack it by saving it in a file and typing "sh file".
  14. # If all goes well, you will see the message "End of shell archive."
  15. # Contents:  src/template.cf
  16. # Wrapped by rs@mirror on Mon Feb  9 17:10:13 1987
  17. PATH=/bin:/usr/bin:/usr/ucb; export PATH
  18. echo shar: extracting "'src/template.cf'" '(8397 characters)'
  19. if test -f 'src/template.cf' ; then 
  20.   echo shar: will not over-write existing file "'src/template.cf'"
  21. else
  22. sed 's/^X//' >src/template.cf <<'@//E*O*F src/template.cf//'
  23. X############################################################
  24. X#
  25. X#    SENDMAIL CONFIGURATION FILE
  26. X#
  27. X#    supports internet style addressing
  28. X#    over UUCP and ethernet links.
  29. X#
  30. X#    A product of the UUCP Project.
  31. X#
  32. X############################################################
  33. X
  34. X
  35. X############################################################
  36. X#
  37. X#  Local configuration options - HINTS
  38. X#
  39. X# Host name and domain name macros.
  40. X#
  41. X#    Dw sets $w
  42. X#    DD sets $D
  43. X#    CD sets $=D
  44. X#
  45. X# $D and $=D list all domains in which this host sits.
  46. X# $D goes into outbound addresses, i.e. "user@$w.$D".
  47. X# $A is another domain for which this host is 'authoritative'
  48. X# it will will be turned into $D.
  49. X
  50. XCF_HOST
  51. XCF_DOMAIN
  52. XCF_AUTHORITY
  53. XCF_DCLASS
  54. X
  55. X# Preemptive ether connections.  We prefer these connections 
  56. X# over both designated transport mechanisms and the general depository.
  57. X# You can add more classes (here and in S0).
  58. X
  59. X# /etc/hosts.smtp might be a link to /etc/hosts
  60. X#
  61. XCF_SMTP
  62. X
  63. X# Mock top-level domain names.  These name designate a transport mechanism
  64. X# and appear internally only, set in S3, used in S0, and removed in S4 and
  65. X# (possibly) the ruleset for the particular mailer.  
  66. X
  67. XCTETHER UUX
  68. X
  69. X# Relay host.  Used at the end of S0 as the general depository for 
  70. X# addresses which didn't resolve locally.  
  71. X
  72. XDRrelay
  73. X
  74. X#
  75. X#  End Local configuration options
  76. X#
  77. X############################################################
  78. X
  79. X############################################################
  80. X#
  81. X#    General configuration information
  82. X#
  83. X############################################################
  84. X
  85. XDVsmail2.2/CF_DATE
  86. X
  87. X##########################
  88. X#     Special macros     #
  89. X##########################
  90. X
  91. X# official hostname
  92. XDj$w.$D
  93. X# my name
  94. XDnMAILER-DAEMON
  95. X# UNIX header format
  96. XDlFrom $g  $d
  97. X# delimiter (operator) characters
  98. XDo.:%@!^=/[]
  99. X# format of a total name
  100. XDq$g$?x ($x)$.
  101. X# SMTP login message
  102. XDe$j Sendmail $v/$V ready at $b
  103. X
  104. X
  105. X###################
  106. X#     Options     #
  107. X###################
  108. X
  109. X# location of alias file
  110. XOA/usr/lib/aliases
  111. X# default delivery mode (deliver in background)
  112. XOdbackground
  113. X# (don't) connect to "expensive" mailers
  114. X#Oc
  115. X# temporary file mode
  116. XOF0644
  117. X# default GID
  118. XOg1
  119. X# location of help file
  120. XOH/usr/lib/sendmail.hf
  121. X# log level
  122. XOL9
  123. X# default messages to old style
  124. XOo
  125. X# queue directory
  126. XOQ/usr/spool/mqueue
  127. X# read timeout -- violates protocols
  128. XOr2h
  129. X# status file
  130. XOS/usr/lib/sendmail.st
  131. X# queue up everything before starting transmission
  132. XOs
  133. X# default timeout interval
  134. XOT3d
  135. X# time zone names (V6 only)
  136. XOtPST,PDT
  137. X# default UID
  138. XOu1
  139. X# wizard's password
  140. XOWvoidpasswords
  141. X
  142. X###############################
  143. X#     Message precedences     #
  144. X###############################
  145. X
  146. XPfirst-class=0
  147. XPspecial-delivery=100
  148. XPjunk=-100
  149. X
  150. X#########################
  151. X#     Trusted users     #
  152. X#########################
  153. X
  154. XTroot
  155. XTdaemon
  156. XTuucp
  157. XTnetwork
  158. X
  159. X#############################
  160. X#     Format of headers     #
  161. X#############################
  162. X
  163. X#H?P?Return-Path: <$g>
  164. XHReceived: $?sfrom $s 
  165. X    $.by $j ($v/$V)
  166. X    id $i; $b
  167. XH?D?Resent-Date: $a
  168. XH?D?Date: $a
  169. XH?F?Resent-From: $q
  170. XH?F?From: $q
  171. XH?x?Full-Name: $x
  172. XHSubject:
  173. X# HPosted-Date: $a
  174. X# H?l?Received-Date: $b
  175. XH?M?Resent-Message-Id: <$t.$i@$j>
  176. XH?M?Message-Id: <$t.$i@$j>
  177. X
  178. X############################################################
  179. X#
  180. X#        REWRITING RULES
  181. X#
  182. X
  183. X
  184. X###########################
  185. X#              #
  186. X#  Name Canonicalization  #
  187. X#              #
  188. X###########################
  189. XS3
  190. X
  191. X# basic textual canonicalization
  192. XR<>            $@@                turn into magic token
  193. XR$*<$+>$*        $2                basic RFC821/822 parsing
  194. XR$+ at $+        $1@$2                "at" -> "@" for RFC 822
  195. XR$*<$*>$*        $1$2$3                in case recursive
  196. X
  197. X# handle route-addr <@a,@b,@c:user@d> 
  198. XR@$+,$+            @$1:$2                change all "," to ":"
  199. XR@$+:$+            $@<@$1>:$2            handle <route-addr>
  200. XR$+:$*;@$+        $@$1:$2;@$3            list syntax
  201. X
  202. X# Rewrite address into a domain-based address.  Any special mock domain names 
  203. X# (like UUX) should be defined on the CT line and removed (if necessary) 
  204. X# in S4.  You can use them in S0 for designated transport mechanisms.
  205. X
  206. X# Delimiters with precedence over @.  Add yours here.
  207. X
  208. X# The @ delimiter.  Leave this alone.
  209. XR$+@$+            $:$1<@$2>            focus on domain
  210. XR$+<$+@$+>        $1$2<@$3>            move gaze right
  211. XR$+<@$+>        $@$1<@$2>            already canonical
  212. X
  213. X# Delimiters with precedence below @.  Add yours here.
  214. XR$+^$+            $1!$2                convert ^ to !
  215. XR$-!$+            $@$2<@$1.UUX>            resolve uucp names
  216. XR$+.!$+            $@$2<@$1>            domain.!host
  217. XR$+!$+            $@$2<@$1>            domain!host
  218. X
  219. X# % is a low precedence @.
  220. XR$*%$*            $@$>3$1@$2            %->@ and retry
  221. X
  222. X############################################################
  223. X#
  224. X#            RULESET ZERO PREAMBLE
  225. X#
  226. X############################################################
  227. X
  228. XS0
  229. X
  230. X# first make canonical
  231. XR$*<$*>$*        $1$2$3                defocus
  232. XR$+            $:$>3$1                make canonical
  233. X
  234. X# handle special cases.....
  235. XR@            $#local$:MAILER-DAEMON        handle <> form
  236. XR$*<@[$+]>$*        $#ether$@[$2]$:$1@[$2]$3    numeric internet spec
  237. X
  238. X# strip local stuff
  239. XR$*<@$-.$w.$D>$*    $1<@$2>$3            thishost.mydom
  240. XCF_GATEWAYR$*<@$-.$D>$*    $1<@$2>$3            mydom
  241. XR$*<@$-.$w.$=D>$*    $1<@$2>$4            thishost.anydom
  242. XR$*<@$-.$w.$A>$*    $1<@$2>$3            thishost.anotherdom
  243. XR$*<@$-.$A>$*        $1<@$2>$3            anotherdom
  244. XR$*<@$-.$w.$=T>$*    $1<@$2>$4            thishost.mockdom
  245. XCF_GATEWAYR$*<$*$w>$*    $1<$2>$3            thishost
  246. XR$*<$*.>$*        $1<$2>$3            drop trailing dot
  247. XR<@>:$+            $@$>0$1                strip null route, retry
  248. XR$+<@>            $@$>0$1                strip null addr, retry
  249. X
  250. X
  251. X###############################################
  252. X#    Machine dependent part of ruleset zero   #
  253. X###############################################
  254. X
  255. X# Preemption: for a host on a known link turn the domain spec into a
  256. X# mock domain indicating the link.  One set of these rules for each of 
  257. X# the F classes listed in the local configuration options.
  258. X
  259. XR$*<$*$=E.$D>$*            $:$1<$2$3.ETHER>$4    etherhost.mydomain
  260. XR$*<$*$=E.$=D>$*        $:$1<$2$3.ETHER>$5    etherhost.anydomain
  261. XR$*<$*$=E.$A>$*            $:$1<$2$3.ETHER>$4    etherhost.anotherdomain
  262. XR$*<$*$=E.$=T>$*        $:$1<$2$3.ETHER>$5    etherhost.mock-domain
  263. XR$*<$*$=E>$*            $:$1<$2$3.ETHER>$4    etherhost
  264. X
  265. X# Designated delivery: use the indicated transport mechanism.  One of
  266. X# these rules for each of the mock domains defined in $=T.  You can
  267. X# remove these if you just want general disposition.  HINTS.
  268. X
  269. X# Designated delivery:
  270. XR$*<@$=U.UUX>$*        $#uux$@$2$:$1$3            known uucphost
  271. XR$*<@$=E$+.ETHER>$*    $#ether$@$2$:$1@$2$4        known etherhost
  272. XR$*<@$+.ETHER>$*    $#ether$@$2$:$1@$2$3        etherhost
  273. X
  274. X# throw out mock domain name now
  275. XR$*<$*.$=T>$*        $1<$2>$4
  276. X
  277. X# General disposition of remote mail (comment out all but one).  You
  278. X# might add to this list, if you have other "smarter" mailers.  HINTS.
  279. X
  280. XR$*<@$->:$+        $#uux$@$2$:$1$3            forward to $2
  281. XR$*<@$*>$*        $#uux$@$2$:$1$3            hand to uucp
  282. X#R$*<@$*>$*        $#uux$@$R$:$1@$2$3        hand to uucp relay
  283. X#R$*<@$*>$*        $#ether$@$R$:$1@$2$3        hand to ether relay
  284. X#R$*<$*>$*        $#error$:unknown address $1$2$3    don't hand anywhere
  285. X
  286. X# local delivery
  287. XR$+            $#local$:$1            user
  288. X
  289. X############################################################
  290. X#
  291. X#         Local and Program Mailer specification
  292. X#
  293. X############################################################
  294. X
  295. XCF_SVMAILMlocal, P=CF_LOCALMAIL, F=lsDFMhumSU, S=10, R=20, A=rmail $u
  296. XCF_BSMAILMlocal, P=CF_LOCALMAIL, F=rlsDFMmn, S=10, R=20, A=mail -d $u
  297. XMprog,    P=/bin/sh,   F=lsDFMe,   S=10, R=20, A=sh -c $u
  298. X
  299. XS10
  300. XR@            MAILER-DAEMON    errors to mailer-daemon
  301. XCF_HIDDENHOSTSR$+<@$+.$j>$*        $1<@$j>$3    hide anydom.$j under $j
  302. X
  303. XS20
  304. X
  305. X############################################################
  306. X#
  307. X#            UUCP Mailer specification
  308. X#
  309. X############################################################
  310. X
  311. XMuux,    P=/bin/smail, F=sDFMhum, S=14, R=24, M=100000,
  312. X    A=smail -vH$j $h!$u
  313. X
  314. XS14
  315. XR$+<@$=E>        $1            user@etherhost -> user
  316. XR$*<@$+>$*        $@$1<@$2>$3        already ok
  317. XCF_HIDDENHOSTSR$+<@$+.$j>$*        $1<@$j>$3        hide anydom.$j under $j
  318. XR$+            $@$1<@$j>        add our full address
  319. X
  320. XS24
  321. X
  322. X############################################################
  323. X#
  324. X#            SMTP ethernet mailer
  325. X#
  326. X############################################################
  327. X
  328. XMether,    P=[IPC], F=msDFMuCXP, S=11, R=21, A=IPC $h
  329. X
  330. XS11
  331. XR$*<@$+>$*        $@$1<@$2>$3        already ok
  332. XR$+            $@$1<@$w>        add our hostname
  333. X
  334. XS21
  335. X
  336. X#################################
  337. X#  Final Output Post-rewriting  #
  338. X#################################
  339. X
  340. X# This rewrites the internal $=T mock domains into their external form.
  341. X# The default is to replace the mock domain name with $D.
  342. X# The last two lines are stock.
  343. X
  344. XS4
  345. XR@            $@                handle <> error addr
  346. XR$+<@$-.UUX>        $2!$1                u@host.UUX => host!u
  347. XR$*<$*$=T>$*        $:$1<$2$D>$4            change local info
  348. XR$*<$+>$*        $1$2$3                defocus
  349. XR@$+:$+:$+        $@@$1,$2:$3            <route-addr> canonical
  350. @//E*O*F src/template.cf//
  351. if test 8397 -ne "`wc -c <'src/template.cf'`"; then
  352.     echo shar: error transmitting "'src/template.cf'" '(should have been 8397 characters)'
  353. fi
  354. fi # end of overwriting check
  355. echo shar: "End of shell archive."
  356. exit 0
  357.