[BACK]Return to mail.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Annotation of src/usr.bin/mail/mail.1, Revision 1.2

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