home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / sendmail_aix_conf.cf < prev    next >
Text File  |  1991-12-26  |  47KB  |  1,263 lines

  1. #  aix_sccsid[] = "com/cmd/send,3.1.1,9041311a AIX 10/5/90 17:57:00"
  2. # COMPONENT_NAME: CMDSEND sendmail.cf
  3. # FUNCTIONS: 
  4. #
  5. # ORIGINS: 10  26  27 
  6. #
  7. # (C) COPYRIGHT International Business Machines Corp. 1985, 1989
  8. # All Rights Reserved
  9. # Licensed Materials - Property of IBM
  10. #
  11. # US Government Users Restricted Rights - Use, duplication or
  12. # disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  13. #
  14. ############################################################
  15. #
  16. #  Sendmail
  17. #  Copyright (c) 1983  Eric P. Allman
  18. #  Berkeley, California
  19. #
  20. #  Copyright (c) 1983 Regents of the University of California.
  21. #  All rights reserved.  The Berkeley software License Agreement
  22. #  specifies the terms and conditions for redistribution.
  23. #
  24. ###########################################################
  25. #
  26. #  Sendmail.cf for full domains.
  27. #
  28. ############################################################
  29.  
  30. #################################################################
  31. #
  32. # If you want to rebuild the configuration file while the sendmail
  33. # daemon is running, you may issue a command "kill -1" to the 
  34. # current process id (pid) of the sendmail daemon. The current
  35. # pid is saved in /etc/sendmail.pid.
  36. #
  37. #################################################################
  38.  
  39. #################################################################
  40. #                                #
  41. # WARNING:  DON'T REMOVE LINES OF THE FORM #XY (like #OL below) #
  42. # OR THE EDCONFIG EDITOR WON'T WORK FOR THOSE LINES!!!          #
  43. #                                #
  44. #################################################################
  45.  
  46. ###########################################
  47. #   Important Program Control Functions   #
  48. ###########################################
  49.  
  50. # log level - turn it on early.
  51. #OL
  52. OL9
  53.  
  54. # queue directory - specify directory containing log file
  55. #OQ
  56. OQ/usr/spool/mqueue
  57.  
  58.  
  59.  
  60. ###########################################
  61. #
  62. # Host name definition 
  63. #
  64. # Define macro for your hostname for all return addresses.
  65. # Define class to recognize all aliases of your host name.
  66. # The hostname should not include your local domain (defined
  67. # below). For example, if your fully qualified hostname
  68. # is 'airmail.aus.ibm.com' this line would be set to 'Dwairmail'.
  69. #
  70. # By default, hostname is set to the value returned by the 'hostname'
  71. # command less any domain extensions. For example, if 'hostname' returns
  72. # 'airmail.aus.ibm.com', the default hostname would be 'airmail', and the
  73. # default domain name would be 'aus.ibm.com'. Define these macros if you
  74. # wish to override these defaults.
  75. #
  76. # The default aliases are those defined in /etc/hosts for the local
  77. # hostname.
  78. #
  79. #DwYourHostName
  80. #CwYourHostName YourHostAliases
  81. Dwpower
  82. ###########################################
  83.  
  84. ###########################################
  85. #
  86. # Local domain name. (DEFINE THIS IF DOMAINS ARE USED)
  87. # **WARNING**
  88. # When domain names are used, SMTP transactions utilize the
  89. # full domain (official) name of the host. All host names with
  90. # no domains (abbreviated) are expanded with the local domain
  91. # by the mail service. This is consistent with Internet text standards.
  92. # All hosts sending or RECEIVING mail must recognize their official
  93. # host names. When using domains enter the official host name in
  94. # /etc/hosts and be certain that all network name servers recognize
  95. # official host names.
  96. #
  97. # Define the D macro to be the whole domain for the local host.
  98. # This configuration file supports four part domains. It can be expanded
  99. # to support n part domains. For example, if your fully qualified
  100. # hostname is 'airmail.aus.ibm.com` this line would be set to
  101. # 'DDaus.ibm.com'.
  102. #
  103. #DDgrandchild.child.parent.top
  104. DDci.vu.es
  105. ############################################
  106.  
  107. #############################################
  108. #
  109. # Domain parts. These MUST be defined if DD (above) is defined.
  110. # Input names for all parts of the domain (up to 4 parts).
  111. # ALWAYS START WITH E. E will be the lowest level of the domain name (i.
  112. # e. 'grandchild' in the four part example). For example, the domain
  113. # "aus.ibm.com" would be entered as follows:
  114. #   1) DDaus.ibm.com
  115. #   2) DEaus
  116. #   3) DFibm
  117. #   4) DGcom
  118. # DH would not be used when entering a three part domain.
  119. #
  120. #DElowestLevel
  121. #DFnextLevel
  122. #DGnextLevel
  123. #DHnextLevel
  124. DEci
  125. DFuv
  126. DGes
  127. ###########################################
  128.  
  129. #
  130. #  Automatically define classes that equal the macros.
  131. #
  132. CE$E
  133. CF$F
  134. CG$G
  135. CH$H
  136.  
  137. ###################################################################
  138. #
  139. # Host name for RSCS relay (YOU MAY OPTIONALLY DEFINE THIS)
  140. #
  141. # Optionally defined macro specifying name of the host for relaying
  142. # all RSCS traffic.  This would be a VM host on the network with
  143. # VM TCP/IP (Program number 5798-FAL) installed.
  144. #
  145. # Defining this macro eliminates the requirement for you to explicitly 
  146. # reference the relaying host in your RSCS route addresses.  For 
  147. # instance, if the VM host with VM TCP/IP is called "vme" and the
  148. # final RSCS destination is "vmz" then you would normally specify the
  149. # address as "@vme:uid@vmz" or "uid%vmz@vme". If you define the
  150. # macro "DVvme" then you only need specify "uid@vmz.RSCS". Note that
  151. # the full domain name of the host (vme.dom1.dom2.dom3) is not entered.
  152. # Sendmail does the appropriate canonicalization. Class "V" 
  153. # defines all domain synonyms for RSCS. This line MUST be uncommented
  154. # when defining this macro.
  155. #DVRelayHostName
  156. CVRSCS BITNET NETNORTH EARN EARNET VNET
  157. DVvm
  158. ###################################################################
  159.  
  160. ###################################################################
  161. #
  162. # Host name for UUCP relay (YOU MAY OPTIONALLY DEFINE THIS)
  163. #
  164. # Optionally defined macro specifying name of host to which you want 
  165. # to relay all UUCP traffic.  This would be a host on the network 
  166. # with modems.  You do not have to define this to use UUCP.
  167. #
  168. # Defining this macro eliminates the requirement for you to explicitly 
  169. # reference the relaying host in your UUCP route addresses.  For 
  170. # instance, if the host with modems is called "cat", you normally would 
  171. # have to specify a UUCP address as "cat!route_path".  If you define 
  172. # macro "DUcat", then you only need specify "route_path".
  173. #
  174. #DURelayHostName
  175. #
  176. DUvm
  177. ###################################################################
  178.  
  179. ###################################################################
  180. #
  181. # Host name for Ki Research kiNET's DECnet relay 
  182. # (YOU MAY OPTIONALLY DEFINE THIS)
  183. #
  184. # Optionally defined macro specifying name of host to which you want 
  185. # to relay all DECnet mail traffic via kiNET's dnamail facility.  
  186. # This would be a host on the network with tcp/ip, sendmail server and 
  187. # Ki Research kiNET's DECnet software installed.  
  188. #
  189. # If this macro is not defined, it implies that the Ki Research kiNET's
  190. # DECnet software runs locally or is not installed.
  191. #
  192. #DSRelayHostName
  193. #
  194. ###################################################################
  195.  
  196. ###################################################################
  197. #
  198. # Host name for X400 relay (YOU MAY OPTIONALLY DEFINE THIS)
  199. #
  200. # Optionally defined macro specifying name of host to which you want 
  201. # to relay all X400 mail traffic.  This would be a host on the network 
  202. # with tcp/ip, sendmail server and RFC987 gateway software installed.  
  203. #
  204. # If this macro is not defined, it implies that the RFC987 gateway 
  205. # software runs locally or is not installed.
  206. #
  207. #DXRelayHostName
  208. #
  209. ###################################################################
  210.  
  211. # my official hostname
  212. Dj$w$?D.$D$.
  213.  
  214. #####################################################
  215. #   Version Number   (YOU MAY CHANGE THIS AS NEEDED)#
  216. #####################################################
  217.  
  218. #DZ
  219. DZ4.03
  220.  
  221.  
  222. ######################
  223. #   Special macros   #
  224. ######################
  225.  
  226. # my name
  227. DnMAILER-DAEMON
  228. # UNIX header format
  229. DlFrom $g  $d
  230. # delimiter (operator) characters
  231. Do.:%@!^=/[]
  232. # format of a total name
  233. Dq$g$?x ($x)$.
  234. # SMTP login message
  235. De$j Sendmail $v/$Z ready at $b
  236.  
  237.  
  238. ###################
  239. ###   Options   ###
  240. ###################
  241.  
  242. # location of alias file
  243. #OA
  244. OA/usr/lib/aliases
  245.  
  246. # substitution for space (blank) characters
  247. #OB
  248. OB.
  249.  
  250. # (don't) connect to "expensive" mailers
  251. #Oc
  252.  
  253. # default delivery mode
  254. #Od
  255. Odbackground
  256.  
  257. # default GID
  258. #Og
  259. Og1
  260.  
  261. # If the I option is set, sendmail treats "connection refused" and "timed out"
  262. # errors from the name server as non-fatal, leaving the message in the queue
  263. # for future delivery attempts.
  264. OI
  265.  
  266. # location of sendmail.nl file
  267. #Ol
  268. #Ol/usr/lib/sendmail.nl
  269.  
  270. # treat incoming 8-bit characters as ISO 8859/1 characters
  271. #Ow
  272.  
  273. # no NL encoding of outgoing mail (just like version prior to AIX3.0).
  274. Ok
  275.  
  276. # Normally, the LHS/RHS separator for rewrite rules is TAB.  When the rewrite
  277. # rules are loaded into sendmail, the LHS and RHS are separated by a string
  278. # of one or more tabs.  Spaces are just like any other character data, and are
  279. # not recognized as separating the LHS and RHS of a rewrite rule.
  280. #
  281. # However, if the Ined editor is used to edit the config file rewrite rules,
  282. # tabs will be replaced with spaces on any line changed.   This makes it
  283. # impossible for the original rule loading algorithm to properly separate
  284. # the LHS and RHS of the affected rules.
  285. #
  286. # To sidestep this problem, the "OJx" option is provided.  If this option is
  287. # enabled, the space character will always be recognized as a separator between
  288. # the LHS and RHS of rewrite rules.  The rules which contain embedded spaces
  289. # as data, must have those spaces replaced by an alternative character which
  290. # does not conflict with any other usage.  Then, when the rules are loaded,
  291. # and after the LHS and RHS are separated, that alternative character is re-
  292. # placed with space everywhere it occurs.
  293. #
  294. # In the "OJx" option, "x" is the alternative character.  "_" will be used
  295. # as the default if no character is specified.  A character should be used
  296. # which is not used in any other way in rewrite rules, since all instances
  297. # of it will be replaced by spaces.
  298. #
  299. # The following macro specifies the replacement space character for use in
  300. # rewrite rule definitions.  It must be defined as space if OJ is not defined.
  301. # Else, It must be defined as the alternative space char.
  302. #DJ" "
  303. DJ"_"
  304. # The following configuration option enables space to be used as LHS/RHS
  305. # delimiter in rewrite rules.  The character following J is the alternative
  306. # space character.
  307. #OJ
  308. OJ_
  309.  
  310. # Define whether and how to use a name server for resolving recipients.
  311. #
  312. # Possible values are:
  313. #    MR    use Mail Rename records to resolve recipient users
  314. #    MB    use Mail Box records to resolve recipient users
  315. #    MG    use Mail Group records to resolve recipient users
  316. #    MX    use Mail Exchanger records to resolve recipient hosts
  317. #    ANY    use the T_ANY query when getting CNAME records for the
  318. #        recipient host; this causes all associated A and MX
  319. #        records to be cached locally
  320. #    ALL    use all of the above
  321. #
  322. # You may use any combination of these, although it is recommended that
  323. # you specify MB if MR is specified.  For example, "OK MG MX" would enable
  324. # the use of Mail Group and Mail Exchanger resource records.
  325. #
  326. # The default is not to use a name server for resolving recipients.
  327. #
  328. #OK ALL
  329.  
  330. # default messages to old style
  331. #Oo
  332. Oo
  333.  
  334. # Slope of q function
  335. #Oq
  336.  
  337. # read timeout -- violates protocols
  338. #Or
  339. Or5m
  340.  
  341. # status file
  342. #OS
  343. OS/usr/lib/sendmail.st
  344.  
  345. # queue up everything before starting transmission
  346. #Os
  347. Os
  348.  
  349. # default timeout interval
  350. #OT
  351. OT3d
  352.  
  353. # default UID
  354. #Ou
  355. Ou1
  356.  
  357. # load average at which we just queue messages
  358. #Ox
  359.  
  360. # load average at which we refuse connections
  361. #OX
  362.  
  363. # work recipient factor
  364. #Oy
  365.  
  366. # work msg class factor
  367. #Oz
  368.  
  369. # work time factor
  370. #OZ
  371.  
  372.  
  373. ###########################
  374. #   Message precedences   #
  375. ###########################
  376.  
  377. Pfirst-class=0
  378. Pspecial-delivery=100
  379. Pbulk=-60
  380. Pjunk=-100
  381.  
  382.  
  383. #####################
  384. #   Trusted users   #
  385. #####################
  386.  
  387. Troot
  388. Tdaemon
  389. Tuucp
  390. Tkinet
  391.  
  392.  
  393. #########################
  394. #   Format of headers   #
  395. #########################
  396.  
  397. H?P?Return-Path: <$g>
  398. HReceived: $?sfrom $s $.by $j ($v/$Z)
  399.           id $i; $b
  400. H?D?Resent-Date: $a
  401. H?D?Date: $a
  402. H?F?Resent-From: $q
  403. H?F?From: $q
  404. H?x?Full-Name: $x
  405. HSubject:
  406. # HPosted-Date: $a
  407. # H?l?Received-Date: $b
  408. H?M?Resent-Message-Id: <$t.$i@$j>
  409. H?M?Message-Id: <$t.$i@$j>
  410.  
  411.  
  412. ################################################################################
  413. #                                                                              #
  414. #                           REWRITING RULES                                    #
  415. #                                                                              #
  416. ################################################################################
  417.  
  418.  
  419. ################################################################################
  420. #                                                                              #
  421. #  The Complete Specification of Canonical Syntax is:                          #
  422. #                                                                              #
  423. #   <ahost>       ::= /* ARPA type host name */                                #
  424. #   <uhost>       ::= /* UUCP type host name */                                #
  425. #   <dhost>       ::= /* DECnet type host name */                              #
  426. #   <xhost>       ::= /* X400 type host name */                                #
  427. #   <user>        ::= /* target user name */                                   #
  428. #                                                                              #
  429. #   <route_node>  ::= @<ahost>: | <uhost>! | <dhost> :: | /C=...<xhost>        #
  430. #   <route_path>  ::= <NULL> | <route_node> | <route_path><route_node>         #
  431. #   <target>      ::= <user> | <user>@<ahost> | <uhost>!<user> |               #
  432. #                              <dhost>::<user> | /C=...<xhost>.../DD=<user>    #
  433. #   <address>     ::= <route_path><target>                                     #
  434. #                                                                              #
  435. #  This is what we handle, but actually we only look at the minimum required   #
  436. #  to pass the mail on.  Intermediaries with other syntax/semantics may be     #
  437. #  used, provided the addressing is compatible with them when the mail arrives #
  438. #  there.                                                                      #
  439. #                                                                              #
  440. ################################################################################
  441.  
  442.  
  443. ################################################################################
  444. #                                                                              #
  445. #                     THE DYNAMIC MACROS $f AND $g                             #
  446. #                                                                              #
  447. #  Macro $f is defined by the sender address as known the current host, via    #
  448. #  the ruleset sequence:  3, 1, 4.                                             #
  449. #                                                                              #
  450. #  Macro $g is defined at delivery time for each separate mailer via the       #
  451. #  ruleset sequence:  3, 1, mailer-S, 4.                                       #
  452. #                                                                              #
  453. #  The SMTP "MAIL FROM" address will be $g.                                    #
  454. #                                                                              #
  455. #  $g is included in many headers and will be expanded if the header is        #
  456. #  newly created by sendmail.                                                  #
  457. #                                                                              #
  458. ################################################################################
  459.  
  460.  
  461. ################################################################################
  462. #                                                                              #
  463. #                           THE SMTP INTERFACE                                 #
  464. #                                                                              #
  465. #  The SMTP "MAIL FROM" address will be $g.                                    #
  466. #                                                                              #
  467. #  The SMTP "RCPT TO" addresses will be computed from the recipient addresses  #
  468. #  in sendmail by applying the same ruleset sequence as for "to" headers:      #
  469. #  namely, rulesets 3, 2, mailer-R, 4.                                         #
  470. #                                                                              #
  471. ################################################################################
  472.  
  473.  
  474. ################################################################################
  475. #                                                                              #
  476. #  S1:  Sender Field Pre-rewriting                                             #
  477. #                                                                              #
  478. #  This ruleset is used when defining the $f macro.  In this case it is        #
  479. #  applied after S3 and before S4.                                             #
  480. #                                                                              #
  481. #  This ruleset is applied to all sender type headers after S3 and before      #
  482. #  the mailer specific sender (S) rewrite rules.                               #
  483. #  This ruleset is also applied to $f to create $g.                            #
  484. #                                                                              #
  485. ################################################################################
  486. S1
  487.  
  488.  
  489. ################################################################################
  490. #                                                                              #
  491. #  S2:  Recipient Field Pre-rewriting                                          #
  492. #                                                                              #
  493. #  This ruleset is applied to the user part of the 3-tuple output from S0.     #
  494. #  It is followed by application of the mailer specific recipient (R) rewrite  #
  495. #  rules.                                                                      #
  496. #                                                                              #
  497. #  This ruleset is applied to all recipient type headers after S3 and          #
  498. #  before the mailer specific recipient (R) rewrite rules.                     #
  499. #  This ruleset is likewise used to reform the "to" address for SMTP.          #
  500. #                                                                              #
  501. ################################################################################
  502. S2
  503.  
  504.  
  505. ################################################################################
  506. #                                                                              #
  507. #  S4:  Final Output Post-rewriting   (Return to standard form)                #
  508. #                                                                              #
  509. #  This ruleset is applied to the user part of the 3-tuple produced from       #
  510. #  ruleset 0.  It is applied after the mailer specific recipient (R) rules.    #
  511. #                                                                              #
  512. #  This ruleset is applied after S1 when defining the $f macro.                #
  513. #  This ruleset is applied last when creating the $g macro from $f.            #
  514. #                                                                              #
  515. #  This ruleset is applied to all headers after the mailer specific            #
  516. #  rewrite rules (whether recipient or sender) have been applied.              #
  517. #  This ruleset is applied last when computing the RCPT TO address for SMTP.   #
  518. #                                                                              #
  519. ################################################################################
  520. S4
  521.  
  522. #
  523. #  Change LOCAL or LOCAL.D to the real name.
  524. #
  525. R$*<@LOCAL>$*        $:$1<@$w>$2
  526. R$*<@LOCAL.D>$*        $:$1<@$w$?D.$D$.>$2
  527. R$*<@$-.LOCAL>$*    $:$1<@$2$?D.$D$.>$3
  528.  
  529. R$*<LOCAL>$*        $:$1<$w>$2
  530. R$*<LOCAL.D>$*        $:$1<$w$?D.$D$.>$2
  531. R$*<$-.LOCAL>$*        $:$1<$2$?D.$D$.>$3
  532.  
  533. #
  534. #  Remove focus brackets.
  535. #
  536. R$*<$+>$*        $1$2$3
  537. R$+:/C=$+        $:/C=$2
  538. R$+!/C=$+        $:/C=$2
  539.  
  540.  
  541.  
  542. ################################################################################
  543. #                                                                              #
  544. #  S3:  Address Canonicalization  (Internal rewriting form)                    #
  545. #                                                                              #
  546. #  This ruleset turns an address in external format into a format which        #
  547. #  simplifies internal rewriting.  The inverse ruleset is S4.                  #
  548. #  This ruleset is applied first to any external address before other re-      #
  549. #  writing is done.                                                            #
  550. #                                                                              #
  551. #  This concept of canonicalization is to be distinguished from usage of the   #
  552. #  nameserver in the $[/$] construct inside the RHS of rewrite rules.  This is #
  553. #  also sometimes called "canonicalization", but has to do not with the syntax #
  554. #  of the address but with obtaining the correct domain name for the address.  #
  555. #                                                                              #
  556. #  No stripping of local domains is done for route addresses:  Rulesets which  #
  557. #  require this must do it themselves by iteratively stripping LOCAL or        #
  558. #  LOCAL.D and recalling this ruleset to canonicalize the next host.item.      #
  559. #                                                                              #
  560. #  The term "localization" refers to determining whether the next host item    #
  561. #  is really a reference to the current host.  Localization assumes that local #
  562. #  UUCP host names are in class w.  This is not strictly a necessary restric-  #
  563. #  tion, but it simplifies the network concept and also makes for simpler      #
  564. #  rewrite rules.  This ruleset replaces explicit instances of local host      #
  565. #  with the internally recognized tag "LOCAL" or "LOCAL.D".                    #
  566. #                                                                              #
  567. #  Addresses which do not specify a host name for routing or domain will NOT   #
  568. #  have any reference to the local host appended in any way.                   #
  569. #                                                                              #
  570. ################################################################################
  571. S3
  572.  
  573. #
  574. #  Basic textual canonicalization -- note RFC733 heuristic here.
  575. #  This strips off everything but the innermost list between <>'s.
  576. #  Some addresses are of the format: Full Name <address>
  577. #
  578. R$*<$*<$*<$+>$*>$*>$*        $4        3-level <> nesting
  579. R$*<$*<$+>$*>$*            $3        2-level <> nesting
  580. R$*<$+>$*            $2        basic RFC821/822 parsing
  581.  
  582. #
  583. #  Turn an "at" token into "@".
  584. #
  585. #  The J macro specifies space or some equivalent char defined by the OJ
  586. #  config option above.
  587. #
  588.  
  589. R$+$Jat$J$+        $:$1@$2        "at" -> "@" for RFC 822
  590.  
  591. #  Change a%b to a@b. This implies that we support a%b%c... as a route
  592. #  based address from right to left.
  593. #  This form of addressing should go away as full domains are supported.
  594. #
  595. R$+%$-            $1@$2
  596.  
  597. #  ====> NOTE <====
  598. #  This configuration file always evaluates mix mode addresses from
  599. #  left to right. No precedence between @,!,:: or /C= is assumed. The
  600. #  address a!b@c will resolve to the uucp mailer for the remote host
  601. #  'a'. This permits the resolution of very complex route based
  602. #  addresses such as; @a:@b:c!d!e::user, a!@b:c!user, a!@b.uucp:user@c.
  603. #  Return addresses on mail to/from uucp or DECnet machines are also correct.
  604. #  X400 addresses are detected by a leading "/C=" and are passed intact to
  605. #  the X400 mailer. The address /C=US/ADMD=ptt/PRMD=pco/DD=b!user resolves
  606. #  to the X400 mailer. The recipient sendmail sees b!user and routes to
  607. #  the uucp mailer. The address @a:/C=US/ADMD=ptt/PRMD=pco/DD=user
  608. #  resolves to the tcp mailer for the remote host 'a'. This is how the
  609. #  X400 relay is implemented.
  610.  
  611. #  If you wish the address a!b@c to resolve to the TCP
  612. #  mailer for the remote host 'c' then uncomment the following rewrite
  613. #  rule. This approach is compatible with older versions of sendmail.
  614.  
  615. #  Change a!b@c to @c:a!b
  616. #R$-!$-@$+        @$3:$1!$2
  617.  
  618. #
  619. #  Change commas to colons for route addresses.
  620. #
  621. R$+,$+            $1:$2
  622.  
  623. #
  624. #  Pick out route addresses.  Focus and call localizer.
  625. #
  626. R/C=$*            $?X$:@$X:/C=$1$|$:/C=$1
  627.  
  628. R@$+:$+            $@$>9<@$1>:$2            handle <route-addr>
  629. R$-!$+            $@$>8<$1>!$2            UUCP route
  630. R$-::$+            $@$>17<$1>::$2            DECnet addr
  631. # Detect X400. Focus and localize.
  632. R/C=$+@LOCAL        $@$>18$1
  633. R/C=$+            $@</C=$1>            X400 route addr
  634. #  Detect domain!user. Internally convert to user@domain (RFC976).
  635. #  Rule set 8 will detect local addresses and strip any trailing
  636. #  periods.
  637. R$-.$*!$+        $@$>8<$1.$2>!$3
  638. #  Detect domain::user.
  639. R$-.$*::$+        $@$>17<$1.$2>::$3        DECnet addr
  640. #
  641. #  Detect local domain for nonroute addresses.  Focus and localize.
  642. #
  643. R$+@$+            $:$1<@$2>
  644.  
  645. R$+<@$=w$?E.$=E$.$?F.$=F$.$?G.$=G$.$?H.$=H$.>        $@$1<@LOCAL.D>
  646. R$+<@$=w>        $@$1<@LOCAL>
  647. R$+<@$=w.UUCP>        $@$1<@LOCAL>
  648.  
  649. #
  650. #  Anything else is left as-is!  This includes simple names.
  651. #  They will NOT have an appended domain.
  652. #  This is so the $f macro definition will be the sender address
  653. #  as known locally.
  654. #
  655.  
  656.  
  657. ################################################################################
  658. #
  659. #  S9:  Localize ARPA type route path.  Depend on classes/macros E,F,G,H being
  660. #  defined in order as used.  They need not all be used.
  661. #
  662. #  This is used only by S3.
  663. #
  664. ################################################################################
  665. S9
  666.  
  667. R<@$=w.$=E.$=F.$=G.$=H>:$*        $@<@LOCAL.D>:$6
  668. R$?H$|<@$=w.$=E.$=F.$=G>:$*$.        $@<@LOCAL.D>:$5    if $H isn't defined
  669. R$?G$|<@$=w.$=E.$=F>:$*$.        $@<@LOCAL.D>:$4    if $G isn't defined
  670. R$?F$|<@$=w.$=E>:$*$.            $@<@LOCAL.D>:$3    if $F isn't defined
  671. R<@$=w>:$*                $@<@LOCAL>:$2
  672. R<@$=w.UUCP>:$*                $@<@LOCAL>:$2
  673.  
  674. ################################################################################
  675. #
  676. # S8:  Localize UUCP route path.  This is used only by S3.
  677. #
  678. ################################################################################
  679. S8
  680.  
  681. R<$=w.$=E.$=F.$=G.$=H>!$+        $@<LOCAL.D>!$6
  682. R$?H$|<$=w.$=E.$=F.$=G>!$+$.        $@<LOCAL.D>!$5    if $H isn't defined
  683. R$?G$|<$=w.$=E.$=F>!$+$.        $@<LOCAL.D>!$4    if $G isn't defined
  684. R$?F$|<$=w.$=E>!$+$.            $@<LOCAL.D>!$3    if $F isn't defined
  685. R<$=w>!$+                $@<LOCAL>!$2
  686. R<$+.>!$+                <$1>!$2
  687. # We have a non-local domain. If you want these changed to
  688. # user@domain for resolution uncomment the following lines.
  689. # R<$-.$+>!$+                $@<@$1.$2>:$3
  690. # R<$+.>!$+                $@<@$1>:$2
  691. R<$+.>!$+                <$1>!$2
  692.  
  693. ################################################################################
  694. #
  695. # S17:  Localize Ki Research's kiNET route path.  This is used only by S3.
  696. #
  697. ################################################################################
  698. S17
  699.  
  700. R<$=w.$=E.$=F.$=G.$=H>::$+        $@<LOCAL.D>::$6
  701. R$?H$|<$=w.$=E.$=F.$=G>::$+$.        $@<LOCAL.D>::$5    if $H isn't defined
  702. R$?G$|<$=w.$=E.$=F>::$+$.        $@<LOCAL.D>::$4    if $G isn't defined
  703. R$?F$|<$=w.$=E>::$+$.            $@<LOCAL.D>::$3    if $F isn't defined
  704. R<$=w>::$+                $@<LOCAL>::$2
  705. # We have a non-local domain. If you want these changed to
  706. # user@domain for resolution uncomment the following lines.
  707. # R<$-.$+>::$+                $@<@$1.$2>:$3
  708. # R<$+>::$+                <$1>::$2
  709.  
  710. ################################################################################
  711. #
  712. # S18:  Localize X400 path.  This is used only by S3.
  713. #
  714. ################################################################################
  715. S18
  716.  
  717. R$+                    $:/C=$1
  718. R$+/S=$-$*                $2<@LOCAL.D>
  719.  
  720. ################################################################################
  721. #                                                                              #
  722. #                                MAILERS                                       #
  723. #                                                                              #
  724. ################################################################################
  725.  
  726.  
  727. ################################################################################
  728. #                                                                              #
  729. #               Local and Program Mailer specification                         #
  730. #                                                                              #
  731. ################################################################################
  732.  
  733. #
  734. Mlocal, P=/bin/bellmail, F=ulsDFMmn, S=10, R=20, A=mail $u
  735. Mprog,  P=/bin/sh,       F=lsDFM,   S=10, R=20, A=sh -c $u
  736.  
  737.  
  738. ################################################################################
  739. #                                                                              
  740. #  S10:  Local/Prog Mailers Sender rules
  741. #                                                                              
  742. ################################################################################
  743. S10
  744.  
  745. ################################################################################
  746. #                                                                              
  747. #  S20:  Local/Prog Mailers Recipient rules
  748. #                                                                              
  749. ################################################################################
  750. S20
  751.  
  752.  
  753. ################################################################################
  754. #                                                                              #
  755. #                   UUCP Mailer Specification                                  #
  756. #                                                                              #
  757. ################################################################################
  758.  
  759. Muucp,  P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
  760.         A=uux - -r -n -a$f -gC $h!rmail ($u)
  761.  
  762. ################################################################################
  763. #                                                                              #
  764. #                        Ki Research kiNET                                     #
  765. #                                                                              #
  766. ################################################################################
  767.  
  768. Mkinet,  P=/usr/etc/dna/bin/dnamail, F=MNsf, S=16, R=26,
  769.         A=dnamail -f $f -n $h $u
  770.  
  771. ################################################################################
  772. #                                                                              
  773. #  S16:  kinet Sender rules
  774. #                                                                              
  775. ################################################################################
  776. S16
  777.  
  778. ################################################################################
  779. #                                                                              
  780. #  S26:  kinet Recipient rules
  781. #                                                                              
  782. ################################################################################
  783. S26
  784.  
  785.  
  786. ################################################################################
  787. #
  788. #  S13:  UUCP Mailer Sender Rules
  789. #
  790. #  This ruleset is applied in the following circumstances:
  791. #
  792. #  1)  To process sender type headers.  These have header names:
  793. #
  794. #    "resent-sender"
  795. #    "resent-from"
  796. #    "resent-reply-to"
  797. #    "sender"
  798. #    "from"
  799. #    "reply-to"
  800. #    "return-receipt-to"
  801. #    "errors-to"
  802. #
  803. #  2)  To define the $g macro from the $f macro.  The definition of $g must
  804. #      contain a bang character if UGLY UUCP From lines are to be gen'd.
  805. #
  806. #  In either case, it is applied after ruleset 1, and is followed by ruleset 4.
  807. #
  808. #  Watch out if one of those headers is newly created and includes the expanded
  809. #  $g macro!  This ruleset will have been used to create $g, and will then be
  810. #  applied to the result of the expansion of $g.  This ruleset must handle
  811. #  this!
  812. #
  813. #  The $g macro is used in many places.
  814. #
  815. ################################################################################
  816. S13
  817.  
  818. #
  819. #  We have just canonicalized a From: address or the $f macro.  Remove any
  820. #  instances of local host from route addresses.  This also works to take
  821. #  care of the instance of a newly expanded $g in a new From: line.
  822. #
  823. R<$*LOCAL$*>$-$+    $>3$4
  824.  
  825. #
  826. #  Remove any local domain.
  827. #
  828. R$+<@LOCAL$*>        $1
  829.  
  830. #
  831. #  Fully qualify any domain which remains.
  832. #
  833. R$+<@$->        $1<@$2.LOCAL>
  834.  
  835. #
  836. #  Prefix sender address with UUCP target host name.  This creates or adds
  837. #  to the route.  Note that definition of $g will cause prefix of $w.  Then
  838. #  processing a new From: line containing expanded $g will add another $w prefix
  839. #  unless it is stripped above.
  840. #
  841. R$+            $:$w!$1            add it back
  842.  
  843.  
  844. ################################################################################
  845. #
  846. #  S23:  UUCP Mailer Recipient rules
  847. #
  848. #  This ruleset is applied in the following cases:
  849. #
  850. #  1)  To process recipient type headers being sent out through this mailer.  
  851. #      These headers are the ones with header names:
  852. #
  853. #    "to"
  854. #    "resent-to"
  855. #    "cc"
  856. #    "resent-cc"
  857. #    "bcc"
  858. #    "resent-bcc"
  859. #
  860. #  2)  To process the user part of the 3-tuple from S0 which resolves 
  861. #      to this mailer.  What is processed will be the path remaining after
  862. #      the next host is stripped.  This is enclosed in focus braces to
  863. #      distinguish it from a recipient header line address.
  864. #
  865. #  In either case, this ruleset is applied after ruleset 2, and is followed by 
  866. #  ruleset 4.
  867. #
  868. #  Remember that this ruleset applies to all "to" type headers in the mail 
  869. #  transmitted via this mailer.  This does not inclue "Apparently-to:" headers.
  870. #  Not all "To:" headers point to the current mail target!  For instance, if 
  871. #  the mail originated on this host and some targets were local, there may be 
  872. #  local "To:" headers that must be processed by this ruleset!
  873. #  The idea here is to make sure that the headers will be properly understood
  874. #  in the context of the next host to which the mail will go.
  875. #
  876. #  A subtlety to be kept in mind is that when this is applied to the user part
  877. #  of the 3-tuple output from S0, that that user part is not preprocessed
  878. #  by S3 before treatment by this ruleset.  However, when a header is being
  879. #  processed, S3 will have been used.  The difference arises from the fact
  880. #  that S3 generates the LOCAL tag, whereas the user part of a UUCP address 
  881. #  may contain the current host name as the first target.  This would be typical
  882. #  of a test scenario to UUCP to a remote, and have that remote UUCP back
  883. #  to us.
  884. #
  885. ################################################################################
  886. S23
  887.  
  888. #
  889. #  Items that come in from S0 get left alone.
  890. #
  891. R<$+>            $@$1
  892.  
  893. #
  894. #  Leave route based addresses alone.  They are already completely intelligible
  895. #  in any context.
  896. #
  897. R<$+>$+            $@<$1>$2
  898.  
  899. #
  900. #  Fully qualify our hostname with full domain.
  901. #
  902. R$+<@LOCAL>        $@$1<@LOCAL.D>
  903.  
  904. #
  905. #  Add full domain to other host names in local domain.
  906. #
  907. R$+<@$->        $@$1<@$2.LOCAL>
  908.  
  909. #
  910. #  Leave all other typical domain addresses alone.
  911. #
  912. R$+<$+>            $@$1<$2>
  913.  
  914. #
  915. #  Append full local domain where none exists at all.  This handles the case
  916. #  of local targets whose (missing) host would cause misunderstanding in the
  917. #  next host.
  918. #
  919. R$+            $@$1<@LOCAL.D>
  920.  
  921.  
  922. ################################################################################
  923. #                                                                              #
  924. #                   TCP Mailer Specification                                   #
  925. #                                                                              #
  926. ################################################################################
  927.  
  928. Mtcp,    P=[IPC], F=mDFMueXLN,  S=14, R=24, A=IPC $h, E=\r\n
  929.  
  930.  
  931. ################################################################################
  932. #
  933. #  S14:  TCP Mailer Sender Rules
  934. #
  935. #  This ruleset is applied in the following circumstances:
  936. #
  937. #  1)  To process sender type headers.  These have header names:
  938. #
  939. #    "resent-sender"
  940. #    "resent-from"
  941. #    "resent-reply-to"
  942. #    "sender"
  943. #    "from"
  944. #    "reply-to"
  945. #    "return-receipt-to"
  946. #    "errors-to"
  947. #
  948. #  2)  To define the $g macro from the $f macro.
  949. #
  950. #  In either case, it is applied after ruleset 1, and is followed by ruleset 4.
  951. #
  952. #  Watch out if one of those headers is newly created and includes the expanded
  953. #  $g macro!  This ruleset will have been used to create $g, and will then be
  954. #  applied to the result of the expansion of $g.  This ruleset must handle
  955. #  this!
  956. #
  957. #  The $g macro is used in many places.
  958. #
  959. ################################################################################
  960. S14
  961. #
  962. #
  963. #  We have just canonicalized a From: address or the $f macro.  Remove any
  964. #  instances of local host from route addresses.  This also works to take
  965. #  care of the instance of a newly expanded $g in a new From: line.
  966. #
  967. R</C=$+>        $@<@LOCAL.D>:/C=$1
  968. R<$*LOCAL$*>$-$+    $>3$4
  969. #
  970. #  Prepend our domain to route based paths that come through.
  971. #
  972. R<$+>$+            $@<@LOCAL.D>:$1$2
  973.  
  974. #
  975. #  Fully qualify our domain.
  976. #
  977. R$+<@LOCAL>        $@$1<@LOCAL.D>
  978.  
  979. #
  980. #  Fully qualify other hosts in our local domain.
  981. #
  982. R$+<@$->        $@$1<@$2.LOCAL>
  983.  
  984. #
  985. #  Leave all other typical domain addresses alone.
  986. #
  987. R$+<$+>            $@$1<$2>
  988. #
  989. #  Append full local domain where none exists at all.
  990. #
  991. R$+            $@$1<@LOCAL.D>
  992.  
  993.  
  994. ################################################################################
  995. #
  996. #  S24:  TCP Mailer Recipient rules
  997. #
  998. #  This ruleset is applied in the following cases:
  999. #
  1000. #  1)  To process recipient type headers being sent out through this mailer.  
  1001. #      These headers are the ones with header names:
  1002. #
  1003. #    "to"
  1004. #    "resent-to"
  1005. #    "cc"
  1006. #    "resent-cc"
  1007. #    "bcc"
  1008. #    "resent-bcc"
  1009. #
  1010. #      but NOT:
  1011. #
  1012. #    "Apparently-to"
  1013. #
  1014. #  2)  To process the user part of the 3-tuple from S0 which resolves 
  1015. #      to this mailer.  This is the complete "to" address for ordinary
  1016. #      tcp usage, or is the original UUCP path if we are relaying using DU.
  1017. #
  1018. #  3)  To process the "to" address to form the SMTP RCPT TO address.
  1019. #
  1020. #  In all cases, this ruleset is applied after ruleset 2, and is followed by 
  1021. #  ruleset 4.
  1022. #
  1023. #  Remember that this ruleset applies to all "to" type headers in the mail 
  1024. #  transmitted via this mailer.  This does not inclue "Apparently-to:" headers.
  1025. #  Not all "To:" headers point to the current mail target!  For instance, if 
  1026. #  the mail originated on this host and some targets were local, there may be 
  1027. #  local "To:" headers that must be processed by this ruleset!
  1028. #  The idea here is to make sure that the headers will be properly understood
  1029. #  in the context of the next host to which the mail will go.
  1030. #
  1031. ################################################################################
  1032. S24
  1033.  
  1034. R</C=$+>        $@</C=$1>
  1035. #
  1036. #  Leave route based addresses alone.  They are already completely intelligible
  1037. #  in any context.
  1038. #
  1039. R<$+>$+            $@<$1>$2
  1040.  
  1041. #
  1042. #  Fully qualify our hostname with full domain.
  1043. #
  1044. R$+<@LOCAL>        $@$1<@LOCAL.D>
  1045.  
  1046. #
  1047. #  Fully qualify nonlocal host names in our local domain.
  1048. #
  1049. R$+<@$->        $@$1<@$2.LOCAL>
  1050.  
  1051. #
  1052. #  Leave all other typical domain addresses alone.
  1053. #
  1054. R$+<$+>            $@$1<$2>
  1055.  
  1056. #
  1057. #  Append full local domain where none exists at all.  This handles the case
  1058. #  of local targets whose (missing) host would cause misunderstanding in the
  1059. #  next host.
  1060. #
  1061. R$+            $@$1<@LOCAL.D>
  1062.  
  1063. #    The following two mailers and their Rulesets are newly defined.
  1064.  
  1065. ################################################################################
  1066. #                                                                              #
  1067. #    Forwarding to RFC987 gateway mailer specification
  1068. #                                                                              #
  1069. ################################################################################
  1070. Mto987gateway, P=[IPC], F=mDFMueX, S=15, R=25, A=IPC $h
  1071.  
  1072. ################################################################################
  1073. #                                                                              #
  1074. #    The RFC987 gateway mailer specification                       #
  1075. #                                                                              #
  1076. #  The RFC987 gateway simulation program and its path can be renamed to any    #
  1077. #  name and path by modifying the following Mailer definition below.           #
  1078. #                                           #
  1079. ################################################################################
  1080. M987gateway, P=/usr/lpp/osimf/etc/x400mailer, F=sBFMhulmSC, S=15, R=25,
  1081.      A=gateway -f /etc/x400gw.cfg $f $u
  1082.  
  1083.  
  1084. ################################################################################
  1085. #
  1086. #  S15:  RFC987 gateway Mailer Sender Rules
  1087. #
  1088. #  This ruleset is applied in the following circumstances:
  1089. #
  1090. #  1)  To process sender type headers.  These have header names:
  1091. #
  1092. #    "resent-sender"
  1093. #    "resent-from"
  1094. #    "resent-reply-to"
  1095. #    "sender"
  1096. #    "from"
  1097. #    "reply-to"
  1098. #    "return-receipt-to"
  1099. #    "errors-to"
  1100. #
  1101. #  2)  To define the $g macro from the $f macro.
  1102. #
  1103. #  In either case, it is applied after ruleset 1, and is followed by ruleset 4.
  1104. #
  1105. #  Watch out if one of those headers is newly created and includes the expanded
  1106. #  $g macro!  This ruleset will have been used to create $g, and will then be
  1107. #  applied to the result of the expansion of $g.  This ruleset must handle
  1108. #  this!
  1109. #
  1110. #  The $g macro is used in many places.
  1111. #
  1112. ################################################################################
  1113. S15
  1114.  
  1115. #
  1116. #  Fully qualify our hostname with full domain.
  1117. #
  1118. R$+<@LOCAL>        $@$1<@LOCAL.D>
  1119.  
  1120. #
  1121. #  Fully qualify nonlocal host names in our local domain.
  1122. #
  1123. R$+<@$->        $@$1<@$2.LOCAL>
  1124.  
  1125. #
  1126. #  Leave all other typical domain addresses alone.
  1127. #
  1128. R$+<$+>            $@$1<$2>
  1129.  
  1130. ################################################################################
  1131. #
  1132. #  S25:  RFC987 gateway Mailer Recipient rules
  1133. #
  1134. #
  1135. S25
  1136.  
  1137. R$+        $:<$1>
  1138.  
  1139. ################################################################################
  1140. #                                                                              #
  1141. #  S7:  Address stripping for comparison against sendmail.nl lists             #
  1142. #                                                                              #
  1143. #  This ruleset is applied to an address before checking to see if the         #
  1144. #  address exists in one of the lists in the sendmail.nl file.                 #
  1145. #  Its function is to strip off information which is irrelevant to             #
  1146. #  determining the final destination system.  This normally means all          #
  1147. #  information to the left of the last "@" for domain addresses and            #
  1148. #  the user name which is to the right of the last "!" in a bang               #
  1149. #  path address.  This ruleset should only be modified if there are            #
  1150. #  addressing schemes which must be accomodated.                               #
  1151. #                                                                              #
  1152. ################################################################################
  1153. S7
  1154.  
  1155. #Domain addresssing (up to 6 level)
  1156. R$+@$-.$-.$-.$-.$-.$-    @$2.$3.$4.$5.$6.$7
  1157. R$+@$-.$-.$-.$-.$-    @$2.$3.$4.$5.$6
  1158. R$+@$-.$-.$-.$-        @$2.$3.$4.$5
  1159. R$+@$-.$-.$-        @$2.$3.$4
  1160. R$+@$-.$-        @$2.$3
  1161. R$+@$-            @$2
  1162.  
  1163. #Bang addressing
  1164. R$+!$-            $1!
  1165.  
  1166.  
  1167.  
  1168. ################################################################################
  1169. #                                                                              #
  1170. #  S6:  Parsing addresses for nameserver queries                               #
  1171. #                                                                              #
  1172. #  This ruleset is applied to an address before querying the nameserver        #
  1173. #  for any MB, MR, or MG records that match the address.  It will only         #
  1174. #  parse an address of the form "user@domain"; it returns the result in        #
  1175. #  the form "user.domain", which is suitable for the nameserver query,         #
  1176. #  and it prepends a "$#" token to indicate success.                           #
  1177. #                                                                              #
  1178. ################################################################################
  1179. S6
  1180.  
  1181. #
  1182. # Pass only addresses consisting of exactly one token, an '@', and one
  1183. # or more tokens.
  1184. #
  1185. R$-@$+            $#$1.$2                
  1186.  
  1187. ################################################################################
  1188. #                                                                              #
  1189. #     Rule Zero                                                                #
  1190. #                                                                              #
  1191. #  Resolve sender or recipient address to mailer/host/user 3-tuple.            #
  1192. #  This may require iteration in use of S3 to strip leading route items        #
  1193. #  which pertain to the current host.                                          #
  1194. #                                                                              #
  1195. #  Sendmail will pass the user portion of the 3-tuple through ruleset 2 +      #
  1196. #  the mailer specific recipient ruleset + ruleset 4.                          #
  1197. #                                                                              #
  1198. ################################################################################
  1199. S0
  1200.  
  1201. #
  1202. #  Handle route addresses that begin with LOCAL or LOCAL.D
  1203. #
  1204. R<$*LOCAL$*>$-$+    $>3$4
  1205.  
  1206. #  Change a%b<$*> to <$*>:a@b.
  1207. #  This form of addressing should go away as full domains are supported.
  1208. #
  1209. R$+%$-<$*>        <$3>:$1@$2
  1210. #
  1211. #  Handle explicit local delivery.
  1212. #
  1213. #  The entire prefix is treated as local user.
  1214. R$+<@LOCAL$*>        $#local$:$1
  1215.  
  1216. #
  1217. #  Resolve X.400 addresses to the RFC987 gateway mailer.
  1218. #
  1219. R</C=$*>        $#987gateway$:/C=$1
  1220.  
  1221. #
  1222. #  Resolve UUCP to local uucp mailer or remote one via tcp.
  1223. #  For tcp relay, user is full uucp route.  For uucp mailer, user is
  1224. #  the uucp route as seen from the next host.
  1225. #  UUCP hostnames are not passed through the nameserver canonicalizer.
  1226. #
  1227. R$+<@$-.UUCP>        $?U$#tcp$@$U$:$1<@$2.UUCP>$|$#uucp$@$2$:<$1>$.
  1228. R<@$+.UUCP>:$+        $?U$#tcp$@$U$:<@$1.UUCP>:$2$|$#uucp$@$1$:<$2>$.
  1229. R<$+>!$+        $?U$#tcp$@$U$:<$1>!$2$|$#uucp$@$1$:<$2>$.
  1230.  
  1231. #
  1232. #  Resolve DECnet to local Ki Research kiNET's DECnet mailer or remote one via
  1233. #  tcp.  For tcp relay, user is full DECnet route.  For Ki Research kiNET's
  1234. #  DECnet mailer, user is the DECnet route as seen from the next host.
  1235. #  DECnet hostnames are not passed through the nameserver canonicalizer.
  1236. #
  1237. R<$+>::$+        $?S$#tcp$@$S$:<$1>::$2$|$#kinet$@$1$:<$2>$.
  1238.  
  1239. #  Resolve any RSCS relays. Note that relay is canonicalized.
  1240. #
  1241. R$+<@$-.$=V>        $?V$#tcp$@$[$V$]$:$1<@$2.$3>
  1242. R<@$+.$=V>:$+        $?V$#tcp$@$[$V$]$:<@$1.$2>:$3
  1243. #
  1244. #  Canonicalize anything else which has an @focus.  This excludes simple names,
  1245. #  which are local.
  1246. #
  1247. R$*<@$+>$*        $:$1<@$[$2$]>$3
  1248.  
  1249. #
  1250. #  Send domain address to tcp.  This includes domain literals [IP quads].
  1251. #  User is full focused path.
  1252. #
  1253. R$*<@$+>$*        $#tcp$@$2$:$1<@$2>$3
  1254.  
  1255. #
  1256. #  Remaining names must be local.
  1257. #  User is whatever is left.
  1258. #
  1259. R$+            $#local$:$1
  1260.