Commit | Line | Data |
---|---|---|
91d7df00 | 1 | .\" Copyright (c) 1980 Regents of the University of California. |
2470c0cd | 2 | .\" All rights reserved. |
91d7df00 | 3 | .\" |
2470c0cd KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
0f642f7e | 16 | .\" @(#)mail.1 6.13 (Berkeley) %G% |
91d7df00 | 17 | .\" |
bb04cec6 | 18 | .TH MAIL 1 "" |
91d7df00 KM |
19 | .UC 4 |
20 | .SH NAME | |
21 | mail \- send and receive mail | |
22 | .SH SYNOPSIS | |
23 | .B mail | |
24 | [ | |
84931b71 | 25 | .B \-iInv |
dcee403d KM |
26 | ] |
27 | [ | |
28 | .B \-s | |
29 | subject | |
30 | ] | |
31 | [ | |
692b0644 EW |
32 | .B \-c |
33 | cc-addr | |
dcee403d KM |
34 | ] |
35 | [ | |
692b0644 EW |
36 | .B \-b |
37 | bcc-addr | |
dcee403d | 38 | ] |
692b0644 EW |
39 | to-addr... |
40 | .br | |
41 | .B mail | |
dcee403d | 42 | [ |
84931b71 | 43 | .B \-iInNv |
dcee403d | 44 | ] |
91d7df00 KM |
45 | .B \-f |
46 | [ | |
47 | name | |
48 | ] | |
dcee403d KM |
49 | .br |
50 | .B mail | |
51 | [ | |
84931b71 | 52 | .B \-iInNv |
91d7df00 | 53 | ] |
dcee403d | 54 | [ |
dcee403d KM |
55 | .B \-u |
56 | user | |
692b0644 | 57 | ] |
91d7df00 KM |
58 | .SH INTRODUCTION |
59 | .I Mail | |
60 | is a intelligent mail processing system, which has | |
61 | a command syntax reminiscent of | |
62 | .I ed | |
63 | with lines replaced by messages. | |
64 | .PP | |
dcee403d KM |
65 | The |
66 | .B \-v | |
67 | flag puts mail into verbose mode; the details of | |
68 | delivery are displayed on the users terminal. | |
69 | The | |
70 | .B \-i | |
71 | flag causes tty interrupt signals to be ignored. This is | |
72 | particularly useful when using | |
73 | .I mail | |
74 | on noisy phone lines. | |
75 | The | |
84931b71 EW |
76 | .B \-I |
77 | flag forces mail to run in interactive mode even when | |
78 | input isn't a terminal. In particular, the `~' special | |
79 | character when sending mail is only active in interactive mode. | |
80 | The | |
dcee403d KM |
81 | .B \-n |
82 | flag inhibits the reading of /usr/lib/Mail.rc. | |
84931b71 EW |
83 | The |
84 | .B \-N | |
85 | flag inhibits the initial display of message headers | |
86 | when reading mail or editing a mail folder. | |
dcee403d | 87 | .PP |
91d7df00 | 88 | .I "Sending mail.\ " |
bfe02f44 | 89 | To send a message to one or more people, |
91d7df00 | 90 | .I mail |
bfe02f44 AH |
91 | can be invoked with arguments which are the names of people to |
92 | whom the mail will be sent. You are then expected to type in | |
93 | your message, followed | |
91d7df00 | 94 | by an \s-2EOT\s0 (control\-D) at the beginning of a line. |
dcee403d KM |
95 | A subject may be specified on the command line by using the |
96 | .B \-s | |
97 | flag. (Only the first argument after the | |
98 | .B \-s | |
99 | flag is used as a subject; be careful to quote subjects | |
692b0644 EW |
100 | containing spaces.) Lists of users to send carbon copies and |
101 | blind carbon copies to may be specified using the | |
102 | .B \-c | |
103 | and | |
104 | .B \-b | |
105 | options, respectively. The single argument following the | |
106 | flag is taken to be a comma-separated list of names. | |
91d7df00 KM |
107 | The section below, labeled |
108 | .I "Replying to or originating mail," | |
109 | describes some features of | |
110 | .I mail | |
111 | available to help you compose your letter. | |
112 | .PP | |
113 | .I "Reading mail.\ " | |
dcee403d | 114 | In normal usage |
91d7df00 KM |
115 | .I mail |
116 | is given no arguments and checks your mail out of the | |
117 | post office, then | |
dcee403d | 118 | prints out a one line header of each message there. |
91d7df00 KM |
119 | The current message is initially the first message (numbered 1) |
120 | and can be printed using the | |
121 | .B print | |
122 | command (which can be abbreviated \fBp\fR). | |
123 | You can move among the messages much as you move between lines in | |
dcee403d | 124 | .IR ed , |
91d7df00 | 125 | with the commands `+' and `\-' moving backwards and forwards, and |
dcee403d | 126 | simple numbers. |
91d7df00 KM |
127 | .PP |
128 | .I "Disposing of mail.\ " | |
129 | After examining a message you can | |
130 | .B delete | |
131 | (\fBd\fR) | |
132 | the message or | |
133 | .B reply | |
134 | (\fBr\fR) | |
135 | to it. | |
136 | Deletion causes the | |
137 | .I mail | |
138 | program to forget about the message. | |
dcee403d | 139 | This is not irreversible; the message can be |
91d7df00 KM |
140 | .B undeleted |
141 | (\fBu\fR) | |
142 | by giving its number, or the | |
143 | .I mail | |
144 | session can be aborted by giving the | |
145 | .B exit | |
146 | (\fBx\fR) | |
147 | command. | |
148 | Deleted messages will, however, usually disappear never to be seen again. | |
149 | .PP | |
150 | .I "Specifying messages.\ " | |
151 | Commands such as | |
152 | .B print | |
153 | and | |
154 | .B delete | |
dcee403d | 155 | can be given a list of message numbers as arguments to apply |
91d7df00 KM |
156 | to a number of messages at once. |
157 | Thus ``delete 1 2'' deletes messages 1 and 2, while ``delete 1\-5'' | |
158 | deletes messages 1 through 5. | |
159 | The special name ``*'' addresses all messages, and ``$'' addresses | |
160 | the last message; thus the command | |
161 | .B top | |
162 | which prints the first few lines of a message could be used in | |
163 | ``top *'' to print the first few lines of all messages. | |
164 | .PP | |
165 | .I "Replying to or originating mail.\ " | |
166 | You can use the | |
167 | .B reply | |
168 | command to | |
169 | set up a response to a message, sending it back to the | |
170 | person who it was from. | |
dcee403d KM |
171 | Text you then type in, up to an end-of-file, |
172 | defines the contents of the message. | |
91d7df00 KM |
173 | While you are composing a message, |
174 | .I mail | |
175 | treats lines beginning with the character `~' specially. | |
176 | For instance, typing ``~m'' (alone on a line) will place a copy | |
692b0644 | 177 | of the current message into the response right shifting it by a tabstop |
0f642f7e | 178 | (see ``indentprefix'' variable, below). |
91d7df00 KM |
179 | Other escapes will set up subject fields, add and delete recipients |
180 | to the message and allow you to escape to an editor to revise the | |
181 | message or to a shell to run some commands. (These options | |
dcee403d | 182 | are given in the summary below.) |
91d7df00 KM |
183 | .PP |
184 | .I "Ending a mail processing session.\ " | |
185 | You can end a | |
186 | .I mail | |
187 | session with the | |
188 | .B quit | |
189 | (\fBq\fR) | |
190 | command. | |
191 | Messages which have been examined go to your | |
192 | .I mbox | |
193 | file unless they have been deleted in which case they are discarded. | |
194 | Unexamined messages go back to the post office. | |
195 | The | |
196 | .B \-f | |
197 | option causes | |
198 | .I mail | |
199 | to read in the contents of your | |
200 | .I mbox | |
201 | (or the specified file) | |
202 | for processing; when you | |
dcee403d | 203 | .BR quit , |
91d7df00 KM |
204 | .I mail |
205 | writes undeleted messages back to this file. | |
dcee403d KM |
206 | The |
207 | .B \-u | |
208 | flag is a short way of doing | |
209 | ||
210 | .B \-f | |
211 | /usr/spool/mail/user". | |
91d7df00 KM |
212 | .PP |
213 | .I "Personal and systemwide distribution lists.\ " | |
214 | It is also possible to create a personal distribution lists so that, | |
215 | for instance, you can send mail to ``cohorts'' and have it go | |
216 | to a group of people. | |
217 | Such lists can be defined by placing a line like | |
218 | .IP | |
dcee403d | 219 | alias cohorts bill ozalp jkf mark kridle@ucbcory |
91d7df00 KM |
220 | .PP |
221 | in the file \&.mailrc in your home directory. | |
dcee403d | 222 | The current list of such aliases can be displayed with the |
91d7df00 KM |
223 | .B alias |
224 | .B (a) | |
225 | command in | |
dcee403d | 226 | .IR mail . |
91d7df00 KM |
227 | System wide distribution lists can be created by editing |
228 | /usr/lib/aliases, see | |
229 | .IR aliases (5) | |
230 | and | |
dcee403d KM |
231 | .IR sendmail (8); |
232 | these are kept in a different syntax. | |
91d7df00 KM |
233 | In mail you send, personal aliases will be expanded in mail sent |
234 | to others so that they will be able to \fBreply\fR to the recipients. | |
235 | System wide \fIaliases\fR are not expanded when the mail is sent, | |
236 | but any reply returned to the machine will have the system wide | |
237 | alias expanded as all mail goes through | |
dcee403d | 238 | .IR sendmail . |
91d7df00 KM |
239 | .PP |
240 | .I "Network mail (ARPA, UUCP, Berknet)\ " | |
dcee403d KM |
241 | See |
242 | .IR mailaddr(7) | |
243 | for a description of network addresses. | |
91d7df00 KM |
244 | .PP |
245 | .I Mail | |
dcee403d | 246 | has a number of options which can be set in the |
91d7df00 KM |
247 | .I \&.mailrc |
248 | file to alter its behavior; thus ``set askcc'' enables the ``askcc'' | |
249 | feature. (These options are summarized below.) | |
250 | .SH SUMMARY | |
251 | (Adapted from the `Mail Reference Manual') | |
dcee403d | 252 | .PP |
91d7df00 KM |
253 | Each command is typed on a line by itself, and may take arguments |
254 | following the command word. The command need not be typed in its | |
255 | entirety \- the first command which matches the typed prefix is used. | |
dcee403d | 256 | For commands which take message lists as arguments, if no message |
91d7df00 KM |
257 | list is given, then the next message forward which satisfies the |
258 | command's requirements is used. If there are no messages forward of | |
259 | the current message, the search proceeds backwards, and if there are no | |
260 | good messages at all, | |
261 | .I mail | |
262 | types ``No applicable messages'' and | |
263 | aborts the command. | |
264 | .TP 12n | |
265 | .B \- | |
266 | Goes to the previous message and prints it out. If given a numeric | |
267 | argument | |
dcee403d | 268 | .IR n , |
91d7df00 | 269 | goes to the |
dcee403d | 270 | .IR n -th |
91d7df00 KM |
271 | previous message and prints it. |
272 | .TP | |
273 | .B ? | |
274 | Prints a brief summary of commands. | |
275 | .TP | |
276 | .B ! | |
277 | Executes the \s-2UNIX\s0 shell command which follows. | |
278 | .TP | |
dcee403d KM |
279 | .B Print |
280 | (\fBP\fR) | |
281 | Like | |
282 | .B print | |
283 | but also prints out ignored header fields. See also | |
284 | .B print | |
bb04cec6 KM |
285 | , |
286 | .B ignore | |
dcee403d | 287 | and |
bb04cec6 | 288 | .B retain. |
dcee403d KM |
289 | .TP |
290 | .B Reply | |
e7dd39cf | 291 | (\fBR\fR) |
dcee403d KM |
292 | Reply to originator. Does not reply to other |
293 | recipients of the original message. | |
294 | .TP | |
295 | .B Type | |
e7dd39cf | 296 | (\fBT\fR) |
dcee403d KM |
297 | Identical to the |
298 | .B Print | |
299 | command. | |
300 | .TP | |
91d7df00 KM |
301 | .B alias |
302 | (\fBa\fR) With no arguments, prints out all currently-defined aliases. With one | |
dcee403d | 303 | argument, prints out that alias. With more than one argument, creates |
692b0644 | 304 | a new alias or changes an old one. |
dcee403d KM |
305 | .TP |
306 | .B alternates | |
307 | (\fBalt\fR) | |
308 | The | |
309 | .B alternates | |
310 | command is useful if you have accounts on several machines. | |
311 | It can be used to inform | |
312 | .I mail | |
313 | that the listed addresses are really you. When you | |
314 | .B reply | |
315 | to messages, | |
316 | .I mail | |
317 | will not send a copy of the message to any of the addresses | |
318 | listed on the | |
319 | .I alternates | |
320 | list. If the | |
321 | .B alternates | |
322 | command is given with no argument, the current set of alternate | |
323 | names is displayed. | |
91d7df00 KM |
324 | .TP |
325 | .B chdir | |
326 | (\fBc\fR) Changes the user's working directory to that specified, if given. If | |
327 | no directory is given, then changes to the user's login directory. | |
328 | .TP | |
dcee403d KM |
329 | .B copy |
330 | (\fBco\fR) | |
331 | The | |
332 | .B copy | |
333 | command does the same thing that | |
334 | .B save | |
335 | does, except that it does not mark the messages it | |
336 | is used on for deletion when you quit. | |
337 | .TP | |
91d7df00 KM |
338 | .B delete |
339 | (\fBd\fR) Takes a list of messages as argument and marks them all as deleted. | |
340 | Deleted messages will not be saved in | |
dcee403d | 341 | .IR mbox , |
91d7df00 KM |
342 | nor will they be available for most other commands. |
343 | .TP | |
344 | .B dp | |
345 | (also \fBdt\fR) Deletes the current message and prints the next message. | |
346 | If there is no next message, | |
347 | .I mail | |
348 | says ``at EOF.'' | |
349 | .TP | |
350 | .B edit | |
351 | (\fBe\fR) Takes a list of messages and points the text editor at each one in | |
352 | turn. On return from the editor, the message is read back in. | |
353 | .TP | |
354 | .B exit | |
355 | (\fBex\fR or \fBx\fR) Effects an immediate return to the Shell without | |
356 | modifying the user's system mailbox, his | |
357 | .I mbox | |
358 | file, or his edit file in | |
dcee403d KM |
359 | .BR \-f . |
360 | .TP | |
361 | .B file | |
362 | (\fBfi\fR) | |
363 | The same as | |
364 | .BR folder . | |
365 | .TP | |
366 | .B folders | |
367 | List the names of the folders in your folder directory. | |
368 | .TP | |
369 | .B folder | |
370 | (\fBfo\fR) | |
371 | The | |
372 | .B folder | |
373 | command switches to a new mail file or folder. With no | |
374 | arguments, it tells you which file you are currently reading. | |
375 | If you give it an argument, it will write out changes (such | |
376 | as deletions) you have made in the current file and read in | |
377 | the new file. Some special conventions are recognized for | |
378 | the name. # means the previous file, % means your system | |
379 | mailbox, %user means user's system mailbox, & means | |
84931b71 | 380 | your \fImbox\fP file, and +folder means a file in your folder |
dcee403d | 381 | directory. |
91d7df00 KM |
382 | .TP |
383 | .B from | |
384 | (\fBf\fR) Takes a list of messages and prints their message headers. | |
385 | .TP | |
386 | .B headers | |
692b0644 EW |
387 | (\fBh\fR) Lists the current range of headers, which is an 18\-message group. If |
388 | a ``+'' argument is given, then the next 18\-message group is printed, and if | |
389 | a ``\-'' argument is given, the previous 18\-message group is printed. | |
91d7df00 KM |
390 | .TP |
391 | .B help | |
392 | A synonym for ? | |
393 | .TP | |
394 | .B hold | |
395 | (\fBho\fR, also \fBpreserve\fR) Takes a message list and marks each | |
396 | message therein to be saved in the | |
397 | user's system mailbox instead of in | |
dcee403d | 398 | .IR mbox . |
91d7df00 KM |
399 | Does not override the |
400 | .B delete | |
401 | command. | |
402 | .TP | |
dcee403d | 403 | .B ignore |
bb04cec6 KM |
404 | .B N.B.: |
405 | .I Ignore | |
406 | has been superseded by | |
407 | .I retain. | |
408 | .br | |
dcee403d KM |
409 | Add the list of header fields named to the |
410 | .IR "ignored list" . | |
411 | Header fields in the ignore list are not printed | |
412 | on your terminal when you print a message. This | |
413 | command is very handy for suppression of certain machine-generated | |
414 | header fields. The | |
415 | .B Type | |
416 | and | |
417 | .B Print | |
418 | commands can be used to print a message in its entirety, including | |
419 | ignored fields. If | |
420 | .B ignore | |
421 | is executed with no arguments, it lists the current set of | |
422 | ignored fields. | |
423 | .TP | |
91d7df00 KM |
424 | .B mail |
425 | (\fBm\fR) Takes as argument login names and distribution group names and sends | |
426 | mail to those people. | |
427 | .TP | |
dcee403d KM |
428 | .B mbox |
429 | Indicate that a list of messages be sent to | |
430 | .I mbox | |
431 | in your home directory when you quit. This is the default | |
432 | action for messages if you do | |
433 | .I not | |
434 | have the | |
435 | .I hold | |
436 | option set. | |
437 | .TP | |
91d7df00 KM |
438 | .B next |
439 | (\fBn\fR like \fB+\fR or CR) Goes to the next message in sequence and types it. | |
440 | With an argument list, types the next matching message. | |
441 | .TP | |
442 | .B preserve | |
dcee403d | 443 | (\fBpre\fR) |
91d7df00 | 444 | A synonym for |
dcee403d | 445 | .BR hold . |
91d7df00 KM |
446 | .TP |
447 | .B print | |
dcee403d KM |
448 | (\fBp\fR) |
449 | Takes a message list and types out each message on the user's terminal. | |
91d7df00 KM |
450 | .TP |
451 | .B quit | |
452 | (\fBq\fR) Terminates the session, saving all undeleted, unsaved messages in | |
453 | the user's | |
454 | .I mbox | |
455 | file in his login directory, preserving all messages marked with | |
456 | .B hold | |
457 | or | |
458 | .B preserve | |
459 | or never referenced | |
460 | in his system mailbox, and removing all other messages from his system | |
461 | mailbox. If new mail has arrived during the session, the message | |
462 | ``You have new mail'' is given. If given while editing a | |
463 | mailbox file with the | |
464 | .B \-f | |
465 | flag, then the edit file is rewritten. A return to the Shell is | |
466 | effected, unless the rewrite of edit file fails, in which case the user | |
467 | can escape with the | |
468 | .B exit | |
469 | command. | |
470 | .TP | |
471 | .B reply | |
dcee403d KM |
472 | (\fBr\fR) |
473 | Takes a message list and sends mail to the sender and all | |
474 | recipients of the specified message. | |
475 | The default message must not be deleted. | |
91d7df00 KM |
476 | .TP |
477 | .B respond | |
478 | A synonym for | |
dcee403d | 479 | .BR reply . |
91d7df00 | 480 | .TP |
bb04cec6 KM |
481 | .B retain |
482 | Add the list of header fields named to the | |
483 | .IR "retained list" . | |
484 | Only the header fields in the retain list | |
485 | are shown on your terminal when you print a message. | |
486 | All other header fields are suppressed. | |
487 | The | |
488 | .B Type | |
489 | and | |
490 | .B Print | |
491 | commands can be used to print a message in its entirety. | |
492 | If | |
493 | .B retain | |
494 | is executed with no arguments, it lists the current set of | |
495 | retained fields. | |
496 | .TP | |
91d7df00 KM |
497 | .B save |
498 | (\fBs\fR) Takes a message list and a filename and appends each message in | |
499 | turn to the end of the file. The filename in quotes, followed by the line | |
500 | count and character count is echoed on the user's terminal. | |
501 | .TP | |
502 | .B set | |
503 | (\fBse\fR) With no arguments, prints all variable values. Otherwise, sets | |
504 | option. Arguments are of the form | |
505 | ``option=value'' | |
bb04cec6 | 506 | (no space before or after =) or |
91d7df00 | 507 | ``option.'' |
692b0644 | 508 | Quotation marks may be placed around any part of the assignment statement to |
0f642f7e | 509 | quote blanks or tabs, i.e. ``set indentprefix="-> "''. |
91d7df00 | 510 | .TP |
02c3f688 EW |
511 | .B saveignore |
512 | \fBSaveignore\fP is to \fBsave\fP what \fBignore\fP is to \fBprint\fP | |
513 | and \fBtype\fP. Header fields thus marked are filtered out when | |
84931b71 | 514 | saving a message by \fBsave\fP or when automatically saving to \fImbox\fP. |
02c3f688 EW |
515 | .TP |
516 | .B saveretain | |
517 | \fBSaveretain\fP is to \fBsave\fP what \fBretain\fP is to \fBprint\fP | |
518 | and \fBtype\fP. Header fields thus marked are the only ones saved | |
84931b71 EW |
519 | with a message when saving by \fBsave\fP or when automatically saving to |
520 | \fImbox\fP. | |
02c3f688 EW |
521 | \fBSaveretain\fP overrides \fBsaveignore\fP. |
522 | .TP | |
91d7df00 KM |
523 | .B shell |
524 | (\fBsh\fR) Invokes an interactive version of the shell. | |
525 | .TP | |
526 | .B size | |
527 | Takes a message list and prints out the size in characters of each | |
528 | message. | |
529 | .TP | |
dcee403d KM |
530 | .B source |
531 | (\fBso\fR) | |
532 | The | |
533 | .B source | |
534 | command reads | |
535 | .I mail | |
536 | commands from a file. | |
537 | .TP | |
91d7df00 KM |
538 | .B top |
539 | Takes a message list and prints the top few lines of each. The number of | |
540 | lines printed is controlled by the variable | |
541 | .B toplines | |
542 | and defaults to five. | |
543 | .TP | |
544 | .B type | |
545 | (\fBt\fR) A synonym for | |
dcee403d | 546 | .BR print . |
91d7df00 KM |
547 | .TP |
548 | .B unalias | |
549 | Takes a list of names defined by | |
550 | .B alias | |
551 | commands and discards the remembered groups of users. The group names | |
552 | no longer have any significance. | |
553 | .TP | |
554 | .B undelete | |
634278dc | 555 | (\fBu\fR) Takes a message list and marks each message as |
91d7df00 KM |
556 | .I not |
557 | being deleted. | |
558 | .TP | |
634278dc S |
559 | .B unread |
560 | (\fBU\fR) Takes a message list and marks each message as | |
561 | .I not | |
562 | having been read. | |
563 | .TP | |
91d7df00 KM |
564 | .B unset |
565 | Takes a list of option names and discards their remembered values; | |
566 | the inverse of | |
dcee403d | 567 | .BR set . |
91d7df00 KM |
568 | .TP |
569 | .B visual | |
570 | (\fBv\fR) Takes a message list and invokes the display editor on each message. | |
571 | .TP | |
572 | .B write | |
b3f2d791 S |
573 | (\fBw\fR) Similar to |
574 | .BR save , | |
575 | except that | |
576 | .I only | |
577 | the message body (\fIwithout\fP the header) is saved. | |
578 | Extremely useful for such tasks as sending and receiving source | |
579 | program text over the message system. | |
91d7df00 KM |
580 | .TP |
581 | .B xit | |
582 | (\fBx\fR) A synonym for | |
dcee403d KM |
583 | .BR exit . |
584 | .TP | |
585 | .B z | |
586 | .I Mail | |
587 | presents message headers in windowfuls as described under the | |
588 | .B headers | |
589 | command. You can move | |
590 | .IR mail 's | |
591 | attention forward to the next window with the | |
592 | .B z | |
593 | command. Also, you can move to the previous window by using | |
594 | .BR z\- . | |
91d7df00 KM |
595 | .PP |
596 | Here is a summary of the tilde escapes, | |
597 | which are used when composing messages to perform | |
598 | special functions. Tilde escapes are only recognized at the beginning | |
599 | of lines. The name | |
600 | ``tilde\ escape'' | |
601 | is somewhat of a misnomer since the actual escape character can be set | |
602 | by the option | |
603 | .B escape. | |
604 | .TP 12n | |
dcee403d | 605 | .BR ~! command |
91d7df00 KM |
606 | Execute the indicated shell command, then return to the message. |
607 | .TP | |
cb530a2d KM |
608 | \fB~b\fR name ... |
609 | Add the given names to the list of carbon copy recipients but do not make | |
610 | the names visible in the Cc: line ("blind" carbon copy). | |
611 | .TP | |
91d7df00 KM |
612 | \fB~c\fR name ... |
613 | Add the given names to the list of carbon copy recipients. | |
614 | .TP | |
615 | .B ~d | |
616 | Read the file ``dead.letter'' from your home directory into the message. | |
617 | .TP | |
618 | .B ~e | |
619 | Invoke the text editor on the message collected so far. After the | |
620 | editing session is finished, you may continue appending text to the | |
621 | message. | |
622 | .TP | |
dcee403d KM |
623 | \fB~f\fR messages |
624 | Read the named messages into the message being sent. | |
625 | If no messages are specified, read in the current message. | |
84931b71 EW |
626 | Message headers currently being ignored (by the \fIignore\fP or \fIretain\fP |
627 | command) are not included. | |
628 | .TP | |
629 | \fB~F\fR messages | |
630 | Identical to \fB~f\fP, except all message headers are included. | |
dcee403d | 631 | .TP |
91d7df00 KM |
632 | .B ~h |
633 | Edit the message header fields by typing each one in turn and allowing | |
634 | the user to append text to the end or modify the field by using the | |
635 | current terminal erase and kill characters. | |
636 | .TP | |
637 | \fB~m\fR messages | |
0f642f7e EW |
638 | Read the named messages into the message being sent, indented by a |
639 | tab or by the value of \fIindentprefix\fP. If no messages are specified, | |
84931b71 EW |
640 | read the current message. |
641 | Message headers currently being ignored (by the \fIignore\fP or \fIretain\fP | |
642 | command) are not included. | |
643 | .TP | |
644 | \fB~M\fR messages | |
645 | Identical to \fB~m\fP, except all message headers are included. | |
91d7df00 KM |
646 | .TP |
647 | .B ~p | |
648 | Print out the message collected so far, prefaced by the message header | |
649 | fields. | |
650 | .TP | |
651 | .B ~q | |
652 | Abort the message being sent, copying the message to | |
653 | ``dead.letter'' | |
654 | in your home directory if | |
655 | .B save | |
656 | is set. | |
657 | .TP | |
658 | \fB~r\fR filename | |
659 | Read the named file into the message. | |
660 | .TP | |
661 | \fB~s\fR string | |
662 | Cause the named string to become the current subject field. | |
663 | .TP | |
664 | \fB~t\fR name ... | |
665 | Add the given names to the direct recipient list. | |
666 | .TP | |
667 | .B ~v | |
668 | Invoke an alternate editor (defined by the VISUAL option) on the | |
669 | message collected so far. Usually, the alternate editor will be a | |
670 | screen editor. After you quit the editor, you may resume appending | |
671 | text to the end of your message. | |
672 | .TP | |
673 | \fB~w\fR filename | |
674 | Write the message onto the named file. | |
675 | .TP | |
676 | \fB~\||\|\fRcommand | |
677 | Pipe the message through the command as a filter. If the command gives | |
678 | no output or terminates abnormally, retain the original text of the | |
679 | message. The command | |
680 | .IR fmt (1) | |
681 | is often used as | |
682 | .I command | |
683 | to rejustify the message. | |
684 | .TP | |
84931b71 EW |
685 | \fB~:\fR mail-command |
686 | Execute the given mail command. Not all commands, however, are allowed. | |
687 | .TP | |
dcee403d | 688 | .BR ~~ string |
91d7df00 KM |
689 | Insert the string of text in the message prefaced by a single ~. If |
690 | you have changed the escape character, then you should double | |
691 | that character in order to send it. | |
692 | .PP | |
693 | Options are controlled via the | |
694 | .B set | |
695 | and | |
696 | .B unset | |
697 | commands. Options may be either binary, in which case it is only | |
bfe02f44 | 698 | significant to see whether they are set or not; or string, in which |
91d7df00 KM |
699 | case the actual value is of interest. |
700 | The binary options include the following: | |
701 | .TP 15n | |
702 | .B append | |
703 | Causes messages saved in | |
704 | .I mbox | |
705 | to be appended to the end rather than prepended. | |
84931b71 | 706 | This should always be set (perhaps in /usr/lib/Mail.rc). |
91d7df00 KM |
707 | .TP |
708 | .B ask | |
709 | Causes | |
710 | .I mail | |
711 | to prompt you for the subject of each message you send. If | |
712 | you respond with simply a newline, no subject field will be sent. | |
713 | .TP | |
714 | .B askcc | |
715 | Causes you to be prompted for additional carbon copy recipients at the | |
716 | end of each message. Responding with a newline indicates your | |
717 | satisfaction with the current list. | |
718 | .TP | |
719 | .B autoprint | |
720 | Causes the | |
721 | .B delete | |
722 | command to behave like | |
723 | .B dp | |
724 | \- thus, after deleting a message, the next one will be typed | |
725 | automatically. | |
726 | .TP | |
dcee403d KM |
727 | .B debug |
728 | Setting the binary option | |
729 | .I debug | |
730 | is the same as specifying | |
731 | .B \-d | |
732 | on the command line and causes | |
733 | .I mail | |
734 | to output all sorts of information useful for debugging | |
735 | .IR mail . | |
736 | .TP | |
737 | .B dot | |
738 | The binary option | |
739 | .I dot | |
740 | causes | |
741 | .I mail | |
742 | to interpret a period alone on a line as the terminator | |
743 | of a message you are sending. | |
744 | .TP | |
745 | .B hold | |
746 | This option is used to hold messages in the system mailbox | |
747 | by default. | |
748 | .TP | |
91d7df00 KM |
749 | .B ignore |
750 | Causes interrupt signals from your terminal to be ignored and echoed as | |
751 | @'s. | |
752 | .TP | |
dcee403d KM |
753 | .B ignoreeof |
754 | An option related to | |
755 | .I dot | |
756 | is | |
757 | .I ignoreeof | |
758 | which makes | |
759 | .I mail | |
760 | refuse to accept a control-d as the end of a message. | |
761 | .I Ignoreeof | |
762 | also applies to | |
763 | .I mail | |
764 | command mode. | |
765 | .TP | |
91d7df00 KM |
766 | .B metoo |
767 | Usually, when a group is expanded that contains the sender, the sender | |
768 | is removed from the expansion. Setting this option causes the sender | |
769 | to be included in the group. | |
770 | .TP | |
84931b71 EW |
771 | .B noheader |
772 | Setting the option | |
773 | .I noheader | |
774 | is the same as giving the | |
775 | .B \-N | |
776 | flag on the command line. | |
777 | .TP | |
dcee403d KM |
778 | .B nosave |
779 | Normally, when you abort a message with two \s-2RUBOUT\s0, | |
780 | .I mail | |
781 | copies the partial letter to the file ``dead.letter'' | |
782 | in your home directory. Setting the binary option | |
783 | .I nosave | |
784 | prevents this. | |
785 | .TP | |
634278dc S |
786 | .B Replyall |
787 | Reverses the sense of | |
788 | .I reply | |
789 | and | |
790 | .I Reply | |
791 | commands. | |
792 | .TP | |
91d7df00 KM |
793 | .B quiet |
794 | Suppresses the printing of the version when first invoked. | |
795 | .TP | |
dcee403d KM |
796 | .B verbose |
797 | Setting the option | |
798 | .I verbose | |
799 | is the same as using the | |
800 | .B \-v | |
801 | flag on the command line. When mail runs in verbose mode, | |
802 | the actual delivery of messages is displayed on he users | |
803 | terminal. | |
91d7df00 KM |
804 | .PP |
805 | The following options have string values: | |
806 | .TP 15n | |
807 | EDITOR | |
808 | Pathname of the text editor to use in the | |
809 | .B edit | |
810 | command and ~e escape. If not defined, then a default editor is used. | |
811 | .TP | |
84931b71 EW |
812 | LISTER |
813 | Pathname of the directory lister to use in the | |
814 | .B folders | |
815 | command. Default is /bin/ls. | |
816 | .TP | |
634278dc S |
817 | PAGER |
818 | Pathname of the program to use in the | |
819 | .B more | |
820 | command or when | |
821 | .I crt | |
692b0644 EW |
822 | variable is set. The default paginator |
823 | .I more(1) | |
824 | is used if this option is not defined. | |
634278dc | 825 | .TP |
91d7df00 KM |
826 | SHELL |
827 | Pathname of the shell to use in the | |
828 | .B ! | |
829 | command and the ~! escape. A default shell is used if this option is | |
830 | not defined. | |
831 | .TP | |
832 | VISUAL | |
833 | Pathname of the text editor to use in the | |
834 | .B visual | |
835 | command and ~v escape. | |
836 | .TP | |
dcee403d KM |
837 | .B crt |
838 | The valued option | |
839 | .I crt | |
840 | is used as a threshold to determine how long a message must | |
841 | be before | |
634278dc | 842 | .B PAGER |
84931b71 EW |
843 | is used to read it. If \fIcrt\fP is set without a value, |
844 | then the height of the terminal screen stored in the system | |
845 | is used to compute the threshold (see \fIstty(1)\fP). | |
dcee403d | 846 | .TP |
91d7df00 KM |
847 | .B escape |
848 | If defined, the first character of this option gives the character to | |
849 | use in the place of ~ to denote escapes. | |
850 | .TP | |
dcee403d KM |
851 | .B folder |
852 | The name of the directory to use for storing folders of | |
853 | messages. If this name begins with a `/', | |
854 | .I mail | |
855 | considers it to be an absolute pathname; otherwise, the | |
856 | folder directory is found relative to your home directory. | |
857 | .TP | |
6504a3f0 | 858 | .B MBOX |
84931b71 EW |
859 | The name of the \fImbox\fP file. It can be the name of a folder. |
860 | The default is ``mbox'' in the user's home directory. | |
861 | .TP | |
91d7df00 KM |
862 | .B record |
863 | If defined, gives the pathname of the file used to record all outgoing | |
864 | mail. If not defined, then outgoing mail is not so saved. | |
865 | .TP | |
0f642f7e EW |
866 | .B indentprefix |
867 | String used by the ``~m'' tilde escape for indenting messages, in place of | |
692b0644 EW |
868 | the normal tab character (^I). Be sure to quote the value if it contains |
869 | spaces or tabs. | |
870 | .TP | |
91d7df00 KM |
871 | .B toplines |
872 | If defined, gives the number of lines of a message to be printed out | |
873 | with the | |
874 | .B top | |
875 | command; normally, the first five lines are printed. | |
876 | .SH FILES | |
877 | .if n .ta 2.5i | |
878 | .if t .ta 1.8i | |
879 | /usr/spool/mail/* post office | |
880 | .br | |
881 | ~/mbox your old mail | |
882 | .br | |
883 | ~/.mailrc file giving initial mail commands | |
884 | .br | |
84931b71 | 885 | /tmp/R* temporary files |
91d7df00 KM |
886 | .br |
887 | /usr/lib/Mail.help* help files | |
888 | .br | |
889 | /usr/lib/Mail.rc system initialization file | |
91d7df00 | 890 | .SH "SEE ALSO" |
56ecde3b | 891 | binmail(1), fmt(1), newaliases(1), vacation(1), aliases(5), |
dcee403d | 892 | mailaddr(7), sendmail(8) |
91d7df00 KM |
893 | .br |
894 | `The Mail Reference Manual' | |
dcee403d | 895 | .SH BUGS |
84931b71 | 896 | There are some flags that are not documented here. Most are |
dcee403d KM |
897 | not useful to the general user. |
898 | .br | |
899 | Usually, | |
900 | .I mail | |
901 | is just a link to | |
902 | .IR Mail , | |
903 | which can be confusing. |