BIN-MAIL(1) General Commands Manual BIN-MAIL(1)
bin-mail, binmail - an early program for processing mail messages
/usr/bin/mail [ -ipq ] [ -f filename ] address
/usr/bin/mail recipient ...
Note: This is the old version 7 UNIX system mail program. The default
mail command, /usr/ucb/mail is described in mail(1).
/usr/bin/mail with no address prints a user's mail, message-by-message
in last-in, first-out order. /usr/bin/mail accepts commands from the
standard input to direct disposition messages.
When addresses are named, /usr/bin/mail takes the standard input up to
an EOF (or a line with just `.') and routes it through the mailer dae-
mon to each recipient. See sendmail(8) for details. The message is
preceded by the sender's name and a postmark. Lines that look like
postmarks are prepended with `>>'. A recipient is a user name recog-
nized by login(1), a network address or local mail alias, or a filename
(see aliases(5) for details).
If there is any pending mail, login tells you there is mail when you
log in. It is also possible to have the C shell, or the daemon biff
tell you about mail that arrives while you are logged in.
To forward mail automatically, add the addresses of additional recipi-
ents to the .forward file in your home directory. Note: forwarding
addresses must be valid, or the messages will bounce. You cannot, for
instance, reroute your mail to a new host by forwarding it to your new
address if it is not yet listed in the Network Information Service
(NIS) aliases domain.
-i Ignore interrupts.
-p Print messages without prompting for commands. Exit
immediately upon receiving an interrupt.
-q Quit immediately upon interrupt.
-f filename Use filename as if it were the mail file.
? Print a command summary.
CTRL-D Put unexamined mail back in the mail file and
!command Escape to the shell to do command.
- Go back to previous message.
+ Go on to next message.
RETURN Go on to next message.
d Delete message and go on to the next.
dq Delete message and quit.
m [ recipient ] ... Mail the message to the named recipients
(yourself is default).
n Go on to next message.
p Print message (again).
q Same as EOT .
s [ filename] ... Save the message in the named filenames (`mbox'
default). If saved successfully, remove it
from the list and go on to the next message.
w [ filename ] ... Save the message, without a header, in the
named filenames (`mbox' default). If saved
successfully, remove it from the list and go on
to the next message.
x Exit without changing the mail file.
/etc/passwd to identify sender and locate address
/var/spool/mail/* incoming mail for user *
/usr/ucb/mail routes input through daemon to recipients
mbox saved mail
/tmp/ma* temp file
lock for mail directory
dead.letter unmailable text is saved here
$HOME/.forward list of forwarding recipients
biff(1), csh(1), des(1), login(1), mail(1), uucp(1C), uux(1C),
write(1), xsend(1), crypt(3), aliases(5), sendmail(8)
Race conditions sometimes result in a failure to remove a lock file.
The super-user can read your mail, unless it is encrypted by des(1),
xsend(1), or crypt(3). Even if you encrypt it, the super-user can
The Network Information Service (NIS) was formerly known as Sun Yellow
Pages (YP). The functionality of the two remains the same; only the
name has changed.
28 November 1988 BIN-MAIL(1)