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