SEND(8)                                                   SEND(8)

     NAME
          send - mail routing and delivery

     SYNOPSIS
          upas/send [ -b ] [ -i ] [ -r ] [ -x ] [ -# ] [ mailaddr ...
          ]

     DESCRIPTION
          Send is not normally run directly by the user.  Instead,
          mail protocol agents like smtpd (see smtp(8)) and mail pre-
          parers like marshal(1) fork and execute send.

          Send reads a message from standard input and disposes of it
          in one of four ways:

          +o  If mailaddr refers to a local mailbox, it appends it to
             the recipient's mailbox.

          +o  If mailaddr is remote, it queues the mail for remote
             delivery.

          +o  If the -r option is given and the mail is undeliverable,
             the message mail rejected: is printed on standard error,
             setting exit status.

          +o  if the -r option is not given and the mail is undeliver-
             able, it appends the mail to
             /mail/box/username/dead.letter and prints a message to
             standard error.

          The file /mail/lib/rewrite determines exactly how to deliver
          or queue the mail.  The decision is based purely on the
          recipient address.

          The options are:

          -b  suppresses the addition of the To: line.
          -i  let the message input be terminated by a line containing
              only a period, for compatibility with old mailers.
          -x  do not send mail, but instead report the full mail
              address of the recipient.
          -#  do not send mail, but instead report what command would
              be used to send the mail.
          -r  input is via a pipe from another program.  Expect a From
              line at the start of the message to provide the name of
              the sender and timestamp.  This implies the -b option.

          Send uses the login name as the reply address.

     FILES

     Page 1                       Plan 9            (printed 12/26/24)

     SEND(8)                                                   SEND(8)

          /sys/log/mail            mail log file
          /mail/box/*/dead.letter  unmailable text
          /mail/lib/rewrite        rules for handling addresses
          /mail/box/*/names        personal alias files
          /mail/lib/namefiles      lists names of files containing
                                   system aliases

     SOURCE
          /sys/src/cmd/upas/send

     SEE ALSO
          aliasmail(8), faces(1), filter(1), mail(1), marshal(1),
          mlmgr(1), nedmail(1), qer(8), rewrite(6), smtp(8), upasfs(4)

     Page 2                       Plan 9            (printed 12/26/24)