


      BINMAIL(1)                  (UNIX 5.0)                 BINMAIL(1)



      NAME
           binmail - send mail to users or read mail

      SYNTAX
           binmail [ -epqr ] [ -f file ]

           binmail [ -t ] persons

      DESCRIPTION
           Binmail is the older mail program originally supplied with
           Version 7.  Binmail(1) is now linked to Mail and mail to
           provide a more capable mail interface.  Binmail is only
           necessary for local mail delivery.  Binmail without
           arguments prints a user's mail, message-by-message, in
           last-in, first-out order.  For each message, the user is
           prompted with a ?, and a line is read from the standard
           input to determine the disposition of the message:

                <new-line>      Go on to next message.
                +               Same as <new-line>.
                d               Delete message and go on to next
                                message.
                p               Print message again.
                -               Go back to previous message.
                s [ files ]     Save message in the named files (mbox
                                is default).
                w [ files ]     Save message, without its header, in
                                the named files (mbox is default).
                m [ persons ]   Mail the message to the named persons
                                (yourself is default).
                q               Put undeleted mail back in the mailfile
                                and stop.
                EOT (control-d) Same as q.
                x               Put all mail back in the mailfile
                                unchanged and stop.
                !command        Escape to the shell to do command.
                *               Print a command summary.

           The optional arguments alter the printing of the mail:

           -e   causes mail not to be printed.  An exit value of 0 is
                returned if the user has mail; otherwise, an exit value
                of 1 is returned.
           -p   causes all mail to be printed without prompting for
                disposition.
           -q   causes binmail to terminate after interrupts.  Normally
                an interrupt only causes the termination of the message
                being printed.
           -r   causes messages to be printed in first-in, first-out
                order.
           -ffile
                causes binmail to use file (e.g., mbox) instead of the



      Page 1                                          (73 A2 02MT REV1)






      BINMAIL(1)                  (UNIX 5.0)                 BINMAIL(1)



                default mailfile.

           When persons are named, binmail takes the standard input up
           to an end-of-file (or up to a line consisting of just a .)
           and adds it to each person's mailfile.  The message is
           preceded by the sender's name and a postmark.  Lines that
           look like postmarks in the message, (i.e., ``From ...'') are
           preceded with a >.  The -t option causes the message to be
           preceded by all persons the mail is sent to.  A person is
           usually a user name recognized by login(1).  If a person
           being sent mail is not recognized, or if binmail is
           interrupted during input, the file dead.letter will be saved
           to allow editing and resending.

           To denote a recipient on a remote system, prefix person by
           the system name and exclamation mark (see uucp(1)).
           Everything after the first exclamation mark in persons is
           interpreted by the remote system.  In particular, if persons
           contains additional exclamation marks, it can denote a
           sequence of machines through which the message is to be sent
           on the way to its ultimate destination.  For example,
           specifying a!b!cde as a recipient's name causes the message
           to be sent to user b!cde on system a.  System a will
           interpret that destination as a request to send the message
           to user cde on system b.  This might be useful, for
           instance, if the sending system can access system a but not
           system b, and system a has access to system b.

           The mailfile may be manipulated in two ways to alter the
           function of binmail.  The other permissions of the file may
           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.  The file may also
           contain the first line:

                Forward to person

           which will cause all mail sent to the owner of the mailfile
           to be forwarded to person.  This is especially useful to
           forward all of a person's mail to one machine in a multiple
           machine environment.

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

      FILES
           /bin/binmail
           /etc/passwd       to identify sender and locate persons
           /usr/mail/user    incoming mail for user; i.e., the mailfile
           $HOME/mbox        saved mail



      Page 2                                          (73 A2 02MT REV1)






      BINMAIL(1)                  (UNIX 5.0)                 BINMAIL(1)



           $MAIL             variable containing path name of mailfile
           /tmp/ma*          temporary file
           /usr/mail/*.lock  lock for mail directory
           dead.letter       unmailable text

      SEE ALSO
           login(1), mail(1), sendmail(1), uucp(1), write(1).

      BUGS
           Race conditions sometimes result in a failure to remove a
           lock file.
           After an interrupt, the next message may not be printed;
           printing may be forced by typing a p.
           Does not call sendmail(1).  Provides local and uucp mail
           only.








































      Page 3                                          (73 A2 02MT REV1)



