Research V7 development
[unix-history] / usr / man / man1 / mail.1
CommitLineData
4b3036b8
KT
1.TH MAIL 1
2.SH NAME
3mail \- send or receive mail among users
4.SH SYNOPSIS
5.B mail
6person ...
7.br
8.B mail
9[
10.B \-r
11] [
12.B \-q
13] [
14.B \-p
15] [
16.B \-f
17file
18]
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 \-r
29causes first-in, first-out order.
30If the
31.B \-p
32flag is given, the mail is printed with no questions asked;
33otherwise,
34for each message,
35.I mail
36reads a line from the standard input
37to direct disposition of the message.
38.TP
39newline
40Go on to next message.
41.TP
42d
43Delete message and go on to the next.
44.TP
45p
46Print message again.
47.TP
48\-
49Go back to previous message.
50.TP
51.RI "s [" " file " "] ..."
52Save the message in the named
53.I files
54(`mbox' default).
55.TP
56.RI "w [" " file " "] ..."
57Save the message, without a header, in the named
58.I files
59(`mbox' default).
60.TP
61.RI "m [" " person " "] ..."
62Mail the message to the named
63.I persons
64(yourself is default).
65.TP
66EOT (control-D)
67Put unexamined mail back in the mailbox and stop.
68.TP
69q
70Same as EOT.
71.TP
72x
73Exit, without changing the mailbox file.
74.TP
75!command
76Escape to the Shell to do command.
77.TP
78?
79Print a command summary.
80.PP
81An interrupt stops the printing of the current letter.
82The optional argument
83.B \(miq
84causes
85.I mail
86to exit after interrupts
87without changing the mailbox.
88.PP
89When
90.I persons
91are named,
92.I mail
93takes the standard input up to an end-of-file
94(or a line with just `.')
95and adds it to each
96.I person's
97`mail' file.
98The message is preceded by the sender's name and a postmark.
99Lines that look like postmarks are
100prepended with `>'.
101A
102.I person
103is usually a user name recognized by
104.IR login (1).
105To denote a recipient on a remote system, prefix
106.I person
107by the system name and exclamation mark (see
108.IR uucp (1)).
109.PP
110The
111.B \-f
112option causes the named file, e.g. `mbox',
113to be printed as if it were the mail file.
114.PP
115Each user owns his own mailbox, which is by default generally
116readable but not writable.
117The command does not delete an empty mailbox nor change its mode,
118so a user may make it unreadable if desired.
119.PP
120When a user logs in he is informed of the presence
121of mail.
122.SH FILES
123/usr/spool/mail/* mailboxes
124.br
125/etc/passwd to identify sender and locate persons
126.br
127mbox saved mail
128.br
129/tmp/ma* temp file
130.br
131dead.letter unmailable text
132.br
133uux(1)
134.SH "SEE ALSO"
135xsend(1), write(1), uucp(1)
136.SH BUGS
137There is a locking mechanism intended to prevent
138two senders from accessing the same mailbox, but it
139is not perfect and races
140are possible.