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