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