home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 25 Icons / 25-Icons.zip / yodomain.zip / sendmail.cf0 < prev    next >
Text File  |  1999-10-20  |  48KB  |  943 lines

  1. ########################################################################
  2. # File: sendmail.uml             Version 3.0               16-Apr-1995 #
  3. #                                Niel Kempson <kempson@snowyowl.co.uk> #
  4. ########################################################################
  5. #                                                                      #
  6. # CHANGE LOG                                                           #
  7. #                                                                      #
  8. #   1.0 [27-Nov-1994] Niel Kempson <kempson@snowyowl.co.uk>            #
  9. #       Initial release.                                               #
  10. #                                                                      #
  11. #   2.0 [05-Feb-1995] Niel Kempson <kempson@snowyowl.co.uk>            #
  12. #       Clarified use of 'Cw' macro and added support for LAMail.      #
  13. #                                                                      #
  14. #   3.0 [16-Apr-1995] Niel Kempson <snowyowl.co.uk>                    #
  15. #       Further clarifications for some bits that evidently weren't    #
  16. #       clear enough :-(                                               #
  17. #                                                                      #
  18. ########################################################################
  19. #                                                                      #
  20. #                                                                      #
  21. #  Sendmail                                                            #
  22. #  Copyright (c) 1983  Eric P. Allman                                  #
  23. #  Berkeley, California                                                #
  24. #                                                                      #
  25. #  Copyright (c) 1983 Regents of the University of California.         #
  26. #  All rights reserved.  The Berkeley software License Agreement       #
  27. #  specifies the terms and conditions for redistribution.              #
  28. #                                                                      #
  29. #  This configuration file was modified specifically for IBM's         #
  30. #  SENDMAIL product for the IBM OS/2 Operating System.  Please avoid   #
  31. #  making changes to this file, as it will change the operation of     #
  32. #  SENDMAIL.                                                           #
  33. #                                                                      #
  34. #  Modified by: Ed Overly    &   Daniel Barton       @ IBM             #
  35. #              Yorktown, NY  Research Triangle Park, NC                #
  36. #                                                                      #
  37. #----------------------------------------------------------------------#
  38. #                                                                      #
  39. # Changes to allow UltiMail/2 Lite to work as an SMTP client rather    #
  40. # than the usual POP client.  You will need to edit this file and      #
  41. # customise it for your setup.                                         #
  42. #                                                                      #
  43. #   1.  Use an editor that preserves TAB characters.  Do NOT use the   #
  44. #       EPM or TEDIT editors that come with OS/2 - they expand TABs    #
  45. #       into spaces and will cause this file to be useless.  The E     #
  46. #       editor is OK.                                                  #
  47. #                                                                      #
  48. #   2.  Search for the string "---EDIT---" in this file and edit the   #
  49. #       following line(s) in accordance with the notes in the adjacent #
  50. #       comment.  There are 10 occurrences of "---EDIT---" after this  #
  51. #       line.  PLEASE make sure that you check each of them before     #
  52. #       firing up sendmail.                                            #
  53. #                                                                      #
  54. #   3.  There are explicit paths specified in this file; the examples  #
  55. #       presented assume that your IAK installation is in the default  #
  56. #       location of C:\TCPIP.  If this is not the case, please check   #
  57. #       carefully the paths specified under EDITs 04,05,06,07,10.      #
  58. #                                                                      #
  59. #   4.  For the examples predefined in this file:                      #
  60. #                                                                      #
  61. #       o   official host name: snowyowl.demon.co.uk                   #
  62. #                                                                      #
  63. #       o   other aliases: snowyowl.com, snowyowl.co.uk, sos.co.uk     #
  64. #                                                                      #
  65. #          o   IBM TCP/IP installed in C:\TCPIP                           #
  66. #                                                                      #
  67. #       o   all outgoing mail sent to post.demon.co.uk for onward      #
  68. #           routing and delivery                                       #
  69. #                                                                      #
  70. #   5.  After configuration, this file should be installed as          #
  71. #       <ETC-DIR>\sendmail.uml, where <ETC-DIR> is the TCP/IP ETC      #
  72. #       directory (usually C:\TCPIP\ETC).                              #
  73. #                                                                      #
  74. #   6.  UltiMail/2 Lite will use this file automatically, but sendmail #
  75. #       will need to be told to use it as well.  When you start the    #
  76. #       sendmail daemon, be sure to specify the -C option as shown in  #
  77. #       this example:                                                  #
  78. #                                                                      #
  79. #           sendmail -bd -d1.1 -q5m -Cc:\tcpip\etc\sendmail.uml        #
  80. #                                                                      #
  81. #   7.  If you want to use this file with LAMail, ensure that it is    #
  82. #    called X:\tcpip\etc\sendmail.cf (where X: is your TCP/IP disk).#
  83. #                                                                      #
  84. ########################################################################
  85.  
  86.  
  87.  
  88. ########################################################################
  89. #                                                                      #
  90. # Host name definition (YOU MUST DEFINE THESE)                         #
  91. #                                                                      #
  92. # The Dw macro defines the "official" host name that will be reported  #
  93. # on any outgoing mail as part of the "From" address.  It can contain  #
  94. # only one host name, without the domain name appended (i.e. no dots   #
  95. # allowed).                                                            #
  96. #                                                                      #
  97. # The Cw class macro defines all of the host names for which we will   #
  98. # accept incoming mail as destined for this machine.  It can contain   #
  99. # a list of host names, separated by whitespace.  The host names must  #
  100. # not have the domain name appended (i.e. no dots allowed).  As a      #
  101. # minimum, the Cw class must include the "official" host name as       #
  102. # defined in the Dw macro.                                             #
  103. #                                                                      #
  104. # YOU MUST DEFINE Cw OR SENDMAIL WILL NEVER RECOGNISE INCOMING MAIL AS #
  105. # "LOCAL" AND WILL BOUNCE IT BACK TO THE SENDER.  Normally, the Dw and #
  106. # Cw definitions are identical.                                    #
  107. #                                                                      #
  108. # Complicated Example:                                                 #
  109. #                                                                      #
  110. #   The full domain name of the host is 'snowyowl.demon.co.uk', so     #
  111. #   define the 'w' macro:                                              #
  112. #                                                                      #
  113. #       Dwsnowyowl                                                     #
  114. #                                                                      #
  115. #   We also wish to accept mail addressed to 'sos-gate.demon.co.uk',   #
  116. #   so add 'sos-gate' to the minimum essential definition of the 'w'   #
  117. #   class ('Cwsnowyowl'):                                               #
  118. #                                                                      #
  119. #       Cwsnowyowl  sos-gate                                           #
  120. #                                                                      #
  121. # Normal Examples:                                                     #
  122. #                                                                      #
  123. #   The full domain name of the host is 'company.com', so define:      #
  124. #                                                                      #
  125. #       Dwcompany                                                      #
  126. #       Cwcompany                                                      #
  127. #       DDcom                                                          #
  128. #                                                                      #
  129. #   The full domain name of the host is 'myhost.cts.com', so define:   #
  130. #                                                                      #
  131. #       Dwmyhost                                                       #
  132. #       Cwmyhost                                                       #
  133. #       DDcts.com                                                      #
  134. #                                                                      #
  135. #   (Remember that Cw MUST be defined, normally to the same as Dw.)    #
  136. #   (DD isn't defined until EDIT--02.)                                 #
  137. #                                                                      #
  138. #----------------------------------------------------------------------#
  139. #                                                                      #
  140. #   NOTE:   If you want to support aliases in another domain           #
  141. #        (e.g. snowyowl.com), these are defined later under EDITs   #
  142. #           08 and 09.                                                 #
  143. #                                                                      #
  144. #   NOTE:   You MUST define Cw or sendmail will never recognise        #
  145. #           incoming mail as "local" and will bounce it back to the    #
  146. #           sender.  Normally, the Dw and Cw definitions are identical.#
  147. #                                                                      #
  148. ########################################################################
  149. #---EDIT---01---
  150. Dwdashs
  151. Cwdashs  localhost 
  152.  
  153.  
  154. ########################################################################
  155. #                                                                      #
  156. # Local domain name. (DEFINE THIS IF DOMAINS ARE USED)                 #
  157. # **WARNING**                                                          #
  158. #                                                                      #
  159. # When domain names are used, SMTP transactions utilize the            #
  160. # full domain (official) name of the host. All host names with         #
  161. # no domains (abbreviated) are expanded with the local domain          #
  162. # by the mail service. This is consistent with Internet text standards.#
  163. # All hosts sending or RECEIVING mail must recognize their official    #
  164. # host names. When using domains enter the official host name in       #
  165. # /etc/hosts and be certain that all network nameservers recognize     #
  166. # official host names.                                                 #
  167. #                                                                      #
  168. # Define the D macro to be the whole domain for the local host.        #
  169. # This configuration file supports four part domains. It can be        #
  170. # expanded to support n part domains.                                  #
  171. #                                                                      #
  172. # Example:                                                             #
  173. #                                                                      #      
  174. #   The full domain name of the host is 'snowyowl.demon.co.uk', so     #
  175. #   define the 'D' macro:                                              #
  176. #                                                                      #
  177. #       DDdemon.co.uk                                                  #
  178. #                                                                      #
  179. ########################################################################
  180. #---EDIT---02---
  181. DDdenver.co.us
  182.  
  183. ########################################################################
  184. #                                                                      #
  185. # MAIL RELAY HOST                                                      #
  186. #                                                                      #
  187. # For dialup lines, it is usually desirable to send all outgoing mail  #
  188. # to a 'local' host (usually belonging to the service provider) as     #
  189. # quickly as possible and then leave it to worry about delivery to     #
  190. # remote (and slow) parts of the net.                                  #
  191. #                                                                      #
  192. # Define the 'V' macro as the full domain name of the relay host.      #
  193. # If you don't have a relay host, comment out the DV line below.       #
  194. #                                                                      #
  195. # Example:                                                             #
  196. #                                                                      #
  197. #   All outgoing mail will be sent to 'post.demon.co.uk' for onward    #
  198. #   delivery, so define the 'V' macro:                                 #
  199. #                                                                      #
  200. #       DVpost.demon.co.uk                                             #
  201. #                                                                      #
  202. # NOTE: Please don't use post.demon.co.uk unless you are a demon       #
  203. #       customer.  Use the mail host run by your service provider.     #
  204. #                                                                      #
  205. ########################################################################
  206. #---EDIT---03---
  207. DVsmtp.dimensional.com
  208.  
  209.  
  210. # my official host name (includes host name and domain name)
  211. Dj$w$?D.$D$.
  212.  
  213.  
  214. #####################################################
  215. #   Version Number   (YOU MAY CHANGE THIS AS NEEDED)#
  216. #####################################################
  217. DZ3.0ars
  218.  
  219.  
  220. ######################
  221. #   Special macros   #
  222. ######################
  223.  
  224. # my name
  225. DnMAILER-DAEMON
  226. # UNIX header format
  227. #DlFrom $g  $d
  228. DlFrom $g $d remote from $s
  229. # delimiter (operator) characters
  230. Do.:%@!^=/[]
  231. # format of a total name
  232. Dq$g$?x ($x)$.
  233. # SMTP login message
  234. De$j Sendmail $v/$Z ready at $b
  235.  
  236.  
  237. ###############
  238. #   Options   #
  239. ###############
  240.  
  241.  
  242. ########################################################################
  243. #                                                                      #
  244. # LOCATION OF IMPORTANT FILES                                          #
  245. #                                                                      #
  246. ########################################################################
  247.  
  248.  
  249. #=======================================================================
  250. # Location of alias file - use the 'A' option to define the full file
  251. # specification of the sendmail alias file.  It's conventionally called
  252. # \tcpip\etc\aliases on the TCP/IP drive.  Sendmail doesn't mind if this
  253. # file doesn't exist.
  254. #
  255. # Example: OAc:\tcpip\etc\aliases
  256. #=======================================================================
  257. #---EDIT---04---
  258. OAe:\tcpip\etc\aliases
  259.  
  260.  
  261. #=======================================================================
  262. # Location of help file - use the 'H' option to define the full file
  263. # specification of the sendmail help file.  It's conventionally called
  264. # \tcpip\etc\sendmail.hf on the TCP/IP drive.
  265. #
  266. # Example: OHc:\tcpip\etc\sendmail.hf
  267. #=======================================================================
  268. #---EDIT---05---
  269. OHe:\tcpip\etc\sendmail.hf
  270.  
  271.  
  272. #=======================================================================
  273. # Directory used to hold files in the outgoing mail queue - use the 'Q'
  274. # option to define the queue directory.  It's conventionally called
  275. # \tcpip\etc\mqueue on the TCP/IP drive.  Sendmail will crash if this
  276. # directory doesn't exist.
  277. #
  278. # Example: OQc:\tcpip\etc\mqueue
  279. #=======================================================================
  280. #---EDIT---06---
  281. OQe:\tcpip\etc\mqueue
  282.  
  283.  
  284. #=======================================================================
  285. # Location of status file - use the 'S' option to define the full file
  286. # specification of the sendmail status file.  It's conventionally called
  287. # \tcpip\etc\sendmail.st on the TCP/IP drive.  OS/2 sendmail doesn't
  288. # make use of this file so don't worry if you can't find it anywhere.
  289. #
  290. # Example: OSc:\tcpip\etc\sendmail.st
  291. #=======================================================================
  292. #---EDIT---07---
  293. OSe:\tcpip\etc\sendmail.st
  294.  
  295.  
  296. ########################################################################
  297. #                                                                      #
  298. # OTHER SENDMAIL CONFIGURATION OPTIONS                                 #
  299. #                                                                      #
  300. ########################################################################
  301.  
  302. # substitution for space (blank) characters
  303. OB.
  304.  
  305. # (don't) connect to "expensive" mailers
  306. #Oc
  307.  
  308. # default delivery mode
  309. Odbackground
  310.  
  311. # default messages to old style
  312. Oo
  313.  
  314. # queue up everything before starting transmission
  315. Os
  316.  
  317. #=======================================================================
  318. # Time to live in the queue - '7d' means 7 days.
  319. #=======================================================================
  320. OT7d
  321.  
  322. # load average at which we refuse connections
  323. #OX
  324.  
  325. # work recipient factor
  326. #Oy
  327.  
  328. # work msg class factor
  329. #Oz
  330.  
  331. # work time factor
  332. #OZ
  333.  
  334. #  Read Timeout
  335. Ortime120m
  336.  
  337. ########################################################################
  338. # Message precedences                                                  #
  339. # Note: could use equal weight so we can let relay decide what to do   #
  340. ########################################################################
  341. Pfirst-class=0
  342. Pspecial-delivery=100
  343. Pbulk=-60
  344. Pjunk=-100
  345.  
  346.  
  347. ########################################################################
  348. # Trusted users                                                        #
  349. ########################################################################
  350. # This parameter is not used by OS/2 Sendmail. 
  351. Tdaemon
  352.  
  353.  
  354. ########################################################################
  355. # Format of headers                                                    #
  356. ########################################################################
  357. # H?P?Return-Path: <$g>
  358. HReceived: $?sfrom $s $.by $j ($v/$Z)
  359.       id $i; $b
  360. H?D?Resent-Date: $a
  361. H?D?Date: $a
  362. H?F?Resent-From: $q
  363. H?F?From: $q
  364. H?x?Full-Name: $x
  365. HSubject:
  366. # HPosted-Date: $a
  367. # H?l?Received-Date: $b
  368. H?M?Resent-Message-Id: <$t.$i@$j>
  369. H?M?Message-Id: <$t.$i@$j>
  370.  
  371.  
  372. ########################################################################
  373. #                                                                      #
  374. #                          REWRITING RULES                             #
  375. #                                                                      #
  376. ########################################################################
  377.  
  378.  
  379. ########################################################################
  380. #                                                                      #
  381. #  The Complete Specification of Canonical Syntax is:                  #
  382. #                                                                      #
  383. #   <ahost>       ::= /* ARPA type host name */                        #
  384. #   <uhost>       ::= /* UUCP type host name */                        #
  385. #   <user>        ::= /* target user name */                           #
  386. #                                                                      #
  387. #   <route_node>  ::= @<ahost>: | <uhost>!                             #   
  388. #   <route_path>  ::= <NULL> | <route_node> | <route_path><route_node> #
  389. #   <target>      ::= <user> | <user>@<ahost>                          #
  390. #                                                                      #
  391. #   <address>     ::= <route_path><target>                             #
  392. #                                                                      #
  393. #  This is what we handle, but actually we only look at the minimum    #
  394. #  required to pass the mail on.  Intermediaries with other syntax/    #
  395. #  semantics may be used, provided the addressing is compatible with   #
  396. #  them when the mail arrives there.                                   #
  397. #                                                                      #
  398. ########################################################################
  399.  
  400.  
  401. ########################################################################
  402. #                                                                      #
  403. #                  THE DYNAMIC MACROS $f AND $g                        #
  404. #                                                                      #
  405. #  Macro $f is defined by the sender address as known the current      #
  406. #  host, via the ruleset sequence:  3, 1, 4.                           #
  407. #                                                                      #
  408. #  Macro $g is defined at delivery time for each separate mailer via   #
  409. #  the ruleset sequence:  3, 1, mailer-S, 4.                           #
  410. #                                                                      #
  411. #  The SMTP "MAIL FROM" address will be $g.                            #
  412. #                                                                      #
  413. #  $g is included in many headers and will be expanded if the header   #
  414. #  is newly created by sendmail.                                       #
  415. #                                                                      #
  416. ########################################################################
  417.  
  418.  
  419. ########################################################################
  420. #                                                                      #
  421. #                         THE SMTP INTERFACE                           #
  422. #                                                                      #
  423. #  The SMTP "MAIL FROM" address will be $g.                            #
  424. #                                                                      #
  425. #  The SMTP "RCPT TO" addresses will be computed from the recipient    #
  426. #  addresses in sendmail by applying the same ruleset sequence as for  #
  427. #  "to" headers:  namely, rulesets 3, 2, mailer-R, 4                   #
  428. #                                                                      #
  429. ########################################################################
  430.  
  431.  
  432. ########################################################################
  433. #                                                                      #
  434. #  S1:  Sender Field Pre-rewriting                                     #
  435. #                                                                      #
  436. #  This ruleset is used when defining the $f macro.  In this case it   #
  437. #  is applied after S3 and before S4.                                  #
  438. #                                                                      #
  439. #  This ruleset is applied to all sender type headers after S3 and     #
  440. #  before the mailer specific sender (S) rewrite rules.                #
  441. #  This ruleset is also applied to $f to create $g.                    #
  442. #                                                                      #
  443. ########################################################################
  444. S1
  445.  
  446.  
  447. ########################################################################
  448. #                                                                      #
  449. #  S2:  Recipient Field Pre-rewriting                                  #
  450. #                                                                      #
  451. #  This ruleset is applied to the user part of the 3-tuple output from #
  452. #  S0.  It is followed by application of the mailer specific recipient #
  453. #  [R] rewrite rules.                                                  #
  454. #                                                                      #
  455. #  This ruleset is applied to all recipient type headers after S3 and  #
  456. #  before the mailer specific recipient (R) rewrite rules.             #
  457. #  This ruleset is likewise used to reform the "to" address for SMTP.  #
  458. #                                                                      #
  459. ########################################################################
  460. S2
  461.  
  462.  
  463. ########################################################################
  464. #                                                                      #
  465. #  S4:  Final Output Post-rewriting   (Return to standard form)        #
  466. #                                                                      #
  467. #  This ruleset is applied to the user part of the 3-tuple produced    #
  468. #  from ruleset 0.  It is applied after the mailer specific recipient  #
  469. #  [R] rules.                                                          #
  470. #                                                                      #
  471. #  This ruleset is applied after S1 when defining the $f macro.        #
  472. #  This ruleset is applied last when creating the $g macro from $f.    #
  473. #                                                                      #
  474. #  This ruleset is applied to all headers after the mailer specific    #
  475. #  rewrite rules (whether recipient or sender) have been applied.      #
  476. #  This ruleset is applied last when computing the RCPT TO address for #
  477. #  SMTP.                                                               #
  478. #                                                                      #
  479. ########################################################################
  480. S4
  481.  
  482. #
  483. #  Change LOCAL or LOCAL.D to the full domain name.
  484. #
  485. R$*<@LOCAL>$*        $:$1<@$w$?D.$D$.>$2
  486. R$*<@LOCAL.D>$*        $:$1<@$w$?D.$D$.>$2
  487. R$*<@$-.LOCAL>$*    $:$1<@$2$?D.$D$.>$3
  488.  
  489. R$*<LOCAL>$*        $:$1<$w$?D.$D$.>$2
  490. R$*<LOCAL.D>$*        $:$1<$w$?D.$D$.>$2
  491. R$*<$-.LOCAL>$*        $:$1<$2$?D.$D$.>$3
  492.  
  493. #
  494. #  Remove focus brackets.
  495. #
  496. R$*<$+>$*        $1$2$3
  497.  
  498.  
  499. ########################################################################
  500. #                                                                      #
  501. #  S3:  Address Canonicalization  (Internal rewriting form)            #
  502. #                                                                      #
  503. #  This ruleset turns an address in external format into a format      #
  504. #  which simplifies internal rewriting.  The inverse ruleset is S4.    #
  505. #  This ruleset is applied first to any external address before other  #
  506. #  rewriting is done.                                                  #
  507. #                                                                      #
  508. #  This concept of canonicalization is to be distinguished from usage  #
  509. #  of the nameserver in the $[/$] construct inside the RHS of rewrite  #
  510. #  rules.  This is also sometimes called "canonicalization", but has   #
  511. #  to do not with the syntax of the address but with obtaining the     #
  512. #  correct domain name for the address.                                #
  513. #                                                                      #
  514. #  No stripping of local domains is done for route addresses:          #
  515. #  Rulesets which require this must do it themselves by iteratively    #
  516. #  stripping LOCAL or LOCAL.D and recalling this ruleset to            #
  517. #  canonicalize the next host.item.                                    #
  518. #                                                                      #
  519. #  The term "localization" refers to determining whether the next host #
  520. #  item is really a reference to the current host.  Localization       #
  521. #  assumes that local UUCP host names are in class w.  This is not     #
  522. #  strictly a necessary restriction, but it simplifies the network     #
  523. #  concept and also makes for simpler rewrite rules.  This ruleset     #
  524. #  replaces explicit instances of local host with the internally       #
  525. #  recognized tag "LOCAL" or "LOCAL.D".                                #
  526. #                                                                      #
  527. #  Addresses which do not specify a host name for routing or domain    #
  528. #  will NOT have any reference to the local host appended in any way.  #
  529. #                                                                      #
  530. ########################################################################
  531. S3
  532.  
  533. #
  534. #  Basic textual canonicalization -- note RFC733 heuristic here.
  535. #  This strips off everything but the innermost list between <>'s.
  536. #  Some addresses are of the format: Full Name <address>
  537. #
  538. R$*<$*<$*<$+>$*>$*>$*    $4        3-level <> nesting
  539. R$*<$*<$+>$*>$*        $3        2-level <> nesting
  540. R$*<$+>$*        $2        basic RFC821/822 parsing
  541.  
  542. #
  543. #  Turn an "at" token into "@".
  544. #
  545. #  The I macro specifies space or some equivalent char defined by the OI
  546. #  config option above.
  547. #
  548. R$+ at $+        $:$1@$2        "at" -> "@" for RFC 822
  549.  
  550. #  Change a%b to a@b. This implies that we support a%b%c... as a route
  551. #  based address from right to left.
  552. #  This form of addressing should go away as full domains are supported.
  553. #
  554. R$+%$-            $1@$2
  555.  
  556. #  ====> NOTE <====
  557. #  This configuration file always evaluates mix mode addresses from
  558. #  left to right. No precedence between @ and ! is assumed. The
  559. #  address a!b@c will resolve to the uucp mailer for the remote host
  560. #  'a'. This permits the resolution of very complex route based
  561. #  addresses such as; @a:@b:c!d!user, a!@b:c!user, a!@b.uucp:user@c.
  562. #  Return addresses on mail to/from AIX level 4 machines are also
  563. #  correct. If you wish the address a!b@c to resolve to the TCP
  564. #  mailer for the remote host 'c' then uncomment the following rewrite
  565. #  rule. This approach is compatible with older versions of sendmail.
  566.  
  567. #  Change a!b@c to @c:a!b
  568. #R$-!$-@$+        @$3:$1!$2
  569.  
  570. #
  571. #  Change commas to colons for route addresses.
  572. #
  573. R$+,$+            $1:$2
  574.  
  575. #
  576. #  Pick out route addresses.  Focus and call localizer.
  577. #
  578. R@$+:$+            $@$>9<@$1>:$2        handle <route-addr>
  579. R$-!$+            $@$>8<$1>!$2        UUCP route
  580.  
  581. #  Detect domain!user. Internally convert to user@domain (RFC976).
  582. #  Rule set 8 will detect local addresses and strip any trailing
  583. #  periods.
  584. R$-.$*!$+                $@$>8<$1.$2>!$3
  585.  
  586. #
  587. #  Detect local domain for nonroute addresses.  Focus and localize.
  588. R$+@$+            $:$1<@$2>
  589. R$+<@$=w.$D>        $@$1<@LOCAL.D>
  590. R$+<@$=w>        $@$1<@LOCAL>
  591. R$+<@$=w.UUCP>        $@$1<@LOCAL>
  592.  
  593.  
  594. ##############################################################################
  595. #
  596. # Treat other addresses as aliases for the local machine.  The rules must
  597. # be presented in the form:
  598. #
  599. #   R$+<@site.domain>[TAB]$@$1<@LOCAL>
  600. #
  601. # where [TAB] is a TAB character.
  602. #
  603. # Example:
  604. #
  605. #   We recognise mail sent to our aliases of 'snowyowl.com', 'snowyowl.co.uk'
  606. #   and 'sos.co.uk' and treat it as local mail by defining three extra
  607. #   rules:
  608. #
  609. #    R$+<@snowyowl.com>        $@$1<@LOCAL>
  610. #    R$+<@snowyowl.co.uk>        $@$1<@LOCAL>
  611. #    R$+<@sos.co.uk>            $@$1<@LOCAL>
  612. #
  613. # NOTE: if you don't have a registered domain name for mail that is different
  614. #       from your official host name (as defined by EDITs 01 & 02), you
  615. #       don't want these extra rewriting rules.  If this is the case,
  616. #       please leave the three lines under EDIT---08 commented out.
  617. #
  618. ##############################################################################
  619. #---EDIT---08---
  620. #R$+<@full.domain.name>        $@$1<@LOCAL>
  621.  
  622.  
  623. #=============================================================================
  624. # Normal addresses in the form "user<@domain.name>" are left untouched, 
  625. # but this rule is present to catch local addresses (i.e. those not containing
  626. # an "@").
  627. #=============================================================================
  628. R$+<@$+>            $@$1<@$2>
  629.  
  630. #
  631. # Anything getting this far is treated as a local name, including simple 
  632. # names.  They will NOT have an appended domain.
  633. # This is so the $f macro definition will be the sender address
  634. # as known locally.
  635. #
  636. R$+                $:$1<@LOCAL>        # just a user name
  637.  
  638.  
  639.  
  640. ########################################################################
  641. #                                                                      #
  642. #  S9:    Localize ARPA type route path.                                 #
  643. #                                                                      #
  644. #  This is used only by S3.                                            #
  645. #                                                                      #
  646. ########################################################################
  647. S9
  648.  
  649. R<@$=w.$D>:$*            $@<@LOCAL.D>:$2
  650. R<@$=w>:$*            $@<@LOCAL>:$2
  651. R<@$=w.UUCP>:$*            $@<@LOCAL>:$2
  652.  
  653.  
  654. ##############################################################################
  655. #
  656. # Strip off any of our aliases from the beginning of a routed mail address.
  657. # Incoming mail can often be addressed in the form:
  658. #
  659. #   @snowyowl.demon.co.uk:kempson@snowyowl.com
  660. #
  661. # and its useful to strip off the unnecessary routing hop if the first
  662. # one is actually local.
  663. #
  664. # The rules must be presented in the form:
  665. #
  666. #   R<@host.site.domain>:$*[TAB]$@<@LOCAL>:$1
  667. #
  668. # where [TAB] is a TAB character.
  669. #
  670. # Example:
  671. #
  672. #   We recognise mail sent to our aliases of 'snowyowl.com', 'snowyowl.co.uk'
  673. #   and 'sos.co.uk' and treat it as local mail by defining three extra
  674. #   rules:
  675. #
  676. #       R<@snowyowl.com>:$*        $@<@LOCAL>:$1
  677. #       R<@snowyowl.co.uk>:$*        $@<@LOCAL>:$1
  678. #       R<@sos.co.uk>:$*        $@<@LOCAL>:$1
  679. #
  680. # NOTE: if you don't have a registered domain name for mail that is different
  681. #       from your official host name (as defined by EDITs 01 & 02), you
  682. #       don't want these extra rewriting rules.  If this is the case,
  683. #       please leave the three lines under EDIT---09 commented out.
  684. #
  685. ##############################################################################
  686. #---EDIT---09---
  687. #R<@full.domain.name>:$*        $@<@LOCAL>:$1
  688.  
  689.  
  690.  
  691.  
  692. ########################################################################
  693. #                                                                      #
  694. #                              MAILERS                                 #
  695. #                                                                      #
  696. ########################################################################
  697.  
  698.  
  699. ########################################################################
  700. #                                                                      #
  701. # LOCAL AND PROGRAM MAILER SPECIFICATION                               #
  702. #                                                                      #
  703. # Mail for this host is presented to the "local" mailer for delivery.  #
  704. #                                                                      #
  705. #                                                                      #
  706. # Local delivery to UltiMail/2                                         #
  707. # ----------------------------                                         #
  708. #                                                                      #
  709. #   We want to pass incoming mail to the UMAILER program provided with #
  710. #   UltiMail/2 Lite - it accepts messages and stores them in           #
  711. #   UltiMail's In-Basket folder.                                       #
  712. #                                                                      #
  713. #   The 'local' mailer should be defined as:                           #
  714. #                                                                      #
  715. #     Mlocal, P=c:\tcpip\umail\umailer.exe, F=lsDFPM, S=10, R=20,      #
  716. #             A=-dest c:\tcpip\umail\server\inbox -to $u               #
  717. #                                                                      #
  718. #                                                                      #
  719. # Local delivery to LAMail                                             #
  720. # ------------------------                                             #
  721. #                                                                      #
  722. #   We want to pass such mail to LAMail for delivery to its InBox.     #
  723. #   There is no explicit .exe program used to perform the delivery -   #
  724. #   a DLL provided by LAMail is used instead.  An 'Mlocal' definition  #
  725. #   is still needed and it should look like this:                      #
  726. #                                                                      #
  727. #     Mlocal, P=c:\tcpip\etc\mail.exe, F=lsDFPM, S=10, R=20,           #
  728. #             A=c:\tcpip\etc\mail $u                                   #
  729. #                                                                      #
  730. #   Warning: there MUST NOT be a real "c:\tcpip\etc\mail.exe" program, #
  731. #         or mail will be passed to it instead of the LAMail DLL.   #
  732. #                                                                      #
  733. # NOTE                                                                 #
  734. # ----                                                                 #
  735. #   The Mlocal definitions must be on one line only - they have been   #
  736. #   wrapped in the examples above to make them more easy to read.      #
  737. #                                                                      #
  738. #   THE Mlocal DEFINITIONS MUST BE ON ONE LINE ONLY - they have been   #
  739. #   wrapped in the examples above to make them more easy to read.      #
  740. #                                                                      #
  741. ########################################################################
  742. #---EDIT---10---
  743.  
  744. #
  745. # delivery
  746. #
  747. #Mlocal, P=c:\uupc\rmail.exe, F=lsmDFU,  S=10, R=20, A=-x0 $u
  748. #Mlocal, P=c:\uupc\uusmtpd.exe, F=lsDFU,  S=10, R=20, A=d:\mail $u
  749.  
  750. #
  751. # UltiMail/2 delivery
  752. #
  753. #Mlocal, P=c:\tcpip\umail\umailer.exe, F=lsDFPM, S=10, R=20, A=-dest #c:\tcpip\umail\server\inbox -to $u
  754.  
  755. #
  756. # Local delivery by user
  757. #
  758. Mlocal, P=h:\deliver.exe, F=lsDFPM, S=10, R=20, A= -c h:\deliver.cfg -l e:\uupc\spool\dmail.log  $u $f
  759.  
  760. Mprog,  P=h:\cmd.exe,         F=lsDFM,   A= /c 
  761.  
  762.  
  763.  
  764. ########################################################################
  765. #                                                                      #
  766. #  S10:  Local/Prog Mailers Sender rules                               #
  767. #                                                                      #
  768. ########################################################################
  769. S10
  770.  
  771.  
  772. ########################################################################
  773. #                                                                      #
  774. #  S20:  Local/Prog Mailers Recipient rules                            #
  775. #                                                                      #
  776. ########################################################################
  777. S20
  778.  
  779.  
  780. ########################################################################
  781. #                                                                      #
  782. #                      TCP Mailer Specification                        #
  783. #                                                                      #
  784. ########################################################################
  785. Mtcp,     P=[IPC], F=mDFMueXL,  S=14, R=24, A=IPC $h
  786.  
  787.  
  788. ########################################################################
  789. #                                                                      #
  790. #  S14:  TCP Mailer Sender Rules                                       #
  791. #                                                                      #
  792. #  This ruleset is applied in the following circumstances:             #
  793. #                                                                      #
  794. #  1)  To process sender type headers.  These have header names:       #
  795. #                                                                      #
  796. #       "resent-sender"                                                #
  797. #       "resent-from"                                                  #
  798. #       "resent-reply-to"                                              #
  799. #       "sender"                                                       #
  800. #       "from"                                                         #
  801. #       "reply-to"                                                     #
  802. #       "return-receipt-to"                                            #
  803. #       "errors-to"                                                    #
  804. #                                                                      #
  805. #  2)  To define the $g macro from the $f macro.                       #
  806. #                                                                      #
  807. #  In either case, it is applied after ruleset 1, and is followed by   #
  808. #  ruleset 4.                                                          #
  809. #                                                                      #
  810. #  Watch out if one of those headers is newly created and includes the #
  811. #  expanded $g macro!  This ruleset will have been used to create $g,  #
  812. #  and will then be applied to the result of the expansion of $g.      #
  813. #  This ruleset must handle this!                                      #
  814. #                                                                      #
  815. #  The $g macro is used in many places.                                #
  816. #                                                                      #
  817. ########################################################################
  818. S14
  819.  
  820.  
  821.  
  822. ########################################################################
  823. #                                                                      #
  824. #  S24:  TCP Mailer Recipient rules                                    #
  825. #                                                                      #
  826. #  This ruleset is applied in the following cases:                     #
  827. #                                                                      #
  828. #  1)  To process recipient type headers being sent out through this   #
  829. #      mailer.  These headers are the ones with header names:          #
  830. #                                                                      #
  831. #       "to"                                                           #
  832. #       "resent-to"                                                    #
  833. #       "cc"                                                           #
  834. #       "resent-cc"                                                    #
  835. #       "bcc"                                                          #
  836. #       "resent-bcc"                                                   #
  837. #                                                                      #
  838. #     but NOT:                                                         #
  839. #                                                                      #
  840. #       "Apparently-to"                                                #
  841. #                                                                      #
  842. #  2)  To process the user part of the 3-tuple from S0 which resolves  #
  843. #      to this mailer.  This is the complete "to" address for ordinary #
  844. #      tcp usage, or is the original UUCP path if we are relaying      #
  845. #      using DU.                                                       #
  846. #                                                                      #
  847. #  3)  To process the "to" address to form the SMTP RCPT TO address.   #
  848. #                                                                      #
  849. #  In all cases, this ruleset is applied after ruleset 2, and is       #
  850. #  followed by ruleset 4.                                              #
  851. #                                                                      #
  852. #  Remember that this ruleset applies to all "to" type headers in the  #
  853. #  mail transmitted via this mailer.  This does not include            #
  854. #  "Apparently-to:" headers.  Not all "To:" headers point to the       #
  855. #  current mail target!  For instance, if the mail originated on this  #
  856. #  host and some targets were local, there may be local "To:" headers  #
  857. #  that must be processed by this ruleset!  The idea here is to make   #
  858. #  sure that the headers will be properly understood in the context of #
  859. #  the next host to which the mail will go.                            #
  860. #                                                                      #
  861. ########################################################################
  862. S24
  863.  
  864. #
  865. #  Leave route based addresses alone.  They are already completely
  866. #  intelligible in any context.
  867. #
  868. R<$+>$+            $@<$1>$2
  869.  
  870. #
  871. #  Fully qualify our host name with full domain.
  872. #
  873. R$+<@LOCAL>        $@$1<@LOCAL.D>
  874.  
  875. #
  876. #  Fully qualify nonlocal host names in our local domain.
  877. #
  878. R$+<@$->        $@$1<@$2.LOCAL>
  879.  
  880. #
  881. #  Leave all other typical domain addresses alone.
  882. #
  883. R$+<$+>            $@$1<$2>
  884.  
  885. #
  886. #  Append full local domain where none exists at all.  This handles the
  887. #  case of local targets whose (missing) host would cause misunderstanding
  888. #  in the next host.
  889. #
  890. R$+            $@$1<@LOCAL.D>
  891.  
  892.  
  893. ########################################################################
  894. #                                                                      #
  895. #      Rule Zero                                                       #
  896. #                                                                      #
  897. #  Resolve sender or recipient address to mailer/host/user 3-tuple.    #
  898. #  This may require iteration in use of S3 to strip leading route      #
  899. #  items which pertain to the current host.                            #
  900. #                                                                      #
  901. #  Sendmail will pass the user portion of the 3-tuple through ruleset  #
  902. #  2 + the mailer specific recipient ruleset + ruleset 4.              #
  903. #                                                                      #
  904. ########################################################################
  905. S0
  906.  
  907. #
  908. #  Handle route addresses that begin with LOCAL or LOCAL.D
  909. #
  910. R<$*LOCAL$*>$-$+    $>3$4
  911.  
  912. #  Change a%b<$*> to <$*>:a@b.
  913. #  This form of addressing should go away as full domains are supported.
  914. #
  915. R$+%$-<$*>        <$3>:$1@$2
  916.  
  917. #
  918. #  Handle explicit local delivery.
  919. #
  920. #  The entire prefix is treated as local user.
  921. R$+<@LOCAL$*>        $#local $:$1
  922.  
  923. #
  924. #  Canonicalize anything else which has an @focus.  This excludes simple
  925. #  names, which are local.
  926. #
  927. R$*<@$+>$*        $:$1<@$[$2$]>$3
  928.  
  929. #=============================================================================
  930. # Send domain address (including domain literals or IP quads) to the mail
  931. # relay defined by macro 'V' for onward delivery.  If macro 'V' hasn't been 
  932. # defined, attempt delivery directly.
  933. #=============================================================================
  934. R$*<@$+>$*        $#tcp $?V $@$V $:$1<@$2>$3 $| $@$2 $:$1<@$2>$3 $.
  935.  
  936. #
  937. #  Remaining names must be local.
  938. #  User is whatever is left.
  939. #
  940. R$+            $#local $:$1
  941.  
  942.