xref: /original-bsd/usr.bin/mail/mail.1 (revision d54be081)
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.18 (Berkeley) 06/19/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
477Add the list of header fields named to the
478.Ar ignored list
479Header fields in the ignore list are not printed
480on your terminal when you print a message. This
481command is very handy for suppression of certain machine-generated
482header fields. The
483.Ic Type
484and
485.Ic Print
486commands can be used to print a message in its entirety, including
487ignored fields. If
488.Ic ignore
489is executed with no arguments, it lists the current set of
490ignored fields.
491.Tp Ic mail
492.Cx \&(
493.Ic m
494.Cx \&)
495.Cx
496Takes as argument login names and distribution group names and sends
497mail to those people.
498.Tp Ic mbox
499Indicate that a list of messages be sent to
500.Ic mbox
501in your home directory when you quit. This is the default
502action for messages if you do
503.Em not
504have the
505.Ic hold
506option set.
507.Tp Ic next
508.Cx \&(
509.Ic n
510.Cx
511like
512.Ic \&+
513or CR) Goes to the next message in sequence and types it.
514With an argument list, types the next matching message.
515.Tp Ic preserve
516.Cx \&(
517.Ic pre
518.Cx \&)
519.Cx
520A synonym for
521.Ic hold  .
522.Tp Ic print
523.Cx \&(
524.Ic p
525.Cx \&)
526.Cx
527Takes a message list and types out each message on the user's terminal.
528.Tp Ic quit
529.Cx \&(
530.Ic q
531.Cx \&)
532.Cx
533Terminates the session, saving all undeleted, unsaved messages in
534the user's
535.Ar mbox
536file in his login directory, preserving all messages marked with
537.Ic hold
538or
539.Ic preserve
540or never referenced
541in his system mailbox, and removing all other messages from his system
542mailbox.  If new mail has arrived during the session, the message
543.Dq Li You have new mail
544is given.  If given while editing a
545mailbox file with the
546.Fl f
547flag, then the edit file is rewritten.  A return to the Shell is
548effected, unless the rewrite of edit file fails, in which case the user
549can escape with the
550.Ic exit
551command.
552.Tp Ic reply
553.Cx \&(
554.Ic r
555.Cx \&)
556.Cx
557Takes a message list and sends mail to the sender and all
558recipients of the specified message.
559The default message must not be deleted.
560.Tp Ic respond
561A synonym for
562.Ic reply  .
563.Tp Ic retain
564Add the list of header fields named to the
565.Ar retained list
566Only the header fields in the retain list
567are shown on your terminal when you print a message.
568All other header fields are suppressed.
569The
570.Ic Type
571and
572.Ic Print
573commands can be used to print a message in its entirety.
574If
575.Ic retain
576is executed with no arguments, it lists the current set of
577retained fields.
578.Tp Ic save
579.Cx \&(
580.Ic s
581.Cx \&)
582.Cx
583Takes a message list and a filename and appends each message in
584turn to the end of the file.  The filename in quotes, followed by the line
585count and character count is echoed on the user's terminal.
586.Tp Ic set
587.Cx \&(
588.Ic se
589.Cx \&)
590.Cx
591With no arguments, prints all variable values.  Otherwise, sets
592option.  Arguments are of the form
593.Ar option=value
594(no space before or after =) or
595.Ar option .
596Quotation marks may be placed around any part of the assignment statement to
597quote blanks or tabs, i.e.
598.Dq Li set indentprefix="->"
599.Tp Ic saveignore
600.Ic Saveignore
601is to
602.Ic save
603what
604.Ic ignore
605is to
606.Ic print
607and
608.Ic type  .
609Header fields thus marked are filtered out when
610saving a message by
611.Ic save
612or when automatically saving to
613.Ar mbox  .
614.Tp Ic saveretain
615.Ic Saveretain
616is to
617.Ic save
618what
619.Ic retain
620is to
621.Ic print
622and
623.Ic type  .
624Header fields thus marked are the only ones saved
625with a message when saving by
626.Ic save
627or when automatically saving to
628.Ar mbox  .
629.Ic Saveretain
630overrides
631.Ic saveignore  .
632.Tp Ic shell
633.Cx \&(
634.Ic sh
635.Cx \&)
636.Cx
637Invokes an interactive version of the shell.
638.Tp Ic size
639Takes a message list and prints out the size in characters of each
640message.
641.Tp Ic source
642.Cx \&(
643.Ic so
644.Cx \&)
645The
646.Ic source
647command reads
648.Nm mail
649commands from a file.
650.Tp Ic top
651Takes a message list and prints the top few lines of each.  The number of
652lines printed is controlled by the variable
653.Ic toplines
654and defaults to five.
655.Tp Ic type
656.Cx \&(
657.Ic t
658.Cx \&)
659.Cx
660A synonym for
661.Ic print  .
662.Tp Ic unalias
663Takes a list of names defined by
664.Ic alias
665commands and discards the remembered groups of users.  The group names
666no longer have any significance.
667.Tp Ic undelete
668.Cx \&(
669.Ic u
670.Cx \&)
671.Cx
672Takes a message list and marks each message as
673.Ic not
674being deleted.
675.Tp Ic unread
676.Cx \&(
677.Ic U
678.Cx \&)
679.Cx
680Takes a message list and marks each message as
681.Ic not
682having been read.
683.Tp Ic unset
684Takes a list of option names and discards their remembered values;
685the inverse of
686.Ic set  .
687.Tp Ic visual
688.Cx \&(
689.Ic v
690.Cx \&)
691.Cx
692Takes a message list and invokes the display editor on each message.
693.Tp Ic write
694.Cx \&(
695.Ic w
696.Cx \&)
697.Cx
698Similar to
699.Ic save  ,
700except that
701.Ic only
702the message body
703.Cx \&(
704.Ar without
705.Cx
706the header) is saved.
707Extremely useful for such tasks as sending and receiving source
708program text over the message system.
709.Tp Ic xit
710.Cx \&(
711.Ic x
712.Cx \&)
713.Cx
714A synonym for
715.Ic exit  .
716.Tp Ic z
717.Nm Mail
718presents message headers in windowfuls as described under the
719.Ic headers
720command. You can move
721.Cx Nm mail
722.Cx 's
723.Cx
724attention forward to the next window with the
725.Ic \&z
726command. Also, you can move to the previous window by using
727.Ic \&z\&\-  .
728.Tp
729.Ss Tilde/Escapes
730.Pp
731Here is a summary of the tilde escapes,
732which are used when composing messages to perform
733special functions.  Tilde escapes are only recognized at the beginning
734of lines.  The name
735.Dq Em tilde\ escape
736is somewhat of a misnomer since the actual escape character can be set
737by the option
738.Ic escape .
739.Tw Ds
740.Tp Cx Ic \&~!
741.Ar command
742.Cx
743Execute the indicated shell command, then return to the message.
744.Tp Cx Ic \&~b
745.Ar name ...
746.Cx
747Add the given names to the list of carbon copy recipients but do not make
748the names visible in the Cc: line ("blind" carbon copy).
749.Tp Cx Ic \&~c
750.Ar name ...
751.Cx
752Add the given names to the list of carbon copy recipients.
753.Tp Ic \&~d
754Read the file
755.Dq Pa dead.letter
756from your home directory into the message.
757.Tp Ic \&~e
758Invoke the text editor on the message collected so far.  After the
759editing session is finished, you may continue appending text to the
760message.
761.Tp Cx Ic \&~f
762.Ar messages
763.Cx
764Read the named messages into the message being sent.
765If no messages are specified, read in the current message.
766Message headers currently being ignored (by the
767.Ic ignore
768or
769.Ic retain
770command) are not included.
771.Tp Cx Ic \&~F
772.Ar messages
773.Cx
774Identical to
775.Ic \&~f ,
776except all message headers are included.
777.Tp Ic \&~h
778Edit the message header fields by typing each one in turn and allowing
779the user to append text to the end or modify the field by using the
780current terminal erase and kill characters.
781.Tp Cx Ic \&~m
782.Ar messages
783.Cx
784Read the named messages into the message being sent, indented by a
785tab or by the value of
786.Ar indentprefix  .
787If no messages are specified,
788read the current message.
789Message headers currently being ignored (by the
790.Ic ignore
791or
792.Ic retain
793command) are not included.
794.Tp Cx Ic \&~M
795.Ar messages
796.Cx
797Identical to
798.Ic \&~m ,
799except all message headers are included.
800.Tp Ic \&~p
801Print out the message collected so far, prefaced by the message header
802fields.
803.Tp Ic \&~q
804Abort the message being sent, copying the message to
805.Dq Pa dead.letter
806in your home directory if
807.Ic save
808is set.
809.Tp Cx Ic \&~r
810.Ar filename
811.Cx
812Read the named file into the message.
813.Tp Cx Ic \&~s
814.Ar string
815.Cx
816Cause the named string to become the current subject field.
817.Tp Cx Ic \&~\&t
818.Ar name ...
819.Cx
820Add the given names to the direct recipient list.
821.\" This .br should have to be here
822.br
823.Tp Ic \&~\&v
824Invoke an alternate editor (defined by the VISUAL option) on the
825message collected so far.  Usually, the alternate editor will be a
826screen editor.  After you quit the editor, you may resume appending
827text to the end of your message.
828.Tp Cx Ic \&~w
829.Ar filename
830.Cx
831Write the message onto the named file.
832.Tp Cx Ic \&~\&|
833.Ar command
834.Cx
835Pipe the message through the command as a filter.  If the command gives
836no output or terminates abnormally, retain the original text of the
837message.  The command
838.Xr fmt  1
839is often used as
840.Ic command
841to rejustify the message.
842.Tp Cx Ic \&~:
843.Ar mail-command
844.Cx
845Execute the given mail command.  Not all commands, however, are allowed.
846.Tp Cx Ic \&~~
847.Ar string
848.Cx
849Insert the string of text in the message prefaced by a single ~.  If
850you have changed the escape character, then you should double
851that character in order to send it.
852.Tp
853.Ss Mail Options
854Options are controlled via
855.Ic set
856and
857.Ic unset
858commands.  Options may be either binary, in which case it is only
859significant to see whether they are set or not; or string, in which
860case the actual value is of interest.
861The binary options include the following:
862.Tp Ar append
863Causes messages saved in
864.Ar mbox
865to be appended to the end rather than prepended.
866This should always be set (perhaps in
867.Pa /usr/share/misc/Mail.rc ) .
868.Tp Ar ask
869Causes
870.Nm mail
871to prompt you for the subject of each message you send.  If
872you respond with simply a newline, no subject field will be sent.
873.Tp Ar askcc
874Causes you to be prompted for additional carbon copy recipients at the
875end of each message.  Responding with a newline indicates your
876satisfaction with the current list.
877.Tp Ar autoprint
878Causes the
879.Ic delete
880command to behave like
881.Ic dp
882\- thus, after deleting a message, the next one will be typed
883automatically.
884.Tp Ar debug
885Setting the binary option
886.Ar debug
887is the same as specifying
888.Fl d
889on the command line and causes
890.Nm mail
891to output all sorts of information useful for debugging
892.Nm mail  .
893.Tp Ar dot
894The binary option
895.Ar dot
896causes
897.Nm mail
898to interpret a period alone on a line as the terminator
899of a message you are sending.
900.Tp Ar hold
901This option is used to hold messages in the system mailbox
902by default.
903.Tp Ar ignore
904Causes interrupt signals from your terminal to be ignored and echoed as
905@'s.
906.Tp Ar ignoreeof
907An option related to
908.Ar dot
909is
910.Ar ignoreeof
911which makes
912.Nm mail
913refuse to accept a control-d as the end of a message.
914.Ar Ignoreeof
915also applies to
916.Nm mail
917command mode.
918.Tp Ar metoo
919Usually, when a group is expanded that contains the sender, the sender
920is removed from the expansion.  Setting this option causes the sender
921to be included in the group.
922.Tp Ar noheader
923Setting the option
924.Ar noheader
925is the same as giving the
926.Fl N
927flag on the command line.
928.Tp Ar nosave
929Normally, when you abort a message with two
930.Li RUBOUT
931(erase or delete)
932.Nm mail
933copies the partial letter to the file
934.Dq Pa dead.letter
935in your home directory. Setting the binary option
936.Ar nosave
937prevents this.
938.Tp Ar Replyall
939Reverses the sense of
940.Ic reply
941and
942.Ic Reply
943commands.
944.Tp Ar quiet
945Suppresses the printing of the version when first invoked.
946.Tp Ar verbose
947Setting the option
948.Ar verbose
949is the same as using the
950.Fl v
951flag on the command line. When mail runs in verbose mode,
952the actual delivery of messages is displayed on he users
953terminal.
954.Tp
955.Ss Option String Values
956.Tw Va
957.Tp Va EDITOR
958Pathname of the text editor to use in the
959.Ic edit
960command and
961.Ic \&~e
962escape.  If not defined, then a default editor is used.
963.Tp Va LISTER
964Pathname of the directory lister to use in the
965.Ic folders
966command.  Default is
967.Pa /bin/ls .
968.Tp Va PAGER
969Pathname of the program to use in the
970.Ic more
971command or when
972.Ic crt
973variable is set.  The default paginator
974.Xr more 1
975is used if this option is not defined.
976.Tp Va SHELL
977Pathname of the shell to use in the
978.Ic \&!
979command and the
980.Ic \&~!
981escape.  A default shell is used if this option is
982not defined.
983.Tp Va VISUAL
984Pathname of the text editor to use in the
985.Ic visual
986command and
987.Ic \&~v
988escape.
989.Tp Va crt
990The valued option
991.Va crt
992is used as a threshold to determine how long a message must
993be before
994.Va PAGER
995is used to read it.  If
996.Va crt
997is set without a value,
998then the height of the terminal screen stored in the system
999is used to compute the threshold (see
1000.Xr stty 1 ) .
1001.Tp Ar escape
1002If defined, the first character of this option gives the character to
1003use in the place of ~ to denote escapes.
1004.Tp Ar folder
1005The name of the directory to use for storing folders of
1006messages. If this name begins with a `/',
1007.Nm mail
1008considers it to be an absolute pathname; otherwise, the
1009folder directory is found relative to your home directory.
1010.Tp Ar MBOX
1011The name of the
1012.Ar mbox
1013file.  It can be the name of a folder.
1014The default is
1015.Dq Li mbox
1016in the user's home directory.
1017.Tp Ar record
1018If defined, gives the pathname of the file used to record all outgoing
1019mail.  If not defined, then outgoing mail is not so saved.
1020.Tp Ar indentprefix
1021String used by the ``~m'' tilde escape for indenting messages, in place of
1022the normal tab character (^I).  Be sure to quote the value if it contains
1023spaces or tabs.
1024.Tp Ar toplines
1025If defined, gives the number of lines of a message to be printed out
1026with the
1027.Ic top
1028command; normally, the first five lines are printed.
1029.Tp
1030.Sh ENVIRONMENT
1031.Nm Mail
1032utilizes the
1033.Ev HOME
1034and
1035.Ev USER
1036environment variables.
1037.Sh FILES
1038.Dw /usr/share/misc/Mail.help*
1039.Di L
1040.Dp Pa /var/spool/mail/*
1041post office
1042.Dp ~/mbox
1043your old mail
1044.Dp ~/.mailrc
1045file giving initial mail commands
1046.Dp Pa /tmp/R*
1047temporary files
1048.Dp Pa /usr/share/misc/Mail.help*
1049help files
1050.Dp Pa /usr/share/misc/Mail.rc
1051system initialization file
1052.Dp
1053.Sh SEE ALSO
1054.Xr fmt 1 ,
1055.Xr newaliases 1 ,
1056.Xr vacation 1 ,
1057.Xr aliases 5 ,
1058.Xr mailaddr 7 ,
1059.Xr sendmail 8
1060and
1061.Em The Mail Reference Manual .
1062.Sh HISTORY
1063A
1064.Nm mail
1065command
1066appeared in Version 6 AT&T UNIX.
1067This man page is derived from
1068.Em The Mail Reference Manual
1069originally written by Kurt Shoens.
1070.Sh BUGS
1071There are some flags that are not documented here. Most are
1072not useful to the general user.
1073.Pp
1074Usually,
1075.Nm mail
1076is just a link to
1077.Nm Mail  ,
1078which can be confusing.
1079