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