BSD 3 development
[unix-history] / usr / man / man1 / binmail.1
CommitLineData
33608fe8
BJ
1.TH BINMAIL 1 11/16/79
2.SH NAME
3mail \- send or receive mail among users
4.SH SYNOPSIS
5.B /bin/mail
6[
7.B +
8] [
9.B \-i
10] [ person ] ...
11.br
12.B /bin/mail
13.B "[ + ]"
14[
15.B \-i
16]
17.B \-f
18file
19.LP
20.SH DESCRIPTION
21.I Mail
22with no argument
23prints
24a user's mail,
25message-by-message,
26in last-in, first-out order;
27the optional argument
28.B +
29causes first-in, first-out order.
30For each message,
31it reads a line from the standard input
32to direct disposition of the message.
33.TP
34newline
35Go on to next message.
36.TP
37d
38Delete message and go on to the next.
39.TP
40p
41Print message again.
42.TP
43\-
44Go back to previous message.
45.TP
46.RI "s [" " file " "] ..."
47Save the message in the named
48.I files
49(`mbox' default).
50.TP
51.RI "w [" " file " "] ..."
52Save the message, without a header, in the named
53.I files
54(`mbox' default).
55.TP
56.RI "m [" " person " "] ..."
57Mail the message to the named
58.I persons
59(yourself is default).
60.TP
61EOT (control-D)
62Put unexamined mail back in the mailbox and stop.
63.TP
64q
65Same as EOT.
66.TP
67.RI ! command
68Escape to the Shell to do
69.IR command .
70.TP
71*
72Print a command summary.
73.PP
74.PP
75An interrupt normally causes termination of the command;
76the mail file is unchanged.
77The optional argument
78.B \(mii
79causes
80.I mail
81to continue after interrupts.
82.PP
83When
84.I persons
85are named,
86.I mail
87takes the standard input up to an end-of-file
88(or a line with just `.')
89and adds it to each
90.I person's
91`mail' file.
92The message is preceded by the sender's name and a postmark.
93Lines that look like postmarks are
94prepended with `>'.
95A
96.I person
97is usually a user name recognized by
98.IR login (1).
99To denote a recipient on a remote system, prefix
100.I person
101by the system name and exclamation mark (see
102.IR uucp (1)).
103.PP
104The
105.B \-f
106option causes the named file, e.g. `mbox',
107to be printed as if it were the mail file.
108.PP
109When a user logs in he is informed of the presence
110of mail.
111.SH FILES
112.ta \w'/usr/spool/mail/*.lock 'u
113/etc/passwd to identify sender and locate persons
114.br
115.li
116/usr/spool/mail/* incoming mail for user *
117.br
118mbox saved mail
119.br
120/tmp/ma* temp file
121.br
122/usr/spool/mail/*.lock lock for mail directory
123.br
124dead.letter unmailable text
125.br
126.SH "SEE ALSO"
127write(1), uucp(1), uux(1)
128.SH BUGS
129Race conditions sometimes result
130in a failure to remove a lock file.
131.PP
132Normally anybody can read your mail.
133An installation can overcome this by making
134.I mail
135a set-user-id command that owns the mail directory.