MAIL(1) DOMAIN/IX Reference Manual (SYS5) MAIL(1)
NAME
mail, rmail - send mail to users or read mail
USAGE
mail [ -epqr ] [ -f file ]
mail [ -t ] persons
rmail [ -t ] persons
DESCRIPTION
Mail with no arguments prints your mail, message by message,
in last-in, first-out order. For each message, you are
prompted with a question mark (?), and a line is read from
the standard input to determine the disposition of the mes-
sage.
Once in mail, you can read, save, and delete messages by
using the control commands listed below. The actual print-
ing of mail is also altered by specifying certain options.
When persons are named, mail takes the standard input up to
an end-of-file (or up to a line consisting of just a period
(.) 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 greater-than character (>). 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 mail is interrupted during input, the file dead.letter
is saved to allow editing and resending. Note that this is
regarded as a temporary file in that it is re-created every
time it is needed, erasing the previous contents of
dead.letter.
To denote a recipient on a remote system, prefix person by
the system name and exclamation mark. See uucp (1) for more
information. 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 the message is to be sent
through 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. Mail will
not use uucp (1) if the remote system is the local system
name (i.e., localsystem!user).
Printed 8/1/85 MAIL-1
MAIL(1) DOMAIN/IX Reference Manual (SYS5) MAIL(1)
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 mailfile is changed to
something 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. In order for forwarding to work prop-
erly the mailfile should have ``mail'' as a group ID, and
the group permission should be read-write.
Rmail only permits the sending of mail; uucp (1) uses rmail
as a security precaution.
When you log in, the presence of any mail is indicated. You
are also notified if new mail arrives while you are using
mail.
Note: In most instances, /usr/mail is owned by bin, and the
group is owned by mail. If a site elects to run both System
V and BSD4.2 versions of the software, however, the
/usr/mail directory is set up to be owned by root and the
group to be owned by mail. This change was made to provide
communication between the System V and BSD4.2 versions of
the mail programs.
CONTROL COMMANDS
<newline> Go on to next message.
+ Same as <newline>.
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 the
default).
w [ files ] Save message, without its header, in the
named files (mbox is the default).
m [ persons ] Mail the message to the named persons (you
are the default).
MAIL-2 Printed 8/1/85
MAIL(1) DOMAIN/IX Reference Manual (SYS5) MAIL(1)
q Put undeleted mail back in the mailfile and
stop.
EOF (^Z)) 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.
OPTIONS
-e Do not print mail. An exit value of 0 is returned
if you have mail; otherwise, an exit value of 1 is
returned.
-p Print all mail without prompting for disposition.
-q Terminate mail after interrupts. Normally an
interrupt only causes the termination of the mes-
sage being printed.
-r Print messages in first-in, first-out order.
-ffile Use file (e.g., mbox) instead of the default mail-
file.
CAUTIONS
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.
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 the pathname of mail-
file
/tmp/ma* temporary file
/usr/mail/*.lock lock for mail directory
dead.letter unmailable text
RELATED INFORMATION
login (1), mailx (1), uucp (1).
Printed 8/1/85 MAIL-3