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