1 .\" $NetBSD: mail5.nr,v 1.4 1998/01/09 08:05:57 perry Exp $
3 .\" Copyright (c) 1980, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)mail5.nr 8.2 (Berkeley) 5/16/94
32 .sh 1 "Additional features"
34 This section describes some additional commands useful for
35 reading your mail, setting options, and handling lists of messages.
40 commands accept a list of messages as an argument.
45 described in section 2,
48 command, which prints the message headers associated with the
49 message list passed to it.
52 command is particularly useful in conjunction with some of the
53 message list features described below.
57 consists of a list of message numbers, ranges, and names,
58 separated by spaces or tabs. Message numbers may be either
59 decimal numbers, which directly specify messages, or one of the
65 to specify the first relevant, current, or last
66 relevant message, respectively.
68 here means, for most commands
76 A range of messages consists of two message numbers (of the form
77 described in the previous paragraph) separated by a dash.
78 Thus, to print the first four messages, use
82 and to print all the messages from the current message to the last
90 is a user name. The user names given in the message list are
91 collected together and each message selected by other means
92 is checked to make sure it was sent by one of the named users.
93 If the message consists entirely of user names, then every
94 message sent by one of those users that is
96 (in the sense described earlier)
97 is selected. Thus, to print every message sent to you by
104 As a shorthand notation, you can specify simply
113 prints all undeleted messages,
117 deletes all undeleted messages, and
121 undeletes all deleted messages.
123 You can search for the presence of a word in subject lines with
125 For example, to print the headers of all messages that contain the
132 Note that subject searching ignores upper/lower case differences.
133 .sh 2 "List of commands"
135 This section describes all the
137 commands available when
142 command goes to the previous message and prints it. The
144 command may be given a decimal number
146 as an argument, in which case the
148 previous message is gone to and printed.
150 Prints a brief summary of commands.
152 Used to preface a command to be executed by the shell.
153 .ip "\fBPrint\fP\ \ "
156 but also print out ignored header fields. See also
157 \fBprint\fP, \fBignore\fP and \fBretain\fP.
158 \fBPrint\fP can be abbreviated to \fBP\fP.
159 .ip "\fBReply\fP or \fBRespond\fP\ \ "
160 Note the capital \fBR\fP in the name.
161 Frame a reply to a one or more messages.
162 The reply (or replies if you are using this on multiple messages)
163 will be sent ONLY to the person who sent you the message
164 (respectively, the set of people who sent the messages you are
167 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
168 tilde escapes. The subject in your reply is formed by prefacing the
169 subject in the original message with
171 unless it already began thus.
172 If the original message included a
174 header field, the reply will go
176 to the recipient named by
178 You type in your message using the same conventions available to you
184 command is especially useful for replying to messages that were sent
185 to enormous distribution groups when you really just want to
186 send a message to the originator. Use it often.
187 \fBReply\fP (and \fBRespond\fP) can be abbreviated to \fBR\fP.
192 \fBType\fP can be abbreviated to \fBT\fP.
193 .ip "\fBalias\fP\ \ "
194 Define a name to stand for a set of other names.
195 This is used when you want to send messages to a certain
196 group of people and want to avoid retyping their names.
199 alias project john sue willie kathryn
203 which expands to the four people John, Sue, Willie, and Kathryn.
204 If no arguments are given, all currently-defined aliases are printed.
205 If one argument is given, that alias is printed (if it exists).
206 \fBAlias\fP can be abbreviated to \fBa\fP.
207 .ip "\fBalternates\fP\ \ "
208 If you have accounts on several machines, you may find it convenient
209 to use the /usr/lib/aliases on all the machines except one to direct
210 your mail to a single account.
213 command is used to inform
215 that each of these other addresses is really
218 takes a list of user names and remembers that they are all actually you.
221 to messages that were sent to one of these alternate names,
223 will not bother to send a copy of the message to this other address (which
224 would simply be directed back to you by the alias mechanism).
227 is given no argument, it lists the current set of alternate names.
229 is usually used in the .mailrc file.
230 \fBAlternates\fP can be abbreviated to \fBalt\fP.
231 .ip "\fBchdir\fP\ \ "
234 command allows you to change your current directory.
236 takes a single argument, which is taken to be the pathname of
237 the directory to change to. If no argument is given,
239 changes to your home directory.
240 \fBChdir\fP can be abbreviated to \fBc\fP.
244 command does the same thing that
246 does, except that it does not mark the messages it is used on
247 for deletion when you quit.
248 \fBCopy\fP can be abbreviated to \fBco\fP.
249 .ip "\fBdelete\fP\ \ "
250 Deletes a list of messages. Deleted messages can be reclaimed
254 \fBDelete\fP can be abbreviated to \fBd\fP.
255 .ip "\fBdp\fP or \fBdt\fP\ \ "
257 commands delete the current message and print the next message.
258 They are useful for quickly reading and disposing of mail.
259 If there is no next message, \fImail\fP says ``at EOF.''
261 To edit individual messages using the text editor, the
263 command is provided. The
265 command takes a list of messages as described under the
267 command and processes each by writing it into the file
272 is the message number being edited and executing the text editor on it.
273 When you have edited the message to your satisfaction, write the message
274 out and quit, upon which
276 will read the message back and remove the file.
278 can be abbreviated to
281 Marks the end of the then-part of an
283 statement and the beginning of the
284 part to take effect if the condition of the
287 .ip "\fBendif\fP\ \ "
291 .ip "\fBexit\fP or \fBxit\fP\ \ "
294 without updating the system mailbox or the file your were reading.
295 Thus, if you accidentally delete several messages, you can use
297 to avoid scrambling your mailbox.
298 \fBExit\fP can be abbreviated to \fBex\fP or \fBx\fP.
302 \fBFile\fP can be abbreviated to \fBfi\fP.
303 .ip "\fBfolders\fP\ \ "
304 List the names of the folders in your folder directory.
305 .ip "\fBfolder\fP\ \ "
308 command switches to a new mail file or folder. With no arguments, it
309 tells you which file you are currently reading. If you give
310 it an argument, it will write out changes (such as deletions)
311 you have made in the current file and read the new file.
312 Some special conventions are recognized for the name:
321 % Your system mailbox
322 %name \fIName\fP's system mailbox
324 +folder A file in your folder directory
327 \fBFolder\fP can be abbreviated to \fBfo\fP.
331 command takes a list of messages and prints out the header lines for each one;
336 is the easy way to display all the message headers from \*(lqjoe.\*(rq
337 \fBFrom\fP can be abbreviated to \fBf\fP.
338 .ip "\fBheaders\fP\ \ "
341 to read your mail, it lists the message headers that you have.
342 These headers tell you who each message is from, when they were
343 received, how many lines and characters each message is, and the
345 header field of each message, if present. In addition,
347 tags the message header of each message that has been the object
352 Messages that have been
360 messages are not printed at all. If you wish to reprint the current
361 list of message headers, you can do so with the
365 command (and thus the initial header listing)
366 only lists the first so many message headers.
367 The number of headers listed depends on the speed of your
369 This can be overridden by specifying the number of headers you
374 maintains a notion of the current
376 into your messages for the purposes of printing headers.
379 command to move forward and back a window.
382 notion of the current window directly to a particular message by
389 attention to the messages around message 40.
390 If a ``+'' argument is given, then the next screenful of message headers is
391 printed, and if a ``\-'' argument is given, the previous screenful of message
393 \fBHeaders\fP can be abbreviated to \fBh\fP.
395 Print a brief and usually out of date help message about the commands
402 is usually more up-to-date than either the help message or this manual.
403 It is also a synonym for \fB?\fP.
405 Arrange to hold a list of messages in the system mailbox, instead
406 of moving them to the file
408 in your home directory. If you set the binary option
410 this will happen by default.
411 It does not override the \fBdelete\fP command.
412 \fBHold\fP can be abbreviated to \fBho\fP.
416 file can be executed conditionally depending on whether you are
417 sending or receiving mail with the
419 command. For example, you can do:
427 form is also available:
435 Note that the only allowed conditions are
439 .ip "\fBignore\fP \ \ "
442 has been superseded by
445 Add the list of header fields named to the
447 Header fields in the ignore list are not printed on your
448 terminal when you print a message. This allows you to suppress
449 printing of certain machine-generated header fields, such as
451 which are not usually of interest. The
455 commands can be used to print a message in its entirety, including
459 is executed with no arguments, it lists the current set of ignored fields.
464 \fBList\fP can be abbreviated to \fBl\fP.
466 .. Define a list of local names for this host. This command is useful
467 .. when the host is known by more than one name. Names in the list
468 .. may be qualified be the domain of the host. The first name on the local
472 .. The names on the local list are used by
474 .. to decide which addresses are local to the host.
477 .. local ucbarpa.BERKELEY.ARPA arpa.BERKELEY.ARPA \\
478 .. arpavax.BERKELEY.ARPA r.BERKELEY.ARPA \\
481 .. From this list we see that
482 .. .i "fred@ucbarpa.BERKELEY.ARPA",
483 .. .i "harold@arpa.BERKELEY",
486 .. are all addresses of users on the local host.
489 .. command is usually not used be general users since it is designed for
490 .. local configuration; it is usually found in the file /usr/lib/Mail.rc.
492 Send mail to one or more people. If you have the
496 will prompt you for a subject to your message. Then you
497 can type in your message, using tilde escapes as described in
498 section 4 to edit, print, or modify your message. To signal your
499 satisfaction with the message and send it, type control-d at the
500 beginning of a line, or a . alone on a line if you set the option
502 To abort the message, type two interrupt characters (\s-2RUBOUT\s0
503 by default) in a row or use the
506 The \fBmail\fP command can be abbreviated to \fBm\fP.
508 Indicate that a list of messages be sent to
510 in your home directory when you quit. This is the default
511 action for messages if you do
516 .ip "\fBnext\fP or \fB+\fP\ \ "
519 command goes to the next message and types it. If given a message list,
521 goes to the first such message and types it. Thus,
525 goes to the next message sent by
529 command can be abbreviated to simply a newline, which means that one
530 can go to and type a message by simply giving its message number or
531 one of the magic characters
540 prints the current message and
544 prints message 4, as described previously.
545 \fBNext\fP can be abbreviated to \fBn\fP.
546 .ip "\fBpreserve\fP\ \ "
549 Cause a list of messages to be held in your system mailbox when you quit.
550 \fBPreserve\fP can be abbreviated to \fBpre\fP.
551 .ip "\fBprint\fP\ \ "
552 Print the specified messages. If the
554 variable is set, messages longer than the number of lines it indicates
555 are paged through the command specified by the \fBPAGER\fP variable.
556 The \fBprint\fP command can be abbreviated to \fBp\fP.
558 Terminates the session, saving all undeleted, unsaved and unwritten messages
559 in the user's \fImbox\fP file in their login directory
560 (messages marked as having been read), preserving all
561 messages marked with \fBhold\fP or \fBpreserve\fP or never referenced
562 in their system mailbox.
563 Any messages that were deleted, saved, written or saved to \fImbox\fP are
564 removed from their system mailbox.
565 If new mail has arrived during the session, the message
566 ``You have new mail'' is given. If given while editing a mailbox file
567 with the \fB\-f\fP flag, then the edit file is rewritten.
568 A return to the Shell is effected, unless the rewrite of edit file fails,
569 in which case the user can escape with the \fBexit\fP command.
570 \fBQuit\fP can be abbreviated to \fBq\fP.
571 .ip "\fBreply\fP or \fBrespond\fP\ \ "
572 Frame a reply to a single message.
573 The reply will be sent to the
574 person who sent you the message (to which you are replying), plus all
575 the people who received the original message, except you. You can
576 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
577 tilde escapes. The subject in your reply is formed by prefacing the
578 subject in the original message with
580 unless it already began thus.
581 If the original message included a
583 header field, the reply will go
585 to the recipient named by
587 You type in your message using the same conventions available to you
591 The \fBreply\fP (and \fBrespond\fP) command can be abbreviated to \fBr\fP.
592 .ip "\fBretain\fP\ \ "
593 Add the list of header fields named to the \fIretained list\fP.
594 Only the header fields in the retain list
595 are shown on your terminal when you print a message.
596 All other header fields are suppressed.
601 commands can be used to print a message in its entirety.
604 is executed with no arguments, it lists the current set of
607 It is often useful to be able to save messages on related topics
610 command gives you the ability to do this. The
612 command takes as an argument a list of message numbers, followed by
613 the name of the file in which to save the messages. The messages
614 are appended to the named file, thus allowing one to keep several
615 messages in the file, stored in the order they were put there.
616 The filename in quotes, followed by the line
617 count and character count is echoed on the user's terminal.
620 command relative to our running example is:
625 messages are not automatically saved in
627 at quit time, nor are they selected by the
629 command described above, unless explicitly specified.
630 \fBSave\fP can be abbreviated to \fBs\fP.
632 Set an option or give an option a value. Used to customize
634 Section 5.3 contains a list of the options. Options can be
636 in which case they are
642 To set a binary option
649 To give the valued option
657 There must be no space before or after the ``='' sign.
658 If no arguments are given, all variable values are printed.
659 Several options can be specified in a single
662 \fBSet\fP can be abbreviated to \fBse\fP.
663 .ip "\fBshell\fP\ \ "
666 command allows you to
669 invokes an interactive shell and allows you to type commands to it.
670 When you leave the shell, you will return to
672 The shell used is a default assumed by
674 you can override this default by setting the valued option
680 \fBShell\fP can be abbreviated to \fBsh\fP.
682 Takes a message list and prints out the size in characters of each
684 .ip "\fBsource\fP\ \ "
689 commands from a file. It is useful when you are trying to fix your
691 file and you need to re-read it.
692 \fBSource\fP can be abbreviated to \fBso\fP.
696 command takes a message list and prints the first five lines
697 of each addressed message.
698 If you wish, you can change the number of lines that
700 prints out by setting the valued option
707 \fBTop\fP can be abbreviated to \fBto\fP.
710 Takes a message list and types out each message on the terminal.
711 The \fBtype\fP command can be abbreviated to \fBt\fP.
712 .ip "\fBundelete\fP \ \"
713 Takes a message list and marks each message as \fInot\fP
715 \fBUndelete\fP can be abbreviated to \fBu\fP.
716 .ip "\fBunread\fP\ \ "
717 Takes a message list and marks each message as
720 \fBUnread\fP can be abbreviated to \fBU\fP.
721 .ip "\fBunset\fP\ \ "
722 Takes a list of option names and discards their remembered values;
723 the inverse of \fBset\fP .
724 .ip "\fBvisual\fP\ \ "
725 It is often useful to be able to invoke one of two editors,
726 based on the type of terminal one is using. To invoke
727 a display oriented editor, you can use the
729 command. The operation of the
731 command is otherwise identical to that of the
740 commands assume some default text editors. These default editors
741 can be overridden by the valued options
745 for the standard and screen editors. You might want to do:
747 set EDITOR=/usr/ucb/ex VISUAL=/usr/ucb/vi
749 \fBVisual\fP can be abbreviated to \fBv\fP.
750 .ip "\fBwrite\fP\ \ "
753 command always writes the entire message, including the headers,
754 into the file. If you want to write just the message itself, you
759 command has the same syntax as the
761 command, and can be abbreviated to simply
763 Thus, we could write the second message by doing:
767 As suggested by this example, the
769 command is useful for such tasks as sending and receiving
770 source program text over the message system.
771 The filename in quotes, followed by the line
772 count and character count is echoed on the user's terminal.
775 presents message headers in windowfuls as described under
781 attention forward to the next window by giving the
785 command. Analogously, you can move to the previous window with:
789 .sh 2 "Custom options"
791 Throughout this manual, we have seen examples of binary and valued options.
792 This section describes each of the options in alphabetical order, including
793 some that you have not seen yet.
794 To avoid confusion, please note that the options are either
795 all lower case letters or all upper case letters. When I start a sentence
800 to prompt you for a subject header,
801 I am only capitalizing
803 as a courtesy to English.
804 .ip "\fBEDITOR\fP\ \ "
807 defines the pathname of the text editor to be used in the
809 command and ~e. If not defined, a standard editor is used.
810 .ip "\fBPAGER\fP\ \ "
811 Pathname of the program to use for paginating output when
812 it exceeds \fIcrt\fP lines.
813 A default paginator is used if this option is not defined.
814 .ip "\fBSHELL\fP\ \ "
817 gives the path name of your shell. This shell is used for the
819 command and ~! escape. In addition, this shell expands
820 file names with shell metacharacters like * and ? in them.
821 .ip "\fBVISUAL\fP\ \ "
824 defines the pathname of the screen editor to be used in the
827 and ~v escape. A standard screen editor is used if you do not define one.
828 .ip "\fBappend\fP\ \ "
832 causes messages saved in
834 to be appended to the end rather than prepended.
835 Normally, \fIMail\fP will put messages in \fImbox\fP
836 in the same order that the system puts messages in your system mailbox.
839 you are requesting that
841 be appended to regardless. It is in any event quicker to append.
844 is a binary option which
847 to prompt you for the subject of each message you send.
848 If you respond with simply a newline, no subject field will be sent.
849 .ip "\fBaskcc\fP\ \ "
851 is a binary option which
852 causes you to be prompted for additional carbon copy recipients at the
853 end of each message. Responding with a newline shows your
854 satisfaction with the current list.
855 .ip "\fBautoprint\fP\ \ "
857 is a binary option which
860 command to behave like
862 \*- thus, after deleting a message, the next one will be typed
863 automatically. This is useful when quickly scanning and deleting
864 messages in your mailbox.
868 is used as a threshold to determine how long a message must
872 .ip "\fBdebug\fP \ \ "
875 causes debugging information to be displayed. Use of this
876 option is the same as using the \fB\-d\fP command line flag.
879 is a binary option which, if set, causes
881 to interpret a period alone on a line as the terminator
882 of the message you are sending.
883 .ip "\fBescape\fP\ \ "
884 To allow you to change the escape character used when sending
885 mail, you can set the valued option
887 Only the first character of the
889 option is used, and it must be doubled if it is to appear as
890 the first character of a line of your message. If you change your escape
891 character, then ~ loses all its special meaning, and need no longer be doubled
892 at the beginning of a line.
893 .ip "\fBfolder\fP\ \ "
894 The name of the directory to use for storing folders of messages.
895 If this name begins with a `/'
897 considers it to be an absolute pathname; otherwise, the folder directory
898 is found relative to your home directory.
902 causes messages that have been read but not manually dealt with
903 to be held in the system mailbox. This prevents such messages from
904 being automatically swept into your \fImbox\fP file.
905 .ip "\fBignore\fP\ \ "
908 causes \s-2RUBOUT\s0 characters from your terminal to be ignored and echoed
909 as @'s while you are sending mail. \s-2RUBOUT\s0 characters retain their
915 option is equivalent to supplying the
917 flag on the command line as described in section 6.
918 .ip "\fBignoreeof\fP\ \ "
925 refuse to accept a control\-d as the end of a message.
935 to truncate your system mailbox instead of deleting it when it
936 is empty. This is useful if you elect to protect your mailbox, which
937 you would do with the shell command:
939 chmod 600 /var/mail/yourname
943 is your login name. If you do not do this, anyone can probably read
944 your mail, although people usually don't.
945 .ip "\fBkeepsave\fP\ \ "
950 usually discards it when you
952 To retain all saved messages, set the
955 .ip "\fBmetoo\fP\ \ "
956 When sending mail to an alias,
958 makes sure that if you are included in the alias, that mail will not
959 be sent to you. This is useful if a single alias is being used by
960 all members of the group. If however, you wish to receive a copy of
961 all the messages you send to the alias, you can set the binary option
963 .ip "\fBnoheader\fP\ \ "
966 suppresses the printing of the version and headers when
968 is first invoked. Setting this option is the same as using
971 .ip "\fBnosave\fP\ \ "
973 when you abort a message with two \s-2RUBOUTs\s0,
975 copies the partial letter to the file
977 in your home directory. Setting the binary option
980 .ip "\fBReplyall\fP\ \ "
981 Reverses the sense of
986 .ip "\fBquiet\fP\ \ "
989 suppresses the printing of the version when
992 as well as printing the for example
997 .ip "\fBrecord\fP\ \ "
998 If you love to keep records, then the
1001 can be set to the name of a file to save your outgoing mail.
1002 Each new message you send is appended to the end of the file.
1003 .ip "\fBscreen\fP\ \ "
1006 initially prints the message headers, it determines the number to
1007 print by looking at the speed of your terminal. The faster your
1008 terminal, the more it prints.
1011 overrides this calculation and
1012 specifies how many message headers you want printed.
1013 This number is also used for scrolling with the
1016 .ip "\fBsendmail\fP\ \ "
1017 To use an alternate mail delivery system, set the
1019 option to the full pathname of the program to use. Note: this is not
1020 for everyone! Most people should use the default delivery system.
1021 .ip "\fBtoplines\fP\ \ "
1024 defines the number of lines that the
1026 command will print out instead of the default five lines.
1027 .ip "\fBverbose\fP\ \ "
1028 The binary option "verbose" causes
1030 to invoke sendmail with the
1032 flag, which causes it to go into verbose mode and announce expansion
1033 of aliases, etc. Setting the "verbose" option is equivalent to
1038 flag as described in section 6.