man(1) Manual page archive


     UPAS(8)                                                   UPAS(8)

     NAME
          upas, rmail, translate - mail delivery system

     SYNOPSIS
          rmail person ...

          /usr/lib/upas/translate name

          /usr/lib/upas/auth sender receiver

     DESCRIPTION
          Users send mail by mail(1). Remote machines use rmail. Both
          call on upas programs.

          Mail addresses are interpreted according to rewrite rules as
          described below.  When the addresses for a mail or rmail
          command have been interpreted, they are bundled by network
          and passed to network-specific handlers, such as route.inet.

          Translate looks up a mail name in an alias list (see
          mail(6)) and places the result on standard output.

          Auth is called by upas to authorize mail delivery for each
          sender, receiver pair.  The mail is accepted if the previous
          hop was a trusted gateway machine in or all the machines in
          the source or destination path are in

        Rewrite rules
          Each line of the file is a rule.  Blank lines and lines
          beginning with # are ignored.

          Each rewriting rule consists of (up to) 4 strings:

          pattern
               A regular expression in the style of regexp(3). The
               pattern is applied to mail destination addresses.  The
               pattern match is case-insensitive and must match the
               entire address.

          type The type of rule; see below.

          arg1 An ed(1) style replacement string, with \n standing for
               the text matched by the nth parenthesized subpattern.

          arg2 Another ed(1) style replacement string.

          In each of these fields the substring `\s' is replaced by
          the login id of the sender and the substring `\l' is
          replaced by the name of the local machine.

     UPAS(8)                                                   UPAS(8)

          When delivering a message, mail starts with the first rule
          and continues down the list until a pattern matches the des-
          tination address.  It then performs one of the following
          actions depending on rule type:
          >>   Append the mail to the file indicated by expanding
               arg1, provided that file appears to be a valid mailbox.
          |    Pipe the mail through the command formed from concate-
               nating the expanded arg1 and arg2.
          alias
               Replace the address by the address(es) specified by
               expanding arg1 and recur.
          translate
               Replace the address by the address(es) output by the
               command formed by expanding arg1 and recur.
          auth Call the program in expanded arg1 and authorize(reject)
               the mail if it returns a zero(non-zero) return code.

          Mail expands the addresses recursively until each address
          has matched a `>>' or `|' rule or until the recursion depth
          indicates a rewriting loop (currently 32).

          An `auth' operator is only applied once per address.  If no
          `auth' rule is encountered, the mail is accepted.

          If several addresses match `|' rules and result in the same
          expanded arg1, the message is delivered to all those
          addresses by a single command, composed by concatenating the
          common expanded arg1 and each expanded arg2. This is meant
          to make less work of a message to several recipients on the
          same machine.  For example, the rule

               ([^!]+)!(.+)   |   "uux - -a \s \1!rmail"   \2

          causes `mail r70!pjw r70!ken' to generate the single deliv-
          ery command `uux -a rob r70!rmail pjw ken'.

     EXAMPLES
          A sample rewrite file:

          # local mail
          [^!@%]+              translate  "exec translate '&'"
          local!([^!@%]+)      >>     /usr/spool/mail/\1
          \l!(.+)              alias  \1

          # convert %@ format to ! format
          (_822_)!((.+)!)?([^!]+)[%@]([^!%@]+)  \
                               alias  \1!\2\5!\4
          ([^!]+)[%@]([^!@%]+) alias  _822_!\2!\1
          _822_!(.+)           alias  \1

          # special domains
          [^!]+wisc\.edu!.+    alias  xunet!&

     UPAS(8)                                                   UPAS(8)

          # network gateways
          (csnet|bitnet)!(.+)  alias  inet!&
          acsnet!.+

          # real networks
          inet!([^!]+)!(.+)    |      "/usr/lib/upas/route.inet '\s' '\1'" "'\2'"
          ([^!]+)!(.+)         |      "/usr/lib/upas/route '\s' '\1'" "'\2'"

     FILES
          list of files to search
          private aliases
          rewriting rules
          known AT&T machines
          machines that check mail authorization reliably
          alias lookup
          mail interfaces to specific networks
          interface to local (i.e. AT&T) Datakit network
          shell file that calls the mailer
          actually delivery program
          linked to /usr/lib/upas/send
          mailboxes
          delivery logs
          updates various mail and uucp files
          authentication
          temp file
          lock file
          unmailable text

     SEE ALSO
          uucp(1), mail(1), mail(6), smtp(8)
          D. L. Presotto and W. R. Cheswick, `Upas-a simpler approach
          to network mail', this manual, Volume 2