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