Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mail(1) — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

mailx(1)

write(1)

sendmail(1M)



MAIL(1)             RISC/os Reference Manual              MAIL(1)



NAME
     mail, rmail - send mail to users or read mail

SYNOPSIS
     Sending mail:

     mail [ -oswtd ] persons

     rmail [ -oswt ] persons

     Reading mail:

     mail [ -ehpqrl ] [ -f file ] [ -F persons ]

DESCRIPTION
     Sending mail:

     The command-line arguments that follow affect SENDING mail:

     -o   suppresses the address optimization facility.

     -s   suppresses the addition of a <new-line> at the top of
          the letter being sent.  See WARNINGS below.

     -w   causes a letter to be sent to a remote user without
          waiting for the completion of the remote transfer pro-
          gram.

     -t   causes a To: line to be added to the letter, showing
          the intended recipients.

     -d   causes mail to be delivered without going through the
          sendmail program.

     A person is usually a user name recognized by login(1).
     When persons are named, mail assumes a message is being sent
     (except in the case of the -F option).  It reads from the
     standard input up to an end-of-file (control-d), or until it
     reads a line consisting of just a period. When either of
     those signals is received, mail adds the letter to the mail-
     file for each person.  A letter is a message preceded by a
     postmark.  The message is preceded by the sender's name and
     a postmark.  A postmark consists of one or more 'From' lines
     followed by a blank line (unless the -s argument was used).

     Messages are delivered via the program sendmail(1M) if and
     only if the file /usr/lib/sendmail.ok exists.  Otherwise,
     addresses containing the character ! or @ are delivered by
     uucp(1) and other messages are delivered locally.

     If a letter is found to be undeliverable, it is returned to
     the sender with diagnostics that indicate the location and



                        Printed 11/19/92                   Page 1





MAIL(1)             RISC/os Reference Manual              MAIL(1)



     nature of the failure.  If mail is interrupted during input,
     the file dead.letter is saved to allow editing and resend-
     ing.  dead.letter is recreated every time it is needed,
     erasing any previous contents.

     rmail only permits the sending of mail; uucp(1) 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 sys-
     tem. Prefix person by the system name and 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 command-line arguments that follow affect READING 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.
     -l   causes messages to be printed when there is a lock file
          and retries are being attempted.  Without this option,
          retries are done silently, resulting in up to a 5
          minute wait with no indication.
     -h   causes a window of headers to be displayed rather than
          the latest message.  The display is followed by the '?'
          prompt.
     -p   causes all messages to be printed without prompting for
          disposition.
     -q   causes mail to terminate after interrupts.  Normally an
          interrupt causes only the termination of the message
          being printed.
     -r   causes messages to be printed in first-in, first-out
          order.
     -ffile
          causes mail to use file (e.g., mbox) instead of the
          default mailfile.
     -Fpersons
          entered into an empty mailbox, causes all incoming mail
          to be forwarded to persons.

     mail, unless otherwise influenced by command-line arguments,
     prints 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 the standard input.  The following commands are
     available to determine the disposition of the message:

     <new-line>, +, or n
            Go on to next message.

     d, or dp



 Page 2                 Printed 11/19/92





MAIL(1)             RISC/os Reference Manual              MAIL(1)



            Delete message and go on to next message.

     d #    Delete message number #.  Do not go on to next mes-
            sage.

     dq     Delete message and quit mail.

     h      Display a window of headers around current message.

     h #    Display header of message number #.

     h a    Display headers of ALL messages in the user's mail-
            file.

     h d    Display headers of messages scheduled for deletion.

     p      Print current message again.

     -      Print previous message.

     a      Print message that arrived during the mail session.

     #      Print message number #.

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

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

     y      Same as save.

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

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

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

     q, or ctl-d
            Put undeleted mail back in the mailfile and quit
            mail.

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






                        Printed 11/19/92                   Page 3





MAIL(1)             RISC/os Reference Manual              MAIL(1)



     !command
            Escape to the shell to do command.

     ?      Print a command summary.

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

     The mailfile may be manipulated in two ways to alter the
     function of mail.  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 per-
     petuate 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.  A "Forwarded by..." message is
     added to the header.  This is especially useful in a multi-
     machine environment to forward all of a person's mail to a
     single machine, and to keep the recipient informed if the
     mail has been forwarded.  Installation and removal of for-
     warding is done with the -F option.

     To forward all of one's mail to systema!user enter:

          mail -Fsystema!user

     To forward to more than one user enter:

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

     Note that when more than one user is specified, the whole
     list should be enclosed in double quotes so that it may all
     be interpreted as the operand of the -F option.  The list
     can be up to 1024 bytes; either commas or white space can be
     used to separate users.

     To remove forwarding enter:

          mail -F ""

     The pair of double quotes is mandatory to set a NULL argu-
     ment for the -F option.

     In order for forwarding to work properly the mailfile should
     have "mail" as group ID, and the group permission should be
     read-write.




 Page 4                 Printed 11/19/92





MAIL(1)             RISC/os Reference Manual              MAIL(1)



FILES
     /etc/passwd       to identify sender and locate persons
     /usr/mail/user    incoming mail for user; i.e., the mailfile
     $HOME/mbox        saved mail
     $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), mailx(1), write(1).
     sendmail(1M) in the System Administrator's Reference Manual.
     User's Guide.
     System Administrator's Guide.

WARNING
     The "Forward to person" feature may result in a loop, if
     sys1!userb forwards to sys2!userb and sys2!userb forwards to
     sys1!userb.  The symptom is a message saying
     "unbounded...saved mail in dead.letter."

     The -s option should be used with caution.  It allows the
     text of a message to be interpreted as part of the postmark
     of the letter, possibly causing confusion to other mail pro-
     grams.  To allow compatibility with mailx(1), if the first
     line of the message is "Subject:...", the addition of a
     <newline> is suppressed whether or not the -s option is
     used.

ERRORS
     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.





















                        Printed 11/19/92                   Page 5



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