document distributed with 4.1BSD
[unix-history] / usr / src / usr.bin / mail / USD.doc / mail6.nr
CommitLineData
e2a9a8d6
KD
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)mail6.nr 4.1 (Berkeley) %G%
6.\"
7.sh 1 "Additional commands"
8.pp
9This section describes additional Mail commands available when
10receiving mail.
11.pp
12The
13.b next
14command goes to the next message and types it. If given a message list,
15.b next
16goes to the first such message and types it. Thus,
17.(l
18type root
19.)l
20goes to the next message sent by \*(lqroot\*(rq and types it.
21The
22.b next
23command can be abbreviated to simply a newline, which means that one
24can go to and type a message by simply giving its message number or
25one of the magic characters
26.q "\(ua"
27.q "."
28or
29.q "$".
30Thus,
31.(l
32\&.
33.)l
34prints the current message and
35.(l
364
37.)l
38prints message 4.
39.pp
40The
41.rb \-
42command goes to the previous message and prints it. The
43.rb \-
44command may be given a decimal number
45.i n
46as an argument, in which case the
47.i n th
48previous message is gone to and printed.
49.pp
50The
51.b save
52command allows you to save messages received from others on a file
53other than
54.i mbox.
55Its syntax varies somewhat from the other commands which accept
56a message list in that the final word on the command line is taken to be
57the file on which to save the messages. The named messages are
58appended to the file (which is created if it did not already exist)
59and are marked as saved. Saved messages are not automatically saved in
60.i mbox
61at quit time, nor are they selected by the
62.b next
63command described above, unless explicitly specified. The
64.b save
65command provides a facility for saving messages pertaining to a particular
66subject or from a particular person in a special place.
67.pp
68The
69.b undelete
70command causes a message which had been deleted previously to regain
71its initial status. Only messages which are already deleted may be
72undeleted. This command may be abbreviated to
73.b u .
74.pp
75The
76.b preserve
77command takes a message list and marks each message therein so that it
78will be saved in your system mailbox instead of being deleted or
79saved in
80.i mbox
81when you quit. This is useful for saving messages of importance that
82you want to see again, or messages not intended for you if you are sharing
83a login name.
84.pp
85Often, one wants to deal with a message by responding to its author right
86then and there. The
87.b reply
88command is useful for this purpose: it takes a message list and sends mail
89to the authors of those messages. The message is collected in the usual
90fashion by reading up to an EOT. All of the tilde escapes described in section
91three will work in
92.b reply .
93Additionally, if there are header fields
94in the message being replied to, this information is copied into the
95new message. The
96.b reply
97command can be abbreviated to
98.b r .
99.pp
100In order to simply mail to a user inside of Mail, the
101.b mail
102command is provided. This sends mail in the manner described for the
103.b reply
104command above, except that the user supplies a list of recipient login
105names and distribution groups. All of the tilde escapes described in
106section three will work in
107.b mail .
108The
109.b mail
110command may be abbreviated to
111.b m .
112.pp
113In order to edit individual messages using the text editor, the
114.b edit
115command is provided. The
116.b edit
117command takes a list of message as described under the
118.b type
119command and processes each by writing it into the file
120Message\c
121.i x
122where
123.i x
124is the message number being edited and executing the text editor on it.
125When you have edited the message to your satisfaction, write the message
126out and quit, upon which Mail will read the message back and remove the file.
127.b Edit
128may be abbreviated to
129.b e .
130.pp
131It is often useful to be able to invoke one of two editors,
132based on the type of terminal one is using. To invoke
133a display oriented editor, you can use the
134.b visual
135command. The operation of the
136.b visual
137command is otherwise identical to that of the
138.b edit
139command.
140.pp
141When Mail is invoked to receive mail, it prints out the message header
142for each message. In order to reprint the headers for remaining messages
143(those which haven't been deleted), you may type the
144.b headers
145command. Deleted messages do not appear in the listing, saved messages are
146flagged with a
147.q "*"
148and preserved messages are flagged with a
149\*(lqP.\*(rq
150.pp
151The
152.b from
153command takes a list of messages and prints out the header lines for each one;
154hence
155.(l
156from joe
157.)l
158is the easy way to display all the message headers from \*(lqjoe.\*(rq
159.pp
160The
161.b top
162command takes a message list and prints the first five lines
163of each addressed message. It may be abbreviated to
164.b to .
165.pp
166The
167.b dt
168command deletes the current message and prints the next message.
169It is useful for quickly reading and disposing of mail.