1 .\" Copyright (c) 1980, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)mail5.nr 8.1 (Berkeley) 6/8/93
36 .sh 1 "Additional features"
38 This section describes some additional commands useful for
39 reading your mail, setting options, and handling lists of messages.
44 commands accept a list of messages as an argument.
49 described in section 2,
52 command, which prints the message headers associated with the
53 message list passed to it.
56 command is particularly useful in conjunction with some of the
57 message list features described below.
61 consists of a list of message numbers, ranges, and names,
62 separated by spaces or tabs. Message numbers may be either
63 decimal numbers, which directly specify messages, or one of the
69 to specify the first relevant, current, or last
70 relevant message, respectively.
72 here means, for most commands
80 A range of messages consists of two message numbers (of the form
81 described in the previous paragraph) separated by a dash.
82 Thus, to print the first four messages, use
86 and to print all the messages from the current message to the last
94 is a user name. The user names given in the message list are
95 collected together and each message selected by other means
96 is checked to make sure it was sent by one of the named users.
97 If the message consists entirely of user names, then every
98 message sent by one of those users that is
100 (in the sense described earlier)
101 is selected. Thus, to print every message sent to you by
108 As a shorthand notation, you can specify simply
117 prints all undeleted messages,
121 deletes all undeleted messages, and
125 undeletes all deleted messages.
127 You can search for the presence of a word in subject lines with
129 For example, to print the headers of all messages that contain the
136 Note that subject searching ignores upper/lower case differences.
137 .sh 2 "List of commands"
139 This section describes all the
141 commands available when
146 command goes to the previous message and prints it. The
148 command may be given a decimal number
150 as an argument, in which case the
152 previous message is gone to and printed.
154 Prints a brief summary of commands.
156 Used to preface a command to be executed by the shell.
157 .ip "\fBPrint\fP\ \ "
160 but also print out ignored header fields. See also
161 \fBprint\fP, \fBignore\fP and \fBretain\fP.
162 \fBPrint\fP can be abbreviated to \fBP\fP.
163 .ip "\fBReply\fP or \fBRespond\fP\ \ "
164 Note the capital \fBR\fP in the name.
165 Frame a reply to a one or more messages.
166 The reply (or replies if you are using this on multiple messages)
167 will be sent ONLY to the person who sent you the message
168 (respectively, the set of people who sent the messages you are
171 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
172 tilde escapes. The subject in your reply is formed by prefacing the
173 subject in the original message with
175 unless it already began thus.
176 If the original message included a
178 header field, the reply will go
180 to the recipient named by
182 You type in your message using the same conventions available to you
188 command is especially useful for replying to messages that were sent
189 to enormous distribution groups when you really just want to
190 send a message to the originator. Use it often.
191 \fBReply\fP (and \fBRespond\fP) can be abbreviated to \fBR\fP.
196 \fBType\fP can be abbreviated to \fBT\fP.
197 .ip "\fBalias\fP\ \ "
198 Define a name to stand for a set of other names.
199 This is used when you want to send messages to a certain
200 group of people and want to avoid retyping their names.
203 alias project john sue willie kathryn
207 which expands to the four people John, Sue, Willie, and Kathryn.
208 If no arguments are given, all currently-defined aliases are printed.
209 If one argument is given, that alias is printed (if it exists).
210 \fBAlias\fP can be abbreviated to \fBa\fP.
211 .ip "\fBalternates\fP\ \ "
212 If you have accounts on several machines, you may find it convenient
213 to use the /usr/lib/aliases on all the machines except one to direct
214 your mail to a single account.
217 command is used to inform
219 that each of these other addresses is really
222 takes a list of user names and remembers that they are all actually you.
225 to messages that were sent to one of these alternate names,
227 will not bother to send a copy of the message to this other address (which
228 would simply be directed back to you by the alias mechanism).
231 is given no argument, it lists the current set of alternate names.
233 is usually used in the .mailrc file.
234 \fBAlternates\fP can be abbreviated to \fBalt\fP.
235 .ip "\fBchdir\fP\ \ "
238 command allows you to change your current directory.
240 takes a single argument, which is taken to be the pathname of
241 the directory to change to. If no argument is given,
243 changes to your home directory.
244 \fBChdir\fP can be abbreviated to \fBc\fP.
248 command does the same thing that
250 does, except that it does not mark the messages it is used on
251 for deletion when you quit.
252 \fBCopy\fP can be abbreviated to \fBco\fP.
253 .ip "\fBdelete\fP\ \ "
254 Deletes a list of messages. Deleted messages can be reclaimed
258 \fBDelete\fP can be abbreviated to \fBd\fP.
259 .ip "\fBdp\fP or \fBdt\fP\ \ "
261 commands delete the current message and print the next message.
262 They are useful for quickly reading and disposing of mail.
263 If there is no next message, \fImail\fP says ``at EOF.''
265 To edit individual messages using the text editor, the
267 command is provided. The
269 command takes a list of messages as described under the
271 command and processes each by writing it into the file
276 is the message number being edited and executing the text editor on it.
277 When you have edited the message to your satisfaction, write the message
278 out and quit, upon which
280 will read the message back and remove the file.
282 can be abbreviated to
285 Marks the end of the then-part of an
287 statement and the beginning of the
288 part to take effect if the condition of the
291 .ip "\fBendif\fP\ \ "
295 .ip "\fBexit\fP or \fBxit\fP\ \ "
298 without updating the system mailbox or the file your were reading.
299 Thus, if you accidentally delete several messages, you can use
301 to avoid scrambling your mailbox.
302 \fBExit\fP can be abbreviated to \fBex\fP or \fBx\fP.
306 \fBFile\fP can be abbreviated to \fBfi\fP.
307 .ip "\fBfolders\fP\ \ "
308 List the names of the folders in your folder directory.
309 .ip "\fBfolder\fP\ \ "
312 command switches to a new mail file or folder. With no arguments, it
313 tells you which file you are currently reading. If you give
314 it an argument, it will write out changes (such as deletions)
315 you have made in the current file and read the new file.
316 Some special conventions are recognized for the name:
325 % Your system mailbox
326 %name \fIName\fP's system mailbox
328 +folder A file in your folder directory
331 \fBFolder\fP can be abbreviated to \fBfo\fP.
335 command takes a list of messages and prints out the header lines for each one;
340 is the easy way to display all the message headers from \*(lqjoe.\*(rq
341 \fBFrom\fP can be abbreviated to \fBf\fP.
342 .ip "\fBheaders\fP\ \ "
345 to read your mail, it lists the message headers that you have.
346 These headers tell you who each message is from, when they were
347 received, how many lines and characters each message is, and the
349 header field of each message, if present. In addition,
351 tags the message header of each message that has been the object
356 Messages that have been
364 messages are not printed at all. If you wish to reprint the current
365 list of message headers, you can do so with the
369 command (and thus the initial header listing)
370 only lists the first so many message headers.
371 The number of headers listed depends on the speed of your
373 This can be overridden by specifying the number of headers you
378 maintains a notion of the current
380 into your messages for the purposes of printing headers.
383 command to move forward and back a window.
386 notion of the current window directly to a particular message by
393 attention to the messages around message 40.
394 If a ``+'' argument is given, then the next screenful of message headers is
395 printed, and if a ``\-'' argument is given, the previous screenful of message
397 \fBHeaders\fP can be abbreviated to \fBh\fP.
399 Print a brief and usually out of date help message about the commands
406 is usually more up-to-date than either the help message or this manual.
407 It is also a synonym for \fB?\fP.
409 Arrange to hold a list of messages in the system mailbox, instead
410 of moving them to the file
412 in your home directory. If you set the binary option
414 this will happen by default.
415 It does not override the \fBdelete\fP command.
416 \fBHold\fP can be abbreviated to \fBho\fP.
420 file can be executed conditionally depending on whether you are
421 sending or receiving mail with the
423 command. For example, you can do:
431 form is also available:
439 Note that the only allowed conditions are
443 .ip "\fBignore\fP \ \ "
446 has been superseded by
449 Add the list of header fields named to the
451 Header fields in the ignore list are not printed on your
452 terminal when you print a message. This allows you to suppress
453 printing of certain machine-generated header fields, such as
455 which are not usually of interest. The
459 commands can be used to print a message in its entirety, including
463 is executed with no arguments, it lists the current set of ignored fields.
468 \fBList\fP can be abbreviated to \fBl\fP.
470 .\"Define a list of local names for this host. This command is useful
471 .\"when the host is known by more than one name. Names in the list
472 .\"may be qualified be the domain of the host. The first name on the local
476 .\"The names on the local list are used by
478 .\"to decide which addresses are local to the host.
481 .\"local ucbarpa.BERKELEY.ARPA arpa.BERKELEY.ARPA \\
482 .\" arpavax.BERKELEY.ARPA r.BERKELEY.ARPA \\
485 .\"From this list we see that
486 .\".i "fred@ucbarpa.BERKELEY.ARPA",
487 .\".i "harold@arpa.BERKELEY",
490 .\"are all addresses of users on the local host.
493 .\"command is usually not used be general users since it is designed for
494 .\"local configuration; it is usually found in the file /etc/mail.rc.
496 Send mail to one or more people. If you have the
500 will prompt you for a subject to your message. Then you
501 can type in your message, using tilde escapes as described in
502 section 4 to edit, print, or modify your message. To signal your
503 satisfaction with the message and send it, type control-d at the
504 beginning of a line, or a . alone on a line if you set the option
506 To abort the message, type two interrupt characters (\s-2RUBOUT\s0
507 by default) in a row or use the
510 The \fBmail\fP command can be abbreviated to \fBm\fP.
512 Indicate that a list of messages be sent to
514 in your home directory when you quit. This is the default
515 action for messages if you do
520 .ip "\fBnext\fP or \fB+\fP\ \ "
523 command goes to the next message and types it. If given a message list,
525 goes to the first such message and types it. Thus,
529 goes to the next message sent by
533 command can be abbreviated to simply a newline, which means that one
534 can go to and type a message by simply giving its message number or
535 one of the magic characters
544 prints the current message and
548 prints message 4, as described previously.
549 \fBNext\fP can be abbreviated to \fBn\fP.
550 .ip "\fBpreserve\fP\ \ "
553 Cause a list of messages to be held in your system mailbox when you quit.
554 \fBPreserve\fP can be abbreviated to \fBpre\fP.
555 .ip "\fBprint\fP\ \ "
556 Print the specified messages. If the
558 variable is set, messages longer than the number of lines it indicates
559 are paged through the command specified by the \fBPAGER\fP variable.
560 The \fBprint\fP command can be abbreviated to \fBp\fP.
562 Terminates the session, saving all undeleted, unsaved and unwritten messages
563 in the user's \fImbox\fP file in their login directory
564 (messages marked as having been read), preserving all
565 messages marked with \fBhold\fP or \fBpreserve\fP or never referenced
566 in their system mailbox.
567 Any messages that were deleted, saved, written or saved to \fImbox\fP are
568 removed from their system mailbox.
569 If new mail has arrived during the session, the message
570 ``You have new mail'' is given. If given while editing a mailbox file
571 with the \fB\-f\fP flag, then the edit file is rewritten.
572 A return to the Shell is effected, unless the rewrite of edit file fails,
573 in which case the user can escape with the \fBexit\fP command.
574 \fBQuit\fP can be abbreviated to \fBq\fP.
575 .ip "\fBreply\fP or \fBrespond\fP\ \ "
576 Frame a reply to a single message.
577 The reply will be sent to the
578 person who sent you the message (to which you are replying), plus all
579 the people who received the original message, except you. You can
580 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
581 tilde escapes. The subject in your reply is formed by prefacing the
582 subject in the original message with
584 unless it already began thus.
585 If the original message included a
587 header field, the reply will go
589 to the recipient named by
591 You type in your message using the same conventions available to you
595 The \fBreply\fP (and \fBrespond\fP) command can be abbreviated to \fBr\fP.
596 .ip "\fBretain\fP\ \ "
597 Add the list of header fields named to the \fIretained list\fP.
598 Only the header fields in the retain list
599 are shown on your terminal when you print a message.
600 All other header fields are suppressed.
605 commands can be used to print a message in its entirety.
608 is executed with no arguments, it lists the current set of
611 It is often useful to be able to save messages on related topics
614 command gives you the ability to do this. The
616 command takes as an argument a list of message numbers, followed by
617 the name of the file in which to save the messages. The messages
618 are appended to the named file, thus allowing one to keep several
619 messages in the file, stored in the order they were put there.
620 The filename in quotes, followed by the line
621 count and character count is echoed on the user's terminal.
624 command relative to our running example is:
629 messages are not automatically saved in
631 at quit time, nor are they selected by the
633 command described above, unless explicitly specified.
634 \fBSave\fP can be abbreviated to \fBs\fP.
636 Set an option or give an option a value. Used to customize
638 Section 5.3 contains a list of the options. Options can be
640 in which case they are
646 To set a binary option
653 To give the valued option
661 There must be no space before or after the ``='' sign.
662 If no arguments are given, all variable values are printed.
663 Several options can be specified in a single
666 \fBSet\fP can be abbreviated to \fBse\fP.
667 .ip "\fBshell\fP\ \ "
670 command allows you to
673 invokes an interactive shell and allows you to type commands to it.
674 When you leave the shell, you will return to
676 The shell used is a default assumed by
678 you can override this default by setting the valued option
684 \fBShell\fP can be abbreviated to \fBsh\fP.
686 Takes a message list and prints out the size in characters of each
688 .ip "\fBsource\fP\ \ "
693 commands from a file. It is useful when you are trying to fix your
695 file and you need to re-read it.
696 \fBSource\fP can be abbreviated to \fBso\fP.
700 command takes a message list and prints the first five lines
701 of each addressed message.
702 If you wish, you can change the number of lines that
704 prints out by setting the valued option
711 \fBTop\fP can be abbreviated to \fBto\fP.
714 Takes a message list and types out each message on the terminal.
715 The \fBtype\fP command can be abbreviated to \fBt\fP.
716 .ip "\fBundelete\fP \ \"
717 Takes a message list and marks each message as \fInot\fP
719 \fBUndelete\fP can be abbreviated to \fBu\fP.
720 .ip "\fBunread\fP\ \ "
721 Takes a message list and marks each message as
724 \fBUnread\fP can be abbreviated to \fBU\fP.
725 .ip "\fBunset\fP\ \ "
726 Takes a list of option names and discards their remembered values;
727 the inverse of \fBset\fP .
728 .ip "\fBvisual\fP\ \ "
729 It is often useful to be able to invoke one of two editors,
730 based on the type of terminal one is using. To invoke
731 a display oriented editor, you can use the
733 command. The operation of the
735 command is otherwise identical to that of the
744 commands assume some default text editors. These default editors
745 can be overridden by the valued options
749 for the standard and screen editors. You might want to do:
751 set EDITOR=/usr/bin/ex VISUAL=/usr/bin/vi
753 \fBVisual\fP can be abbreviated to \fBv\fP.
754 .ip "\fBwrite\fP\ \ "
757 command always writes the entire message, including the headers,
758 into the file. If you want to write just the message itself, you
763 command has the same syntax as the
765 command, and can be abbreviated to simply
767 Thus, we could write the second message by doing:
771 As suggested by this example, the
773 command is useful for such tasks as sending and receiving
774 source program text over the message system.
775 The filename in quotes, followed by the line
776 count and character count is echoed on the user's terminal.
779 presents message headers in windowfuls as described under
785 attention forward to the next window by giving the
789 command. Analogously, you can move to the previous window with:
793 .sh 2 "Custom options"
795 Throughout this manual, we have seen examples of binary and valued options.
796 This section describes each of the options in alphabetical order, including
797 some that you have not seen yet.
798 To avoid confusion, please note that the options are either
799 all lower case letters or all upper case letters. When I start a sentence
804 to prompt you for a subject header,
805 I am only capitalizing
807 as a courtesy to English.
808 .ip "\fBEDITOR\fP\ \ "
811 defines the pathname of the text editor to be used in the
813 command and ~e. If not defined, a standard editor is used.
814 .ip "\fBPAGER\fP\ \ "
815 Pathname of the program to use for paginating output when
816 it exceeds \fIcrt\fP lines.
817 A default paginator is used if this option is not defined.
818 .ip "\fBSHELL\fP\ \ "
821 gives the path name of your shell. This shell is used for the
823 command and ~! escape. In addition, this shell expands
824 file names with shell metacharacters like * and ? in them.
825 .ip "\fBVISUAL\fP\ \ "
828 defines the pathname of the screen editor to be used in the
831 and ~v escape. A standard screen editor is used if you do not define one.
832 .ip "\fBappend\fP\ \ "
836 causes messages saved in
838 to be appended to the end rather than prepended.
839 Normally, \fIMail\fP will put messages in \fImbox\fP
840 in the same order that the system puts messages in your system mailbox.
843 you are requesting that
845 be appended to regardless. It is in any event quicker to append.
848 is a binary option which
851 to prompt you for the subject of each message you send.
852 If you respond with simply a newline, no subject field will be sent.
853 .ip "\fBaskcc\fP\ \ "
855 is a binary option which
856 causes you to be prompted for additional carbon copy recipients at the
857 end of each message. Responding with a newline shows your
858 satisfaction with the current list.
859 .ip "\fBautoprint\fP\ \ "
861 is a binary option which
864 command to behave like
866 \*- thus, after deleting a message, the next one will be typed
867 automatically. This is useful when quickly scanning and deleting
868 messages in your mailbox.
872 is used as a threshold to determine how long a message must
876 .ip "\fBdebug\fP \ \ "
879 causes debugging information to be displayed. Use of this
880 option is the same as using the \fB\-d\fP command line flag.
883 is a binary option which, if set, causes
885 to interpret a period alone on a line as the terminator
886 of the message you are sending.
887 .ip "\fBescape\fP\ \ "
888 To allow you to change the escape character used when sending
889 mail, you can set the valued option
891 Only the first character of the
893 option is used, and it must be doubled if it is to appear as
894 the first character of a line of your message. If you change your escape
895 character, then ~ loses all its special meaning, and need no longer be doubled
896 at the beginning of a line.
897 .ip "\fBfolder\fP\ \ "
898 The name of the directory to use for storing folders of messages.
899 If this name begins with a `/'
901 considers it to be an absolute pathname; otherwise, the folder directory
902 is found relative to your home directory.
906 causes messages that have been read but not manually dealt with
907 to be held in the system mailbox. This prevents such messages from
908 being automatically swept into your \fImbox\fP file.
909 .ip "\fBignore\fP\ \ "
912 causes \s-2RUBOUT\s0 characters from your terminal to be ignored and echoed
913 as @'s while you are sending mail. \s-2RUBOUT\s0 characters retain their
919 option is equivalent to supplying the
921 flag on the command line as described in section 6.
922 .ip "\fBignoreeof\fP\ \ "
929 refuse to accept a control\-d as the end of a message.
939 to truncate your system mailbox instead of deleting it when it
940 is empty. This is useful if you elect to protect your mailbox, which
941 you would do with the shell command:
943 chmod 600 /var/mail/yourname
947 is your login name. If you do not do this, anyone can probably read
948 your mail, although people usually don't.
949 .ip "\fBkeepsave\fP\ \ "
954 usually discards it when you
956 To retain all saved messages, set the
959 .ip "\fBmetoo\fP\ \ "
960 When sending mail to an alias,
962 makes sure that if you are included in the alias, that mail will not
963 be sent to you. This is useful if a single alias is being used by
964 all members of the group. If however, you wish to receive a copy of
965 all the messages you send to the alias, you can set the binary option
967 .ip "\fBnoheader\fP\ \ "
970 suppresses the printing of the version and headers when
972 is first invoked. Setting this option is the same as using
975 .ip "\fBnosave\fP\ \ "
977 when you abort a message with two \s-2RUBOUTs\s0,
979 copies the partial letter to the file
981 in your home directory. Setting the binary option
984 .ip "\fBReplyall\fP\ \ "
985 Reverses the sense of
990 .ip "\fBquiet\fP\ \ "
993 suppresses the printing of the version when
996 as well as printing the for example
1001 .ip "\fBrecord\fP\ \ "
1002 If you love to keep records, then the
1005 can be set to the name of a file to save your outgoing mail.
1006 Each new message you send is appended to the end of the file.
1007 .ip "\fBscreen\fP\ \ "
1010 initially prints the message headers, it determines the number to
1011 print by looking at the speed of your terminal. The faster your
1012 terminal, the more it prints.
1015 overrides this calculation and
1016 specifies how many message headers you want printed.
1017 This number is also used for scrolling with the
1020 .ip "\fBsendmail\fP\ \ "
1021 To use an alternate mail delivery system, set the
1023 option to the full pathname of the program to use. Note: this is not
1024 for everyone! Most people should use the default delivery system.
1025 .ip "\fBtoplines\fP\ \ "
1028 defines the number of lines that the
1030 command will print out instead of the default five lines.
1031 .ip "\fBverbose\fP\ \ "
1032 The binary option "verbose" causes
1034 to invoke sendmail with the
1036 flag, which causes it to go into verbose mode and announce expansion
1037 of aliases, etc. Setting the "verbose" option is equivalent to
1042 flag as described in section 6.