MAIL(1)                                                   MAIL(1)

          mail  -  send or receive mail

          mail [ -r ] [ -p ] [ -m ] [ -f file ]
          mail person ...
          mail -n

          Mail with no argument prints a user's mail, message-by-
          message, in last-in, first-out order, prompting between mes-
          sages.  The options are:

          -r   Print mail in first-in, first-out order.
          -p   Print entire mailbox without pause between messages.
          -m   Only print messages explicitly requested by the user.
          -f file
               Use file, e.g. `mbox', as if it were the mailbox.

          After printing a prompt mail reads a line from the standard
          input to direct disposition of the message.  Commands are of
          the form `[range] command [arguments]'.  The command is
          applied to each message in the specified range.  The
          optional range can be:
          .    current message
          +    next message
          -    previous message
          a number
               the correspondingly numbered message
               the range of messages between number1 and number2

          The commands are:
          d    Mark message for deletion on exiting mail.
          u    remove mark for deletion.
          h    Print the disposition, size in characters, and header
               line for each message in the mailbox.
          p    Print message.
          s [ file ] ...
               Save the message in the named files (`mbox' default, in
               HOME directory if known, see environ(5)).
          m [ person ] ...
               Mail the message to the named persons (yourself by
          r    Reply to the sender of the last message printed.
          EOT (control-D)
               Put unexamined mail back in the mailbox and stop.
          q    Same as EOT.
          x    Exit, without changing the mailbox file.

     MAIL(1)                                                   MAIL(1)

               Escape to the Shell to do command.
          ?    Print a command summary.
          =    Print the number of the current message.

          An interrupt stops the printing of the current letter.

          When persons are named, mail takes the standard input up to
          an end-of-file, or to a line consisting of a single `.'.
          and adds it to each person's mailbox.  The message is auto-
          matically postmarked with the sender's name and date.  Lines
          that look like postmarks are prefixed with `>'.

          Person is usually a login name.  To denote a recipient on a
          remote system, a network name must be used instead of a sim-
          ple login name; see uucp(1), mail(7).

          If a person's mailbox contains the sole line

               Forward to name

          the mail is sent to name instead of person. Name may be a
          list of names.

          If a person's mailbox contains the sole line

               Pipe to command

          the mail is piped to command instead of being appended to
          person's mailbox.  The command is run with the user and
          group id of the mailbox's owner.

          Each user owns his own mailbox, which is by default gener-
          ally readable but not writable.  Mail does not delete an
          empty mailbox nor change its mode, so a user may make it
          unreadable if desired.

          Option -n causes notice to be given on your terminal when-
          ever mail is delivered to your mail box.  The option is
          reversed at each occurrence.  See also sysmon(9.1) and the
          MAIL variable of sh(1).

          When a user logs in he is informed of the presence of mail.

          /usr/spool/mail/mail.log mail log file
          /usr/spool/mail/*        mailboxes
          /etc/passwd              to identify sender and locate per-
          mbox                     saved mail
          /tmp/ma*                 temp file
          $HOME/dead.letter        unmailable text

     MAIL(1)                                                   MAIL(1)

          /usr/lib/upas/printmail  the program to peruse the mail

          xsend(1), write(1), sysmon(9.1), uucp(1), mail(7), upas(8)

          Option -n doesn't work in a mux(9.1) layer.