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