home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / adpt107f.zip / sendmail.cf < prev    next >
Text File  |  1996-02-21  |  31KB  |  689 lines

  1. ########################################################################
  2. #                                                                      #
  3. #                                                                      #
  4. #  Sendmail                                                            #
  5. #  Copyright (c) 1983  Eric P. Allman                                  #
  6. #  Berkeley, California                                                #
  7. #                                                                      #
  8. #  Copyright (c) 1983 Regents of the University of California.         #
  9. #  All rights reserved.  The Berkeley software License Agreement       #
  10. #  specifies the terms and conditions for redistribution.              #
  11. #                                                                      #
  12. #  This configuration file was modified specifically for IBM's         #
  13. #  SENDMAIL product for the IBM OS/2 Operating System.  Please avoid   #
  14. #  making changes to this file, as it will change the operation of     #
  15. #  SENDMAIL.                                                           #
  16. #                                                                      #
  17. #  Modified by: Ed Overly    &   Daniel Barton       @ IBM             #
  18. #              Yorktown, NY  Research Triangle Park, NC                #
  19. ########################################################################
  20.  
  21. ########################################################################
  22. #                                                                      #
  23. # Host name definition (YOU MUST DEFINE THESE)                         #
  24. #                                                                      #
  25. # Define macro for your host name for all return addresses.            #
  26. # Define class to recognize all aliases of your host name.             #
  27. #                                                                      #
  28. # The domain will be added to this name!!! -mjz                        # 
  29. #                                                                      #
  30. #DwYourHostName                                                        #
  31. #CwYourHostName YourHostAliases                                        #
  32. ########################################################################
  33.  
  34. # My host name
  35. Dwadeptbbs
  36. Cwadeptbbs
  37.  
  38.  
  39. ########################################################################
  40. #                                                                      #
  41. # Local domain name. (DEFINE THIS IF DOMAINS ARE USED)                 #
  42. # **WARNING**                                                          #
  43. # When domain names are used, SMTP transactions utilize the            #
  44. # full domain (official) name of the host. All host names with         #
  45. # no domains (abbreviated) are expanded with the local domain          #
  46. # by the mail service. This is consistent with Internet text standards.#
  47. # All hosts sending or RECEIVING mail must recognize their official    #
  48. # host names. When using domains enter the official host name in       #
  49. # /etc/hosts and be certain that all network nameservers recognize     #
  50. # official host names.                                                 #
  51. #                                                                      #
  52. # Define the D macro to be the whole domain for the local host.        #
  53. # This configuration file supports four part domains. It can be        #
  54. # expanded to support n part domains.                                  #
  55. #                                                                      #
  56. #DDgrandchild.child.parent.top                                         #
  57. ########################################################################
  58.  
  59. # My domain name
  60. DDhsonline.net
  61.  
  62. ########################################################################
  63. #                                                                      #
  64. # Host name for UUCP handling (YOU MAY OPTIONALLY DEFINE THIS)         #
  65. #                                                                      #
  66. # Optionally define macro specifying name of host to which you want    #
  67. # to relay all UUCP traffic.  This would be a host on the network      #
  68. # with modems.  You do not have to define this to use UUCP.            #
  69. #                                                                      #
  70. # Defining this macro eliminates the requirement for you to explicitly #
  71. # reference the relaying host in your UUCP route addresses.  For       #
  72. # instance, if the host with modems is called "cat", you normally      #
  73. # would have to specify a UUCP address as "cat!route_path".  If you    #
  74. # define macro "DUcat", then you only need specify "route_path".       #
  75. #                                                                      #
  76. #DUHostWithModems                                                      #
  77. #                                                                      #
  78. ########################################################################
  79.  
  80. # my official host name (includes host name and domain name)
  81. Dj$w$?D.$D$.
  82.  
  83.  
  84. #####################################################
  85. #   Version Number   (YOU MAY CHANGE THIS AS NEEDED)#
  86. #####################################################
  87. DZ1.0
  88.  
  89.  
  90. ######################
  91. #   Special macros   #
  92. ######################
  93.  
  94. # my name
  95. DnMAILER-DAEMON
  96. # UNIX header format
  97. DlFrom $g  $d
  98. # delimiter (operator) characters
  99. Do.:%@!^=/[]
  100. # format of a total name
  101. Dq$g$?x ($x)$.
  102. # SMTP login message
  103. De$j Sendmail $v/$Z ready at $b
  104.  
  105.  
  106. ###############
  107. #   Options   #
  108. ###############
  109.  
  110. # location of alias file
  111. OAc:\tcpip\etc\aliases
  112.  
  113. # substitution for space (blank) characters
  114. OB.
  115.  
  116. # (don't) connect to "expensive" mailers
  117. #Oc
  118.  
  119. # default delivery mode
  120. Odbackground
  121.  
  122. # location of help file
  123. OHc:\tcpip\etc\sendmail.hf
  124.  
  125. # Queue directory - specify directory containing log file
  126. OQc:\tcpip\etc\mqueue
  127.  
  128. # default messages to old style
  129. Oo
  130.  
  131. # status file
  132. OSc:\tcpip\etc\sendmail.st
  133.  
  134. # queue up everything before starting transmission
  135. Os
  136.  
  137. # load average at which we refuse connections
  138. #OX
  139.  
  140. # work recipient factor
  141. #Oy
  142.  
  143. # work msg class factor
  144. #Oz
  145.  
  146. # work time factor
  147. #OZ
  148.  
  149.  
  150. ###########################
  151. #   Message precedences   #
  152. ###########################
  153.  
  154. Pfirst-class=0
  155. Pspecial-delivery=100
  156. Pbulk=-60
  157. Pjunk=-100
  158.  
  159.  
  160. #####################
  161. #   Trusted users   #
  162. #####################
  163.  
  164. #  This parameter is not used by OS/2 Sendmail. 
  165. Tdaemon
  166.  
  167.  
  168. #########################
  169. #   Format of headers   #
  170. #########################
  171.  
  172. H?P?Return-Path: <$g>
  173. HReceived: $?sfrom $s $.by $j ($v/$Z)
  174.       id $i; $b
  175. H?D?Resent-Date: $a
  176. H?D?Date: $a
  177. H?F?Resent-From: $q
  178. H?F?From: $q
  179. H?x?Full-Name: $x
  180. HSubject:
  181. # HPosted-Date: $a
  182. # H?l?Received-Date: $b
  183. H?M?Resent-Message-Id: <$t.$i@$j>
  184. H?M?Message-Id: <$t.$i@$j>
  185.  
  186.  
  187. ########################################################################
  188. #                                                                      #
  189. #                          REWRITING RULES                             #
  190. #                                                                      #
  191. ########################################################################
  192.  
  193.  
  194. ########################################################################
  195. #                                                                      #
  196. #  The Complete Specification of Canonical Syntax is:                  #
  197. #                                                                      #
  198. #   <ahost>       ::= /* ARPA type host name */                        #
  199. #   <uhost>       ::= /* UUCP type host name */                        #
  200. #   <user>        ::= /* target user name */                           #
  201. #                                                                      #
  202. #   <route_node>  ::= @<ahost>: | <uhost>!                             #   
  203. #   <route_path>  ::= <NULL> | <route_node> | <route_path><route_node> #
  204. #   <target>      ::= <user> | <user>@<ahost>                          #
  205. #                                                                      #
  206. #   <address>     ::= <route_path><target>                             #
  207. #                                                                      #
  208. #  This is what we handle, but actually we only look at the minimum    #
  209. #  required to pass the mail on.  Intermediaries with other syntax/    #
  210. #  semantics may be used, provided the addressing is compatible with   #
  211. #  them when the mail arrives there.                                   #
  212. #                                                                      #
  213. ########################################################################
  214.  
  215.  
  216. ########################################################################
  217. #                                                                      #
  218. #                  THE DYNAMIC MACROS $f AND $g                        #
  219. #                                                                      #
  220. #  Macro $f is defined by the sender address as known the current      #
  221. #  host, via the ruleset sequence:  3, 1, 4.                           #
  222. #                                                                      #
  223. #  Macro $g is defined at delivery time for each separate mailer via   #
  224. #  the ruleset sequence:  3, 1, mailer-S, 4.                           #
  225. #                                                                      #
  226. #  The SMTP "MAIL FROM" address will be $g.                            #
  227. #                                                                      #
  228. #  $g is included in many headers and will be expanded if the header   #
  229. #  is newly created by sendmail.                                       #
  230. #                                                                      #
  231. ########################################################################
  232.  
  233.  
  234. ########################################################################
  235. #                                                                      #
  236. #                         THE SMTP INTERFACE                           #
  237. #                                                                      #
  238. #  The SMTP "MAIL FROM" address will be $g.                            #
  239. #                                                                      #
  240. #  The SMTP "RCPT TO" addresses will be computed from the recipient    #
  241. #  addresses in sendmail by applying the same ruleset sequence as for  #
  242. #  "to" headers:  namely, rulesets 3, 2, mailer-R, 4                   #
  243. #                                                                      #
  244. ########################################################################
  245.  
  246.  
  247. ########################################################################
  248. #                                                                      #
  249. #  S1:  Sender Field Pre-rewriting                                     #
  250. #                                                                      #
  251. #  This ruleset is used when defining the $f macro.  In this case it   #
  252. #  is applied after S3 and before S4.                                  #
  253. #                                                                      #
  254. #  This ruleset is applied to all sender type headers after S3 and     #
  255. #  before the mailer specific sender (S) rewrite rules.                #
  256. #  This ruleset is also applied to $f to create $g.                    #
  257. #                                                                      #
  258. ########################################################################
  259. S1
  260.  
  261.  
  262. ########################################################################
  263. #                                                                      #
  264. #  S2:  Recipient Field Pre-rewriting                                  #
  265. #                                                                      #
  266. #  This ruleset is applied to the user part of the 3-tuple output from #
  267. #  S0.  It is followed by application of the mailer specific recipient #
  268. #  [R] rewrite rules.                                                  #
  269. #                                                                      #
  270. #  This ruleset is applied to all recipient type headers after S3 and  #
  271. #  before the mailer specific recipient (R) rewrite rules.             #
  272. #  This ruleset is likewise used to reform the "to" address for SMTP.  #
  273. #                                                                      #
  274. ########################################################################
  275. S2
  276.  
  277.  
  278. ########################################################################
  279. #                                                                      #
  280. #  S4:  Final Output Post-rewriting   (Return to standard form)        #
  281. #                                                                      #
  282. #  This ruleset is applied to the user part of the 3-tuple produced    #
  283. #  from ruleset 0.  It is applied after the mailer specific recipient  #
  284. #  [R] rules.                                                          #
  285. #                                                                      #
  286. #  This ruleset is applied after S1 when defining the $f macro.        #
  287. #  This ruleset is applied last when creating the $g macro from $f.    #
  288. #                                                                      #
  289. #  This ruleset is applied to all headers after the mailer specific    #
  290. #  rewrite rules (whether recipient or sender) have been applied.      #
  291. #  This ruleset is applied last when computing the RCPT TO address for #
  292. #  SMTP.                                                               #
  293. #                                                                      #
  294. ########################################################################
  295. S4
  296.  
  297. #
  298. #  Change LOCAL or LOCAL.D to the real name.
  299. #
  300. R$*<@LOCAL>$*        $:$1<@$w>$2
  301. R$*<@LOCAL.D>$*        $:$1<@$w$?D.$D$.>$2
  302. R$*<@$-.LOCAL>$*    $:$1<@$2$?D.$D$.>$3
  303.  
  304. R$*<LOCAL>$*        $:$1<$w>$2
  305. R$*<LOCAL.D>$*        $:$1<$w$?D.$D$.>$2
  306. R$*<$-.LOCAL>$*        $:$1<$2$?D.$D$.>$3
  307.  
  308. #
  309. #  Remove focus brackets.
  310. #
  311. R$*<$+>$*        $1$2$3
  312.  
  313.  
  314. ########################################################################
  315. #                                                                      #
  316. #  S3:  Address Canonicalization  (Internal rewriting form)            #
  317. #                                                                      #
  318. #  This ruleset turns an address in external format into a format      #
  319. #  which simplifies internal rewriting.  The inverse ruleset is S4.    #
  320. #  This ruleset is applied first to any external address before other  #
  321. #  rewriting is done.                                                  #
  322. #                                                                      #
  323. #  This concept of canonicalization is to be distinguished from usage  #
  324. #  of the nameserver in the $[/$] construct inside the RHS of rewrite  #
  325. #  rules.  This is also sometimes called "canonicalization", but has   #
  326. #  to do not with the syntax of the address but with obtaining the     #
  327. #  correct domain name for the address.                                #
  328. #                                                                      #
  329. #  No stripping of local domains is done for route addresses:          #
  330. #  Rulesets which require this must do it themselves by iteratively    #
  331. #  stripping LOCAL or LOCAL.D and recalling this ruleset to            #
  332. #  canonicalize the next host.item.                                    #
  333. #                                                                      #
  334. #  The term "localization" refers to determining whether the next host #
  335. #  item is really a reference to the current host.  Localization       #
  336. #  assumes that local UUCP host names are in class w.  This is not     #
  337. #  strictly a necessary restriction, but it simplifies the network     #
  338. #  concept and also makes for simpler rewrite rules.  This ruleset     #
  339. #  replaces explicit instances of local host with the internally       #
  340. #  recognized tag "LOCAL" or "LOCAL.D".                                #
  341. #                                                                      #
  342. #  Addresses which do not specify a host name for routing or domain    #
  343. #  will NOT have any reference to the local host appended in any way.  #
  344. #                                                                      #
  345. ########################################################################
  346. S3
  347.  
  348. #
  349. #  Basic textual canonicalization -- note RFC733 heuristic here.
  350. #  This strips off everything but the innermost list between <>'s.
  351. #  Some addresses are of the format: Full Name <address>
  352. #
  353. R$*<$*<$*<$+>$*>$*>$*    $4        3-level <> nesting
  354. R$*<$*<$+>$*>$*        $3        2-level <> nesting
  355. R$*<$+>$*        $2        basic RFC821/822 parsing
  356.  
  357. #
  358. #  Turn an "at" token into "@".
  359. #
  360. #  The I macro specifies space or some equivalent char defined by the OI
  361. #  config option above.
  362. #
  363. R$+ at $+        $:$1@$2        "at" -> "@" for RFC 822
  364.  
  365. #  Change a%b to a@b. This implies that we support a%b%c... as a route
  366. #  based address from right to left.
  367. #  This form of addressing should go away as full domains are supported.
  368. #
  369. R$+%$-            $1@$2
  370.  
  371. #  ====> NOTE <====
  372. #  This configuration file always evaluates mix mode addresses from
  373. #  left to right. No precedence between @ and ! is assumed. The
  374. #  address a!b@c will resolve to the uucp mailer for the remote host
  375. #  'a'. This permits the resolution of very complex route based
  376. #  addresses such as; @a:@b:c!d!user, a!@b:c!user, a!@b.uucp:user@c.
  377. #  Return addresses on mail to/from AIX level 4 machines are also
  378. #  correct. If you wish the address a!b@c to resolve to the TCP
  379. #  mailer for the remote host 'c' then uncomment the following rewrite
  380. #  rule. This approach is compatible with older versions of sendmail.
  381.  
  382. #  Change a!b@c to @c:a!b
  383. #R$-!$-@$+        @$3:$1!$2
  384.  
  385. #
  386. #  Change commas to colons for route addresses.
  387. #
  388. R$+,$+            $1:$2
  389.  
  390. #
  391. #  Pick out route addresses.  Focus and call localizer.
  392. #
  393. R@$+:$+            $@$>9<@$1>:$2        handle <route-addr>
  394. R$-!$+            $@$>8<$1>!$2        UUCP route
  395.  
  396. #  Detect domain!user. Internally convert to user@domain (RFC976).
  397. #  Rule set 8 will detect local addresses and strip any trailing
  398. #  periods.
  399. R$-.$*!$+                $@$>8<$1.$2>!$3
  400.  
  401. #
  402. #  Detect local domain for nonroute addresses.  Focus and localize.
  403. R$+@$+            $:$1<@$2>
  404. R$+<@$=w.$D>        $@$1<@LOCAL.D>
  405. R$+<@$=w>        $@$1<@LOCAL>
  406. R$+<@$=w.UUCP>        $@$1<@LOCAL>
  407.  
  408. #
  409. #  Anything else is left as-is!  This includes simple names.
  410. #  They will NOT have an appended domain.
  411. #  This is so the $f macro definition will be the sender address
  412. #  as known locally.
  413. #
  414.  
  415.  
  416. ########################################################################
  417. #                                                                      #
  418. #  S9:    Localize ARPA type route path.                                 #
  419. #                                                                      #
  420. #  This is used only by S3.                                            #
  421. #                                                                      #
  422. ########################################################################
  423. S9
  424.  
  425. R<@$=w.$D>:$*            $@<@LOCAL.D>:$2
  426. R<@$=w>:$*            $@<@LOCAL>:$2
  427. R<@$=w.UUCP>:$*            $@<@LOCAL>:$2
  428.  
  429.  
  430. ########################################################################
  431. #                                                                      #
  432. # S8:  Localize UUCP route path.  This is used only by S3.             #
  433. #                                                                      #
  434. ########################################################################
  435. #S8
  436.  
  437. #R<$=w.$D>!$+            $@<LOCAL.D>!$2
  438. #R<$=w>!$+            $@<LOCAL>!$2
  439. # We have a non-local domain. Change to user@domain for resolution.
  440. #R<$-.$+>!$+            $@<@$1.$2>:$3
  441. #R<$+.>!$+            $@<@$1>:$2
  442.  
  443. ########################################################################
  444. #                                                                      #
  445. #                              MAILERS                                 #
  446. #                                                                      #
  447. ########################################################################
  448.  
  449.  
  450. ########################################################################
  451. #                                                                      #
  452. #               Local and Program Mailer specification                 #
  453. #                                                                      #
  454. ########################################################################
  455.  
  456. #Mlocal, P=c:\etc\mail.exe, F=lsDFMP,  S=10, R=20, A=c:\etc\mail $u
  457. Mlocal, P=c:\smtp\SMTP2ADEPT.exe, F=lsDFMP,  S=10, R=20, A=c:\tcpip\etc\mail $u
  458. Mprog,  P=/bin/sh,         F=lsDFM,   S=10, R=20, A=sh -c $u
  459.  
  460.  
  461. ########################################################################
  462. #                                                                      #
  463. #  S10:  Local/Prog Mailers Sender rules                               #
  464. #                                                                      #
  465. ########################################################################
  466. S10
  467.  
  468. ########################################################################
  469. #                                                                      #
  470. #  S20:  Local/Prog Mailers Recipient rules                            #
  471. #                                                                      #
  472. ########################################################################
  473. S20
  474.  
  475.  
  476. ########################################################################
  477. #                                                                      #
  478. #                     UUCP Mailer Specification                        #
  479. #                                                                      #
  480. ########################################################################
  481.  
  482. #Muucp,    P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
  483. #    A=uux - -r -n -a$f -gC $h!rmail ($u)
  484.  
  485.  
  486. ########################################################################
  487. #                                                                      #
  488. #                      TCP Mailer Specification                        #
  489. #                                                                      #
  490. ########################################################################
  491.  
  492. Mtcp,     P=[IPC], F=mDFMueXL,  S=14, R=24, A=IPC $h
  493.  
  494.  
  495. ########################################################################
  496. #                                                                      #
  497. #  S14:  TCP Mailer Sender Rules                                       #
  498. #                                                                      #
  499. #  This ruleset is applied in the following circumstances:             #
  500. #                                                                      #
  501. #  1)  To process sender type headers.  These have header names:       #
  502. #                                                                      #
  503. #       "resent-sender"                                                #
  504. #       "resent-from"                                                  #
  505. #       "resent-reply-to"                                              #
  506. #       "sender"                                                       #
  507. #       "from"                                                         #
  508. #       "reply-to"                                                     #
  509. #       "return-receipt-to"                                            #
  510. #       "errors-to"                                                    #
  511. #                                                                      #
  512. #  2)  To define the $g macro from the $f macro.                       #
  513. #                                                                      #
  514. #  In either case, it is applied after ruleset 1, and is followed by   #
  515. #  ruleset 4.                                                          #
  516. #                                                                      #
  517. #  Watch out if one of those headers is newly created and includes the #
  518. #  expanded $g macro!  This ruleset will have been used to create $g,  #
  519. #  and will then be applied to the result of the expansion of $g.      #
  520. #  This ruleset must handle this!                                      #
  521. #                                                                      #
  522. #  The $g macro is used in many places.                                #
  523. #                                                                      #
  524. ########################################################################
  525. S14
  526.  
  527. #
  528. #  We have just canonicalized a From: address or the $f macro.  Remove
  529. #  any instances of local host from route addresses.  This also works
  530. #  to take care of the instance of a newly expanded $g in a new
  531. #  From: line.
  532. #
  533. R<$*LOCAL$*>$-$+    $>3$4
  534.  
  535. #
  536. #  Prepend our domain to route based paths that come through.
  537. #
  538. R<$+>$+            $@<@LOCAL.D>:$1$2
  539.  
  540. #
  541. #  Fully qualify our domain.
  542. #
  543. R$+<@LOCAL>        $@$1<@LOCAL.D>
  544.  
  545. #
  546. #  Fully qualify other hosts in our local domain.
  547. #
  548. R$+<@$->        $@$1<@$2.LOCAL>
  549.  
  550. #
  551. #  Leave all other typical domain addresses alone.
  552. #
  553. R$+<$+>            $@$1<$2>
  554.  
  555. #
  556. #  Append full local domain where none exists at all.
  557. #
  558. R$+            $@$1<@LOCAL.D>
  559.  
  560.  
  561. ########################################################################
  562. #                                                                      #
  563. #  S24:  TCP Mailer Recipient rules                                    #
  564. #                                                                      #
  565. #  This ruleset is applied in the following cases:                     #
  566. #                                                                      #
  567. #  1)  To process recipient type headers being sent out through this   #
  568. #      mailer.  These headers are the ones with header names:          #
  569. #                                                                      #
  570. #       "to"                                                           #
  571. #       "resent-to"                                                    #
  572. #       "cc"                                                           #
  573. #       "resent-cc"                                                    #
  574. #       "bcc"                                                          #
  575. #       "resent-bcc"                                                   #
  576. #                                                                      #
  577. #     but NOT:                                                         #
  578. #                                                                      #
  579. #       "Apparently-to"                                                #
  580. #                                                                      #
  581. #  2)  To process the user part of the 3-tuple from S0 which resolves  #
  582. #      to this mailer.  This is the complete "to" address for ordinary #
  583. #      tcp usage, or is the original UUCP path if we are relaying      #
  584. #      using DU.                                                       #
  585. #                                                                      #
  586. #  3)  To process the "to" address to form the SMTP RCPT TO address.   #
  587. #                                                                      #
  588. #  In all cases, this ruleset is applied after ruleset 2, and is       #
  589. #  followed by ruleset 4.                                              #
  590. #                                                                      #
  591. #  Remember that this ruleset applies to all "to" type headers in the  #
  592. #  mail transmitted via this mailer.  This does not include            #
  593. #  "Apparently-to:" headers.  Not all "To:" headers point to the       #
  594. #  current mail target!  For instance, if the mail originated on this  #
  595. #  host and some targets were local, there may be local "To:" headers  #
  596. #  that must be processed by this ruleset!  The idea here is to make   #
  597. #  sure that the headers will be properly understood in the context of #
  598. #  the next host to which the mail will go.                            #
  599. #                                                                      #
  600. ########################################################################
  601. S24
  602.  
  603. #
  604. #  Leave route based addresses alone.  They are already completely intelligible
  605. #  in any context.
  606. #
  607. R<$+>$+            $@<$1>$2
  608.  
  609. #
  610. #  Fully qualify our host name with full domain.
  611. #
  612. R$+<@LOCAL>        $@$1<@LOCAL.D>
  613.  
  614. #
  615. #  Fully qualify nonlocal host names in our local domain.
  616. #
  617. R$+<@$->        $@$1<@$2.LOCAL>
  618.  
  619. #
  620. #  Leave all other typical domain addresses alone.
  621. #
  622. R$+<$+>            $@$1<$2>
  623.  
  624. #
  625. #  Append full local domain where none exists at all.  This handles the
  626. #  case of local targets whose (missing) host would cause misunderstanding
  627. #  in the next host.
  628. #
  629. R$+            $@$1<@LOCAL.D>
  630.  
  631.  
  632. ########################################################################
  633. #                                                                      #
  634. #      Rule Zero                                                       #
  635. #                                                                      #
  636. #  Resolve sender or recipient address to mailer/host/user 3-tuple.    #
  637. #  This may require iteration in use of S3 to strip leading route      #
  638. #  items which pertain to the current host.                            #
  639. #                                                                      #
  640. #  Sendmail will pass the user portion of the 3-tuple through ruleset  #
  641. #  2 + the mailer specific recipient ruleset + ruleset 4.              #
  642. #                                                                      #
  643. ########################################################################
  644. S0
  645.  
  646. #
  647. #  Handle route addresses that begin with LOCAL or LOCAL.D
  648. #
  649. R<$*LOCAL$*>$-$+    $>3$4
  650.  
  651. #  Change a%b<$*> to <$*>:a@b.
  652. #  This form of addressing should go away as full domains are supported.
  653. #
  654. R$+%$-<$*>        <$3>:$1@$2
  655. #
  656. #  Handle explicit local delivery.
  657. #
  658. #  The entire prefix is treated as local user.
  659. R$+<@LOCAL$*>        $#local$:$1
  660.  
  661. #
  662. #  Resolve UUCP to local uucp mailer or remote one via tcp.
  663. #  For tcp relay, user is full uucp route.  For uucp mailer, user is
  664. #  the uucp route as seen from the next host.
  665. #  UUCP host names are not passed through the nameserver canonicalizer.
  666. #
  667. #R$+<@$-.UUCP>         $?U$#tcp$@$U$:$1<@$2.UUCP>$|$#uucp$@$2$:<$1>$.
  668. #R<@$-.UUCP>:$+         $?U$#tcp$@$U$:<@$1.UUCP>:$2$|$#uucp$@$1$:<$2>$.
  669. #R<$->!$+         $?U$#tcp$@$U$:<$1>!$2$|$#uucp$@$1$:<$2>$.
  670.  
  671. #
  672. #  Canonicalize anything else which has an @focus.  This excludes simple
  673. #  names, which are local.
  674. #
  675. R$*<@$+>$*        $:$1<@$[$2$]>$3
  676.  
  677. #
  678. #  Send domain address to tcp.  This includes domain literals [IP quads].
  679. #  User is full focused path.
  680. #
  681. R$*<@$+>$*        $#tcp$@$2$:$1<@$2>$3
  682.  
  683. #
  684. #  Remaining names must be local.
  685. #  User is whatever is left.
  686. #
  687. R$+            $#local$:$1
  688.