Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

mailx(1)

write(1)



  mail(1)                             CLIX                             mail(1)



  NAME

    mail, rmail - Sends mail to users or reads mail

  SYNOPSIS

    mail [-wt] person ...

    rmail [-wt] person ...

    mail [-ehpqr] [-ffile] [-Fperson ... ]

  FLAGS

    -e          Prevents display of messages.  An exit value of 0 is returned
                if the user has mail; otherwise, an exit value of 1 is
                returned.

    -ffile      Specifies the use of file (for example, mbox) instead of the
                default mailfile.

    -Fpersons   Entered into an empty mailbox, forwards all incoming messages
                to specified persons.

    -h          Displays a window of headers instead of the most recent
                message.  The display is followed by the ? prompt.

    -p          Displays all messages without prompting for disposition.

    -q          Terminates mail after interrupts.  Normally an interrupt
                causes only termination of the message being displayed.

    -r          Displays messages in first-in, first-out order.

    -t          Adds a To line to the message, showing the intended
                recipients.

    -w          Sends a message to a remote user without waiting for the
                completion of the remote transfer program.

  DESCRIPTION

  Sending Mail

    A person is usually a username recognized by login(1).  When persons are
    named, mail assumes a message is being sent (except in the case of the -F
    flag).  It reads from stdin until it encounters an end-of-file (the
    <Ctrl-D> sequence) or until it reads a line consisting of only a period.
    When either of those signals is received, mail adds the letter to the
    mailfile (/usr/mail/user) for each person listed on the command line.  *)
    A letter is a message preceded by a postmark and the sender's name.  A



  2/94 - Intergraph Corporation                                              1






  mail(1)                             CLIX                             mail(1)



    postmark consists of one or more From lines followed by a blank line.

    If a letter is found to be undeliverable, it is returned to the sender
    with diagnostics indicating the location and nature of the failure.  If
    mail is interrupted during input, the file dead.letter is saved to allow
    editing and resending of the letter.  The dead.letter is recreated every
    time it is needed, erasing any previous contents.

    The rmail command only permits the sending of mail.  uucp uses rmail as a
    security precaution.

    If the local system has the Basic Networking Utilities installed, mail may
    be sent to a recipient on a remote system.  Prefix person with the system
    name and an exclamation point.  A series of system names separated by
    exclamation points can be used to direct a letter through an extended
    network.

  Reading Mail

    The mail command, unless otherwise influenced by command-line arguments,
    displays a user's mail messages in last-in, first-out order.  For each
    message, the user is prompted with a ?, and a line is read from stdin.
    The following commands are available to determine the disposition of a
    message:

    <Return>, +, or n
           Go on to next message.

    d, or dp
           Delete message and go on to next message.

    d n    Delete message number n.  Do not go on to next message.

    dq     Delete message and quit mail.

    h      Display a window of headers around current message.

    h n    Display header of message number n.

    h a    Display headers of all messages in the user's mailfile.

    h d    Display headers of messages scheduled for deletion.

    p      Display current message again.

    -      Display previous message.

    a      Display message that arrived during the mail session.

    n      Display message number n.




  2                                              Intergraph Corporation - 2/94






  mail(1)                             CLIX                             mail(1)



    r [user ... ]
           Reply to the sender, and other users, then delete the message.

    s [file ... ]
           Save message in the named files (mbox is default).

    y      Same as save.

    u [n]  Undelete message number n (default is last read).

    w [file ... ]
           Save message, without its top-most header, in the named files (mbox
           is default).

    m [person ... ]
           Mail the message to the named persons.

    q, or <Ctrl-D>
           Put undeleted mail back in the mailfile and quit mail.

    x      Put all mail back in the mailfile unchanged and exit mail.

    ! command
           Escape to the shell to do command.

    ?      Display a command summary.

    When a user logs in, the presence of mail, if any, is indicated.  Also,
    the user is notified if new mail arrives while using mail.

    The mailfile may be manipulated in two ways to change the function of
    mail:

    ⊕  You can change the other permissions of the mailfile to be read-write,
       read-only, or neither read nor write, to allow different levels of
       privacy.  If changed to other than the default, the file will be
       preserved, even when empty, to perpetuate the desired permissions.

    ⊕  You can add the following first line to the mailfile:

       Forward to person

       This forwards all messages sent to the owner of the mailfile to person.
       Use the -F flag to start and stop forwarding.

  EXAMPLES

    1.  To mail a message to user on your system, key in the following:

        mail user




  2/94 - Intergraph Corporation                                              3






  mail(1)                             CLIX                             mail(1)



    2.  To mail a message to user on system systema, key in the following:

        mail systema!user


    3.  To forward messages to systema!user, key in the following:

        mail -Fsystema!user


    4.  To forward messages to more than one user, key in the following:

        mail -F"user1,systema!user2,systema!systemb!user3"

        Note that when you specify more than one user, you must enclose the
        entire list in double quotes, so that it will be interpreted as the
        argument to the -F flag.  The list can be up to 1024 bytes; use either
        commas or white space to separate the users.

    5.  To stop forwarding, key in the following:

        mail -F ""

        You must use the pair of double quotes to provide a null argument to
        the -F flag, which stops forwarding.

        For forwarding to work properly, the mailfile should have mail as its
        group ID, and the group permission should be read-write.

  FILES

    /etc/passwd
           Identify sender and locate persons.

    /usr/mail/user
           Incoming mailfile for user;

    $HOME/mbox
           Saved mail.

    $MAIL  Variable containing pathname of mailfile.

    /tmp/ma*
           Temporary file.

    /usr/mail/*.lock
           Lock for mail directory.

    dead.letter
           Unmailable text.




  4                                              Intergraph Corporation - 2/94






  mail(1)                             CLIX                             mail(1)



  CAUTIONS

    Forwarding may result in a loop if the person to which you are forwarding
    is forwarding to you. The symptom of this problem is the error message
    unbounded...saved mail in dead.letter.

    Conditions sometimes result in a failure to remove a lock file.

    After an interrupt, the next message may not be displayed.  To force a
    display, key in p.

  RELATED INFORMATION

    Commands:  login(1), mailx(1), write(1)

    AT&T UNIX System V User's Guide.

    AT&T UNIX System V System Administrator's Guide.




































  2/94 - Intergraph Corporation                                              5




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026