Annotation of 43BSDReno/usr.bin/mail/mail.1, revision 1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.