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