Commit | Line | Data |
---|---|---|
67fac86d KS |
1 | .TH MAIL 1 2/24/79 |
2 | .UC | |
3 | .SH NAME | |
4 | mail \- send and receive mail | |
5 | .SH SYNOPSIS | |
6 | .B mail | |
7 | [ | |
8 | .B \-f | |
9 | [ | |
10 | name | |
11 | ] | |
12 | ] | |
13 | [ | |
14 | people ... | |
15 | ] | |
16 | .SH INTRODUCTION | |
17 | .I Mail | |
18 | is a intelligent mail processing system, which has | |
19 | a command syntax reminiscent of | |
20 | .I ed | |
21 | with lines replaced by messages. | |
22 | In normal usage, it is given no arguments and checks your mail out of the | |
23 | post office, then | |
24 | printing out a one line header of each message there. | |
25 | The current message is initially the first message (numbered 1) | |
26 | and can be printed using the | |
27 | .B print | |
28 | command (which can be abbreviated \fBp\fR). | |
29 | You can move among the messages much as you move between lines in | |
30 | .I ed, | |
31 | with the commands `+' and `\-' moving backwards and forwards, and | |
32 | simple numbers typing the addressed message. | |
33 | .PP | |
34 | After examining a message you can | |
35 | .B delete | |
36 | (\fBd\fR) | |
37 | the message or | |
38 | .B reply | |
39 | (\fBr\fR) | |
40 | to it. | |
41 | Deletion causes the | |
42 | .I mail | |
43 | program to forget about the message. | |
44 | This is not irreversible, the message can be | |
45 | .B undeleted | |
46 | (\fBu\fR) | |
47 | by giving its number, or | |
48 | the | |
49 | .I mail | |
50 | session can be aborted by giving the | |
51 | .B exit | |
52 | (\fBx\fR) | |
53 | command. | |
54 | Deleted messages will, however, usually disappear never to be seen again. | |
55 | .PP | |
56 | Commands such as | |
57 | .B print | |
58 | and | |
59 | .B delete | |
60 | often can be given a list of message numbers as argument to apply | |
61 | to a number of messages at once. | |
62 | Thus ``delete 1 2'' deletes messages 1 and 2, while ``delete 1\-5'' | |
63 | deletes messages 1 through 5. | |
64 | The special name ``*'' addresses all messages, and ``$'' addresses | |
65 | the last message; thus the command | |
66 | .B top | |
67 | which prints the first few lines of a message could be used in | |
68 | ``top *'' to print the first few lines of all messages. | |
69 | .PP | |
70 | You can use the | |
71 | .B reply | |
72 | command to | |
73 | set up a response to a message, sending it back to the | |
74 | person who it was from. | |
75 | Text you then type in, up to an end-of-file (or a line consisting only | |
76 | of a ``.'') defines the contents of | |
77 | the message. | |
78 | While you are composing a message, | |
79 | .I mail | |
80 | treats lines beginning with the character `~' specially. | |
81 | For instance, typing ``~m'' (alone on a line) will place a copy | |
82 | of the current message into the response right shifting it by a tabstop. | |
83 | Other escapes will set up subject fields, add and delete recipients | |
84 | to the message and allow you to escape to an editor to revise the | |
85 | message or to a shell to run some commands. (These options | |
86 | will be given in the summary below.) | |
87 | .PP | |
88 | You can end a | |
89 | .I mail | |
90 | session with the | |
91 | .B quit | |
92 | (\fBq\fR) | |
93 | command. | |
94 | Messages which have been examined go to your | |
95 | .I mbox | |
96 | file unless they have been deleted in which case they are discarded. | |
97 | Unexamined messages go back to the post office. | |
98 | The | |
99 | .B \-f | |
100 | option causes | |
101 | .I mail | |
102 | to read in the contents of your | |
103 | .I mbox | |
104 | (or the specified file) | |
105 | for processing; when you | |
106 | .B quit | |
107 | .I mail | |
108 | writes undeleted messages back to this file. | |
109 | .PP | |
110 | By giving `people' arguments to | |
111 | .I mail | |
112 | on the command line, or by using the internal | |
113 | .B mail | |
114 | (\fBm\fR) | |
115 | command you can originate mail. | |
116 | The escapes available during | |
117 | .I reply | |
118 | commands are available here also. | |
119 | .PP | |
120 | It is also possible to create distribution lists so that, for instance, | |
121 | you can send mail to ``staff'' and have it go to a group of people. | |
122 | Currently, such lists are defined by placing a line like | |
123 | .IP | |
124 | alias staff bill ozalp sklower jkf mark cory:kridle | |
125 | .PP | |
126 | in the file | |
127 | /usr/lib/Mail.rc. | |
128 | The current list of such aliases can be displayed by the | |
129 | .B alias | |
130 | .B (a) | |
131 | command in | |
132 | .I mail. | |
133 | A new distribution list can be created by editing | |
134 | /usr/lib/Mail.rc, | |
135 | or personal aliases and mailing lists can be added to the file | |
136 | .I \&.mailrc | |
137 | in your home directory, which | |
138 | .I mail | |
139 | will read before each session. | |
140 | .PP | |
141 | Finally, | |
142 | .I mail | |
143 | has a number of options which can be | |
144 | .B set | |
145 | in the | |
146 | .I \&.mailrc | |
147 | file to alter its behavior; thus ``set askcc'' enables the ``askcc'' | |
148 | feature. (These options are summarized below.) | |
149 | .SH SUMMARY | |
150 | (Adapted from the `Mail Reference Manual') | |
151 | Each command is typed on a line by itself, and may take arguments | |
152 | following the command word. The command need not be typed in its | |
153 | entirety \- the first command which matches the typed prefix is used. | |
154 | For the commands which take message lists as arguments, if no message | |
155 | list is given, then the next message forward which satisfies the | |
156 | command's requirements is used. If there are no messages forward of | |
157 | the current message, the search proceeds backwards, and if there are no | |
158 | good messages at all, | |
159 | .I mail | |
160 | types ``No applicable messages'' and | |
161 | aborts the command. | |
162 | .TP 12n | |
163 | .B \- | |
164 | Goes to the previous message and prints it out. If given a numeric | |
165 | argument | |
166 | .I n , | |
167 | goes to the | |
168 | .I n th | |
169 | previous message and prints it. | |
170 | .TP | |
171 | .B ? | |
172 | Prints a brief summary of commands. | |
173 | .TP | |
174 | .B ! | |
175 | Executes the \s-2UNIX\s0 shell command which follows. | |
176 | .TP | |
177 | .B alias | |
178 | (\fBa\fR) With no arguments, prints out all currently-defined aliases. With one | |
179 | argument, prints out that alias. With more than one argument, adds the | |
180 | users named in the second and later arguments to the alias named in the | |
181 | first argument. | |
182 | .TP | |
183 | .B chdir | |
184 | (\fBc\fR) Changes the user's working directory to that specified, if given. If | |
185 | no directory is given, then changes to the user's login directory. | |
186 | .TP | |
187 | .B delete | |
188 | (\fBd\fR) Takes a list of messages as argument and marks them all as deleted. | |
189 | Deleted messages will not be saved in | |
190 | .I mbox , | |
191 | nor will they be available for most other commands. | |
192 | .TP | |
193 | .B dp | |
194 | (also \fBdt\fR) Deletes the current message and prints the next message. | |
195 | If there is no next message, | |
196 | .I mail | |
197 | says ``at EOF.'' | |
198 | .TP | |
199 | .B edit | |
200 | (\fBe\fR) Takes a list of messages and points the text editor at each one in | |
201 | turn. On return from the editor, the message is read back in. | |
202 | .TP | |
203 | .B exit | |
204 | (\fBex\fR or \fBx\fR) Effects an immediate return to the Shell without | |
205 | modifying the user's system mailbox, his | |
206 | .I mbox | |
207 | file, or his edit file in | |
208 | .B \-f . | |
209 | .TP | |
210 | .B from | |
211 | (\fBf\fR) Takes a list of messages and prints their message headers. | |
212 | .TP | |
213 | .B headers | |
214 | (\fBh\fR) Lists the current range of headers, which is an 18 message group. If | |
215 | a ``+'' argument is given, then the next 18 message group is printed, and if | |
216 | a ``\-'' argument is given, the previous 18 message group is printed. | |
217 | .TP | |
218 | .B help | |
219 | A synonym for ? | |
220 | .TP | |
221 | .B hold | |
222 | (\fBho\fR, also \fBpreserve\fR) Takes a message list and marks each | |
223 | message therein to be saved in the | |
224 | user's system mailbox instead of in | |
225 | .I mbox. | |
226 | Does not override the | |
227 | .B delete | |
228 | command. | |
229 | .TP | |
230 | .B mail | |
231 | (\fBm\fR) Takes as argument login names and distribution group names and sends | |
232 | mail to those people. | |
233 | .TP | |
234 | .B next | |
235 | (\fBn\fR like \fB+\fR or CR) Goes to the next message in sequence and types it. | |
236 | With an argument list, types the next matching message. | |
237 | .TP | |
238 | .B preserve | |
239 | A synonym for | |
240 | .B hold. | |
241 | .TP | |
242 | .B print | |
243 | (\fBp\fR) Takes a message list and types out each message on the user's | |
244 | terminal. | |
245 | .TP | |
246 | .B quit | |
247 | (\fBq\fR) Terminates the session, saving all undeleted, unsaved messages in | |
248 | the user's | |
249 | .I mbox | |
250 | file in his login directory, preserving all messages marked with | |
251 | .B hold | |
252 | or | |
253 | .B preserve | |
254 | or never referenced | |
255 | in his system mailbox, and removing all other messages from his system | |
256 | mailbox. If new mail has arrived during the session, the message | |
257 | ``You have new mail'' is given. If given while editing a | |
258 | mailbox file with the | |
259 | .B \-f | |
260 | flag, then the edit file is rewritten. A return to the Shell is | |
261 | effected, unless the rewrite of edit file fails, in which case the user | |
262 | can escape with the | |
263 | .B exit | |
264 | command. | |
265 | .TP | |
266 | .B reply | |
267 | (\fBr\fR) Takes a message list and sends mail to each message author just like | |
268 | the | |
269 | .B mail | |
270 | command. The default message must not be deleted. | |
271 | .TP | |
272 | .B respond | |
273 | A synonym for | |
274 | .B reply . | |
275 | .TP | |
276 | .B save | |
277 | (\fBs\fR) Takes a message list and a filename and appends each message in | |
278 | turn to the end of the file. The filename in quotes, followed by the line | |
279 | count and character count is echoed on the user's terminal. | |
280 | .TP | |
281 | .B set | |
282 | (\fBse\fR) With no arguments, prints all variable values. Otherwise, sets | |
283 | option. Arguments are of the form | |
284 | ``option=value'' | |
285 | or | |
286 | ``option.'' | |
287 | .TP | |
288 | .B shell | |
289 | (\fBsh\fR) Invokes an interactive version of the shell. | |
290 | .TP | |
291 | .B size | |
292 | Takes a message list and prints out the size in characters of each | |
293 | message. | |
294 | .TP | |
295 | .B top | |
296 | Takes a message list and prints the top few lines of each. The number of | |
297 | lines printed is controlled by the variable | |
298 | .B toplines | |
299 | and defaults to five. | |
300 | .TP | |
301 | .B type | |
302 | (\fBt\fR) A synonym for | |
303 | .B print . | |
304 | .TP | |
305 | .B unalias | |
306 | Takes a list of names defined by | |
307 | .B alias | |
308 | commands and discards the remembered groups of users. The group names | |
309 | no longer have any significance. | |
310 | .TP | |
311 | .B undelete | |
312 | (\fBu\fR) Takes a message list and marks each one as | |
313 | .I not | |
314 | being deleted. | |
315 | .TP | |
316 | .B unset | |
317 | Takes a list of option names and discards their remembered values; | |
318 | the inverse of | |
319 | .B set . | |
320 | .TP | |
321 | .B visual | |
322 | (\fBv\fR) Takes a message list and invokes the display editor on each message. | |
323 | .TP | |
324 | .B write | |
325 | (\fBw\fR) A synonym for | |
326 | .B save . | |
327 | .TP | |
328 | .B xit | |
329 | (\fBx\fR) A synonym for | |
330 | .B exit . | |
331 | .PP | |
332 | Here is a summary of the tilde escapes, | |
333 | which are used when composing messages to perform | |
334 | special functions. Tilde escapes are only recognized at the beginning | |
335 | of lines. The name | |
336 | ``tilde\ escape'' | |
337 | is somewhat of a misnomer since the actual escape character can be set | |
338 | by the option | |
339 | .B escape. | |
340 | .TP 12n | |
341 | \fB~!\fRcommand | |
342 | Execute the indicated shell command, then return to the message. | |
343 | .TP | |
344 | \fB~c\fR name ... | |
345 | Add the given names to the list of carbon copy recipients. | |
346 | .TP | |
347 | .B ~d | |
348 | Read the file ``dead.letter'' from your home directory into the message. | |
349 | .TP | |
350 | .B ~e | |
351 | Invoke the text editor on the message collected so far. After the | |
352 | editing session is finished, you may continue appending text to the | |
353 | message. | |
354 | .TP | |
355 | .B ~h | |
356 | Edit the message header fields by typing each one in turn and allowing | |
357 | the user to append text to the end or modify the field by using the | |
358 | current terminal erase and kill characters. | |
359 | .TP | |
360 | \fB~m\fR messages | |
361 | Read the named messages into the message being sent, shifted right one | |
362 | tab. If no messages are specified, read the current message. | |
363 | .TP | |
364 | .B ~p | |
365 | Print out the message collected so far, prefaced by the message header | |
366 | fields. | |
367 | .TP | |
368 | .B ~q | |
369 | Abort the message being sent, copying the message to | |
370 | ``dead.letter'' | |
371 | in your home directory if | |
372 | .B save | |
373 | is set. | |
374 | .TP | |
375 | \fB~r\fR filename | |
376 | Read the named file into the message. | |
377 | .TP | |
378 | \fB~s\fR string | |
379 | Cause the named string to become the current subject field. | |
380 | .TP | |
381 | \fB~t\fR name ... | |
382 | Add the given names to the direct recipient list. | |
383 | .TP | |
384 | .B ~v | |
385 | Invoke an alternate editor (defined by the VISUAL option) on the | |
386 | message collected so far. Usually, the alternate editor will be a | |
387 | screen editor. After you quit the editor, you may resume appending | |
388 | text to the end of your message. | |
389 | .TP | |
390 | \fB~w\fR filename | |
391 | Write the message onto the named file. | |
392 | .TP | |
393 | \fB~|\fRcommand | |
394 | Pipe the message through the command as a filter. If the command gives | |
395 | no output or terminates abnormally, retain the original text of the | |
396 | message. The command | |
397 | .IR fmt (1) | |
398 | is often used as | |
399 | .I command | |
400 | to rejustify the message. | |
401 | .TP | |
402 | \fB~~\fRstring | |
403 | Insert the string of text in the message prefaced by a single ~. If | |
404 | you have changed the escape character, then you should double | |
405 | that character in order to send it. | |
406 | .PP | |
407 | Options are controlled via the | |
408 | .B set | |
409 | and | |
410 | .B unset | |
411 | commands. Options may be either binary, in which case it is only | |
412 | significant to see whether they are set or not, or string, in which | |
413 | case the actual value is of interest. | |
414 | The binary options include the following: | |
415 | .TP 15n | |
416 | .B append | |
417 | Causes messages saved in | |
418 | .I mbox | |
419 | to be appended to the end rather than prepended. | |
420 | (This is set in | |
421 | /usr/lib/Mail.rc | |
422 | on version 7 systems.) | |
423 | .TP | |
424 | .B ask | |
425 | Causes | |
426 | .I mail | |
427 | to prompt you for the subject of each message you send. If | |
428 | you respond with simply a newline, no subject field will be sent. | |
429 | .TP | |
430 | .B askcc | |
431 | Causes you to be prompted for additional carbon copy recipients at the | |
432 | end of each message. Responding with a newline indicates your | |
433 | satisfaction with the current list. | |
434 | .TP | |
435 | .B autoprint | |
436 | Causes the | |
437 | .B delete | |
438 | command to behave like | |
439 | .B dp | |
440 | \- thus, after deleting a message, the next one will be typed | |
441 | automatically. | |
442 | .TP | |
443 | .B ignore | |
444 | Causes interrupt signals from your terminal to be ignored and echoed as | |
445 | @'s. | |
446 | .TP | |
447 | .B metoo | |
448 | Usually, when a group is expanded that contains the sender, the sender | |
449 | is removed from the expansion. Setting this option causes the sender | |
450 | to be included in the group. | |
451 | .TP | |
452 | .B quiet | |
453 | Suppresses the printing of the version when first invoked. | |
454 | .TP | |
455 | .B save | |
456 | Causes the message collected prior to a interrupt to be saved on | |
457 | the file | |
458 | ``dead.letter'' | |
459 | in your home directory on receipt of two interrupts (or after a \fB~q\fR.) | |
460 | .PP | |
461 | The following options have string values: | |
462 | .TP 15n | |
463 | EDITOR | |
464 | Pathname of the text editor to use in the | |
465 | .B edit | |
466 | command and ~e escape. If not defined, then a default editor is used. | |
467 | .TP | |
468 | SHELL | |
469 | Pathname of the shell to use in the | |
470 | .B ! | |
471 | command and the ~! escape. A default shell is used if this option is | |
472 | not defined. | |
473 | .TP | |
474 | VISUAL | |
475 | Pathname of the text editor to use in the | |
476 | .B visual | |
477 | command and ~v escape. | |
478 | .TP | |
479 | .B escape | |
480 | If defined, the first character of this option gives the character to | |
481 | use in the place of ~ to denote escapes. | |
482 | .TP | |
483 | .B record | |
484 | If defined, gives the pathname of the file used to record all outgoing | |
485 | mail. If not defined, then outgoing mail is not so saved. | |
486 | .TP | |
487 | .B toplines | |
488 | If defined, gives the number of lines of a message to be printed out | |
489 | with the | |
490 | .B top | |
491 | command; normally, the first five lines are printed. | |
492 | .SH FILES | |
493 | .if n .ta 2.5i | |
494 | .if t .ta 1.8i | |
495 | /usr/spool/mail/* post office | |
496 | .br | |
497 | ~/mbox your old mail | |
498 | .br | |
499 | ~/.mailrc file giving initial mail commands | |
500 | .br | |
501 | /tmp/R# temporary for editor escape | |
502 | .br | |
503 | /usr/lib/Mail.help* help files | |
504 | .br | |
505 | /usr/lib/Mail.rc initialization and group file | |
506 | .br | |
507 | /bin/mail to do actual mailing | |
508 | .SH "SEE ALSO" | |
509 | binmail(1), fmt(1) | |
510 | .br | |
511 | `The Mail Reference Manual' | |
512 | .SH AUTHOR | |
513 | Kurt Shoens | |
514 | .SH BUGS | |
515 | The mail forwarding and group definition facilities, as well as | |
516 | multi-network interfaces are in a state of flux. |