Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / mail / USD.doc / mail5.nr
1 .\" Copyright (c) 1980, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
19 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)mail5.nr    8.1 (Berkeley) 6/8/93
33 .\" $FreeBSD: src/usr.bin/mail/USD.doc/mail5.nr,v 1.3.6.2 2002/03/15 19:46:42 mikeh Exp $
34 .\" $DragonFly: src/usr.bin/mail/USD.doc/mail5.nr,v 1.2 2003/06/17 04:29:28 dillon Exp $
35 .\"
36 .bp
37 .sh 1 "Additional features"
38 .pp
39 This section describes some additional commands useful for
40 reading your mail, setting options, and handling lists of messages.
41 .sh 2 "Message lists"
42 .pp
43 Several
44 .i Mail
45 commands accept a list of messages as an argument.
46 Along with
47 .b type
48 and
49 .b delete ,
50 described in section 2,
51 there is the
52 .b from
53 command, which prints the message headers associated with the
54 message list passed to it.
55 The
56 .b from
57 command is particularly useful in conjunction with some of the
58 message list features described below.
59 .pp
60 A
61 .i "message list"
62 consists of a list of message numbers, ranges, and names,
63 separated by spaces or tabs.  Message numbers may be either
64 decimal numbers, which directly specify messages, or one of the
65 special characters
66 .q \(ua
67 .q "."
68 or
69 .q "$"
70 to specify the first relevant, current, or last
71 relevant message, respectively.
72 .i Relevant
73 here means, for most commands
74 .q "not deleted"
75 and
76 .q "deleted"
77 for the
78 .b undelete
79 command.
80 .pp
81 A range of messages consists of two message numbers (of the form
82 described in the previous paragraph) separated by a dash.
83 Thus, to print the first four messages, use
84 .(l
85 type 1\-4
86 .)l
87 and to print all the messages from the current message to the last
88 message, use
89 .(l
90 type .\-$
91 .)l
92 .pp
93 A
94 .i name
95 is a user name.  The user names given in the message list are
96 collected together and each message selected by other means
97 is checked to make sure it was sent by one of the named users.
98 If the message consists entirely of user names, then every
99 message sent by one of those users that is
100 .i relevant
101 (in the sense described earlier)
102 is selected.  Thus, to print every message sent to you by
103 .q root,
104 do
105 .(l
106 type root
107 .)l
108 .pp
109 As a shorthand notation, you can specify simply
110 .q *
111 to get every
112 .i relevant
113 (same sense)
114 message.  Thus,
115 .(l
116 type *
117 .)l
118 prints all undeleted messages,
119 .(l
120 delete *
121 .)l
122 deletes all undeleted messages, and
123 .(l
124 undelete *
125 .)l
126 undeletes all deleted messages.
127 .pp
128 You can search for the presence of a word in subject lines with
129 .b / .
130 For example, to print the headers of all messages that contain the
131 word
132 .q PASCAL,
133 do:
134 .(l
135 from /pascal
136 .)l
137 Note that subject searching ignores upper/lower case differences.
138 .sh 2 "List of commands"
139 .pp
140 This section describes all the
141 .i Mail
142 commands available when
143 receiving mail.
144 .ip "\fB\-\fP\ \ "
145 The
146 .rb \-
147 command goes to the previous message and prints it.  The
148 .rb \-
149 command may be given a decimal number
150 .i n
151 as an argument, in which case the
152 .i n th
153 previous message is gone to and printed.
154 .ip "\fB?\fP\ \ "
155 Prints a brief summary of commands.
156 .ip "\fB!\fP\ \ "
157 Used to preface a command to be executed by the shell.
158 .ip "\fBPrint\fP\ \ "
159 Like
160 .b print ,
161 but also print out ignored header fields.  See also
162 \fBprint\fP, \fBignore\fP and \fBretain\fP.
163 \fBPrint\fP can be abbreviated to \fBP\fP.
164 .ip "\fBReply\fP or \fBRespond\fP\ \ "
165 Note the capital \fBR\fP in the name.
166 Frame a reply to a one or more messages.
167 The reply (or replies if you are using this on multiple messages)
168 will be sent ONLY to the person who sent you the message
169 (respectively, the set of people who sent the messages you are
170 replying to).
171 You can
172 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
173 tilde escapes.  The subject in your reply is formed by prefacing the
174 subject in the original message with
175 .q "Re:"
176 unless it already began thus.
177 If the original message included a
178 .q "reply-to"
179 header field, the reply will go
180 .i only
181 to the recipient named by
182 .q "reply-to."
183 You type in your message using the same conventions available to you
184 through the
185 .b mail
186 command.
187 The
188 .b Reply
189 command is especially useful for replying to messages that were sent
190 to enormous distribution groups when you really just want to
191 send a message to the originator.  Use it often.
192 \fBReply\fP (and \fBRespond\fP) can be abbreviated to \fBR\fP.
193 .ip "\fBType\fP\ \ "
194 Identical to the
195 .b Print
196 command.
197 \fBType\fP can be abbreviated to \fBT\fP.
198 .ip "\fBalias\fP\ \ "
199 Define a name to stand for a set of other names.
200 This is used when you want to send messages to a certain
201 group of people and want to avoid retyping their names.
202 For example
203 .(l
204 alias project john sue willie kathryn
205 .)l
206 creates an alias
207 .i project
208 which expands to the four people John, Sue, Willie, and Kathryn.
209 If no arguments are given, all currently-defined aliases are printed.
210 If one argument is given, that alias is printed (if it exists).
211 \fBAlias\fP can be abbreviated to \fBa\fP.
212 .ip "\fBalternates\fP\ \ "
213 If you have accounts on several machines, you may find it convenient
214 to use the /usr/lib/aliases on all the machines except one to direct
215 your mail to a single account.
216 The
217 .b alternates
218 command is used to inform
219 .i Mail
220 that each of these other addresses is really
221 .i you .
222 .i Alternates
223 takes a list of user names and remembers that they are all actually you.
224 When you
225 .b reply
226 to messages that were sent to one of these alternate names,
227 .i Mail
228 will not bother to send a copy of the message to this other address (which
229 would simply be directed back to you by the alias mechanism).
230 If
231 .i alternates
232 is given no argument, it lists the current set of alternate names.
233 .b Alternates
234 is usually used in the .mailrc file.
235 \fBAlternates\fP can be abbreviated to \fBalt\fP.
236 .ip "\fBchdir\fP\ \ "
237 The
238 .b chdir
239 command allows you to change your current directory.
240 .b Chdir
241 takes a single argument, which is taken to be the pathname of
242 the directory to change to.  If no argument is given,
243 .b chdir
244 changes to your home directory.
245 \fBChdir\fP can be abbreviated to \fBc\fP.
246 .ip "\fBcopy\fP\ \ "
247 The
248 .b copy
249 command does the same thing that
250 .b save
251 does, except that it does not mark the messages it is used on
252 for deletion when you quit.
253 \fBCopy\fP can be abbreviated to \fBco\fP.
254 .ip "\fBdelete\fP\ \ "
255 Deletes a list of messages.  Deleted messages can be reclaimed
256 with the
257 .b undelete
258 command.
259 \fBDelete\fP can be abbreviated to \fBd\fP.
260 .ip "\fBdp\fP or \fBdt\fP\ \ "
261 These
262 commands delete the current message and print the next message.
263 They are useful for quickly reading and disposing of mail.
264 If there is no next message, \fImail\fP says ``at EOF.''
265 .ip "\fBedit\fP\ \ "
266 To edit individual messages using the text editor, the
267 .b edit
268 command is provided.  The
269 .b edit
270 command takes a list of messages as described under the
271 .b type
272 command and processes each by writing it into the file
273 Message\c
274 .i x
275 where
276 .i x
277 is the message number being edited and executing the text editor on it.
278 When you have edited the message to your satisfaction, write the message
279 out and quit, upon which
280 .i Mail
281 will read the message back and remove the file.
282 .b Edit
283 can be abbreviated to
284 .b e .
285 .ip "\fBelse\fP\ \ "
286 Marks the end of the then-part of an
287 .b if
288 statement and the beginning of the
289 part to take effect if the condition of the
290 .b if
291 statement is false.
292 .ip "\fBendif\fP\ \ "
293 Marks the end of an
294 .b if
295 statement.
296 .ip "\fBexit\fP or \fBxit\fP\ \ "
297 Leave
298 .i Mail
299 without updating the system mailbox or the file your were reading.
300 Thus, if you accidentally delete several messages, you can use
301 .b exit
302 to avoid scrambling your mailbox.
303 \fBExit\fP can be abbreviated to \fBex\fP or \fBx\fP.
304 .ip "\fBfile\fP\ \ "
305 The same as
306 .b folder .
307 \fBFile\fP can be abbreviated to \fBfi\fP.
308 .ip "\fBfolders\fP\ \ "
309 List the names of the folders in your folder directory.
310 .ip "\fBfolder\fP\ \ "
311 The
312 .b folder
313 command switches to a new mail file or folder.  With no arguments, it
314 tells you which file you are currently reading.  If you give
315 it an argument, it will write out changes (such as deletions)
316 you have made in the current file and read the new file.
317 Some special conventions are recognized for the name:
318 .(b
319 .TS
320 center;
321 c c
322 l a.
323 Name    Meaning
324 _
325 #       Previous file read
326 %       Your system mailbox
327 %name   \fIName\fP's system mailbox
328 &       Your ~/mbox file
329 +folder A file in your folder directory
330 .TE
331 .)b
332 \fBFolder\fP can be abbreviated to \fBfo\fP.
333 .ip "\fBfrom\fP\ \ "
334 The
335 .b from
336 command takes a list of messages and prints out the header lines for each one;
337 hence
338 .(l
339 from joe
340 .)l
341 is the easy way to display all the message headers from \*(lqjoe.\*(rq
342 \fBFrom\fP can be abbreviated to \fBf\fP.
343 .ip "\fBheaders\fP\ \ "
344 When you start up
345 .i Mail
346 to read your mail, it lists the message headers that you have.
347 These headers tell you who each message is from, when they were
348 received, how many lines and characters each message is, and the
349 .q "Subject:"
350 header field of each message, if present.  In addition,
351 .i Mail
352 tags the message header of each message that has been the object
353 of the
354 .b preserve
355 command with a
356 .q P.
357 Messages that have been
358 .b saved
359 or
360 .b written
361 are flagged with a
362 .q *.
363 Finally,
364 .b deleted
365 messages are not printed at all.  If you wish to reprint the current
366 list of message headers, you can do so with the
367 .b headers
368 command.  The
369 .b headers
370 command (and thus the initial header listing)
371 only lists the first so many message headers.
372 The number of headers listed depends on the speed of your
373 terminal.
374 This can be overridden by specifying the number of headers you
375 want with the
376 .i window
377 option.
378 .i Mail
379 maintains a notion of the current
380 .q window
381 into your messages for the purposes of printing headers.
382 Use the
383 .b z
384 command to move forward and back a window.
385 You can move
386 .i Mail's
387 notion of the current window directly to a particular message by
388 using, for example,
389 .(l
390 headers 40
391 .)l
392 to move
393 .i Mail's
394 attention to the messages around message 40.
395 If a ``+'' argument is given, then the next screenful of message headers is
396 printed, and if a ``\-'' argument is given, the previous screenful of message
397 headers is printed.
398 \fBHeaders\fP can be abbreviated to \fBh\fP.
399 .ip "\fBhelp\fP\ \ "
400 Print a brief and usually out of date help message about the commands
401 in
402 .i Mail .
403 The 
404 .i man
405 page for 
406 .i mail
407 is usually more up-to-date than either the help message or this manual.
408 It is also a synonym for \fB?\fP.
409 .ip "\fBhold\fP\ \ "
410 Arrange to hold a list of messages in the system mailbox, instead
411 of moving them to the file
412 .i mbox
413 in your home directory.  If you set the binary option
414 .i hold ,
415 this will happen by default.
416 It does not override the \fBdelete\fP command.
417 \fBHold\fP can be abbreviated to \fBho\fP.
418 .ip "\fBif\fP\ \ "
419 Commands in your
420 .q .mailrc
421 file can be executed conditionally depending on whether you are
422 sending or receiving mail with the
423 .b if
424 command.  For example, you can do:
425 .(l
426 if receive
427         \fIcommands\fP...
428 endif
429 .)l
430 An
431 .b else
432 form is also available:
433 .(l
434 if send
435         \fIcommands\fP...
436 else
437         \fIcommands\fP...
438 endif
439 .)l
440 Note that the only allowed conditions are
441 .b receive
442 and
443 .b send .
444 .ip "\fBignore\fP \ \ "
445 .b N.B.:
446 .i Ignore
447 has been superseded by
448 .i retain.
449 .br
450 Add the list of header fields named to the
451 .i "ignore list" .
452 Header fields in the ignore list are not printed on your
453 terminal when you print a message.  This allows you to suppress
454 printing of certain machine-generated header fields, such as
455 .i Via
456 which are not usually of interest.  The
457 .b Type
458 and
459 .b Print
460 commands can be used to print a message in its entirety, including
461 ignored fields.
462 If
463 .b ignore
464 is executed with no arguments, it lists the current set of ignored fields.
465 .ip "\fBlist\fP\ \ "
466 List the valid
467 .i Mail
468 commands.
469 \fBList\fP can be abbreviated to \fBl\fP.
470 .\".ip \fBlocal\fP
471 .\"Define a list of local names for this host. This command is useful
472 .\"when the host is known by more than one name. Names in the list
473 .\"may be qualified be the domain of the host. The first name on the local
474 .\"list is the
475 .\".i distinguished
476 .\"name of the host.
477 .\"The names on the local list are used by
478 .\".i Mail
479 .\"to decide which addresses are local to the host.
480 .\"For example:
481 .\".(l
482 .\"local ucbarpa.BERKELEY.ARPA arpa.BERKELEY.ARPA \\
483 .\"     arpavax.BERKELEY.ARPA r.BERKELEY.ARPA \\
484 .\"     ucb-arpa.ARPA
485 .\".)l
486 .\"From this list we see that
487 .\".i "fred@ucbarpa.BERKELEY.ARPA",
488 .\".i "harold@arpa.BERKELEY",
489 .\"and
490 .\".i "larry@r"
491 .\"are all addresses of users on the local host.
492 .\"The
493 .\".b local
494 .\"command is usually not used be general users since it is designed for
495 .\"local configuration; it is usually found in the file /etc/mail.rc.
496 .ip "\fBmail\fP\ \ "
497 Send mail to one or more people.  If you have the
498 .i ask
499 option set,
500 .i Mail
501 will prompt you for a subject to your message.  Then you
502 can type in your message, using tilde escapes as described in
503 section 4 to edit, print, or modify your message.  To signal your
504 satisfaction with the message and send it, type control-d at the
505 beginning of a line, or a . alone on a line if you set the option
506 .i dot .
507 To abort the message, type two interrupt characters (\s-2RUBOUT\s0
508 by default) in a row or use the
509 .b ~q
510 escape.
511 The \fBmail\fP command can be abbreviated to \fBm\fP.
512 .ip "\fBmbox\fP\ \ "
513 Indicate that a list of messages be sent to
514 .i mbox
515 in your home directory when you quit.  This is the default
516 action for messages if you do
517 .i not
518 have the
519 .i hold
520 option set.
521 .ip "\fBnext\fP or \fB+\fP\ \ "
522 The
523 .b next
524 command goes to the next message and types it.  If given a message list,
525 .b next
526 goes to the first such message and types it.  Thus,
527 .(l
528 next root
529 .)l
530 goes to the next message sent by
531 .q root
532 and types it.  The
533 .b next
534 command can be abbreviated to simply a newline, which means that one
535 can go to and type a message by simply giving its message number or
536 one of the magic characters
537 .q "^"
538 .q "."
539 or
540 .q "$".
541 Thus,
542 .(l
543 \&.
544 .)l
545 prints the current message and
546 .(l
547 4
548 .)l
549 prints message 4, as described previously.
550 \fBNext\fP can be abbreviated to \fBn\fP.
551 .ip "\fBpreserve\fP\ \ "
552 Same as
553 .b hold .
554 Cause a list of messages to be held in your system mailbox when you quit.
555 \fBPreserve\fP can be abbreviated to \fBpre\fP.
556 .ip "\fBprint\fP\ \ "
557 Print the specified messages. If the
558 .b crt
559 variable is set, messages longer than the number of lines it indicates
560 are paged through the command specified by the \fBPAGER\fP variable.
561 The \fBprint\fP command can be abbreviated to \fBp\fP.
562 .ip "\fBquit\fP\ \ "
563 Terminates the session, saving all undeleted, unsaved and unwritten messages 
564 in the user's \fImbox\fP file in their login directory
565 (messages marked as having been read), preserving all
566 messages marked with \fBhold\fP or \fBpreserve\fP or never referenced
567 in their system mailbox.
568 Any messages that were deleted, saved, written or saved to \fImbox\fP are
569 removed from their system mailbox.
570 If new mail has arrived during the session, the message
571 ``You have new mail'' is given.  If given while editing a mailbox file
572 with the \fB\-f\fP flag, then the edit file is rewritten.
573 A return to the Shell is effected, unless the rewrite of edit file fails,
574 in which case the user can escape with the \fBexit\fP command.
575 \fBQuit\fP can be abbreviated to \fBq\fP.
576 .ip "\fBreply\fP or \fBrespond\fP\ \ "
577 Frame a reply to a single message.
578 The reply will be sent to the
579 person who sent you the message (to which you are replying), plus all
580 the people who received the original message, except you.  You can
581 add people using the \fB~t\fP, \fB~c\fP and \fB~b\fP
582 tilde escapes.  The subject in your reply is formed by prefacing the
583 subject in the original message with
584 .q "Re:"
585 unless it already began thus.
586 If the original message included a
587 .q "reply-to"
588 header field, the reply will go
589 .i only
590 to the recipient named by
591 .q "reply-to."
592 You type in your message using the same conventions available to you
593 through the
594 .b mail
595 command.
596 The \fBreply\fP (and \fBrespond\fP) command can be abbreviated to \fBr\fP.
597 .ip "\fBretain\fP\ \ "
598 Add the list of header fields named to the \fIretained list\fP.
599 Only the header fields in the retain list
600 are shown on your terminal when you print a message.
601 All other header fields are suppressed.
602 The
603 .b Type
604 and
605 .b Print
606 commands can be used to print a message in its entirety.
607 If
608 .b retain
609 is executed with no arguments, it lists the current set of
610 retained fields.
611 .ip "\fBsave\fP\ \ "
612 It is often useful to be able to save messages on related topics
613 in a file.  The
614 .b save
615 command gives you the ability to do this.  The
616 .b save
617 command takes as an argument a list of message numbers, followed by
618 the name of the file in which to save the messages.  The messages
619 are appended to the named file, thus allowing one to keep several
620 messages in the file, stored in the order they were put there.
621 The filename in quotes, followed by the line
622 count and character count is echoed on the user's terminal.
623 An example of the
624 .b save
625 command relative to our running example is:
626 .(l
627 s 1 2 tuitionmail
628 .)l
629 .b Saved
630 messages are not automatically saved in
631 .i mbox
632 at quit time, nor are they selected by the
633 .b next
634 command described above, unless explicitly specified.
635 \fBSave\fP can be abbreviated to \fBs\fP.
636 .ip "\fBset\fP\ \ "
637 Set an option or give an option a value.  Used to customize
638 .i Mail .
639 Section 5.3 contains a list of the options.  Options can be
640 .i binary ,
641 in which case they are
642 .i on
643 or
644 .i off ,
645 or
646 .i valued .
647 To set a binary option
648 .i option
649 .i on ,
650 do
651 .(l
652 set option
653 .)l
654 To give the valued option
655 .i option
656 the value
657 .i value ,
658 do
659 .(l
660 set option=value
661 .)l
662 There must be no space before or after the ``='' sign.
663 If no arguments are given, all variable values are printed.
664 Several options can be specified in a single
665 .b set
666 command.
667 \fBSet\fP can be abbreviated to \fBse\fP.
668 .ip "\fBshell\fP\ \ "
669 The
670 .b shell
671 command allows you to
672 escape to the shell.
673 .b Shell
674 invokes an interactive shell and allows you to type commands to it.
675 When you leave the shell, you will return to
676 .i Mail .
677 The shell used is a default assumed by
678 .i Mail ;
679 you can override this default by setting the valued option
680 .q SHELL,
681 eg:
682 .(l
683 set SHELL=/bin/csh
684 .)l
685 \fBShell\fP can be abbreviated to \fBsh\fP.
686 .ip "\fBsize\fP\ \ "
687 Takes a message list and prints out the size in characters of each
688 message.
689 .ip "\fBsource\fP\ \ "
690 The
691 .b source
692 command reads
693 .i mail
694 commands from a file.  It is useful when you are trying to fix your
695 .q .mailrc
696 file and you need to re-read it.
697 \fBSource\fP can be abbreviated to \fBso\fP.
698 .ip "\fBtop\fP\ \ "
699 The
700 .b top
701 command takes a message list and prints the first five lines
702 of each addressed message.
703 If you wish, you can change the number of lines that
704 .b top
705 prints out by setting the valued option
706 .q "toplines."
707 On a CRT terminal,
708 .(l
709 set toplines=10
710 .)l
711 might be preferred.
712 \fBTop\fP can be abbreviated to \fBto\fP.
713 .ip "\fBtype\fP\ \ "
714 Same as \fBprint\fP.
715 Takes a message list and types out each message on the terminal.
716 The \fBtype\fP command can be abbreviated to \fBt\fP.
717 .ip "\fBundelete\fP \ \"
718 Takes a message list and marks each message as \fInot\fP
719 being deleted.
720 \fBUndelete\fP can be abbreviated to \fBu\fP.
721 .ip "\fBunread\fP\ \ "
722 Takes a message list and marks each message as
723 .i not
724 having been read.
725 \fBUnread\fP can be abbreviated to \fBU\fP.
726 .ip "\fBunset\fP\ \ "
727 Takes a list of option names and discards their remembered values;
728 the inverse of \fBset\fP .
729 .ip "\fBvisual\fP\ \ "
730 It is often useful to be able to invoke one of two editors,
731 based on the type of terminal one is using.  To invoke
732 a display oriented editor, you can use the
733 .b visual
734 command.  The operation of the
735 .b visual
736 command is otherwise identical to that of the
737 .b edit
738 command.
739 .ne 2v+\n(psu
740 .sp \n(psu
741 Both the
742 .b edit
743 and
744 .b visual
745 commands assume some default text editors.  These default editors
746 can be overridden by the valued options
747 .q EDITOR
748 and
749 .q VISUAL
750 for the standard and screen editors.  You might want to do:
751 .(l
752 set EDITOR=/usr/bin/ex VISUAL=/usr/bin/vi
753 .)l
754 \fBVisual\fP can be abbreviated to \fBv\fP.
755 .ip "\fBwrite\fP\ \ "
756 The
757 .b save
758 command always writes the entire message, including the headers,
759 into the file.  If you want to write just the message itself, you
760 can use the
761 .b write
762 command.  The
763 .b write
764 command has the same syntax as the
765 .b save
766 command, and can be abbreviated to simply
767 .b w .
768 Thus, we could write the second message by doing:
769 .(l
770 w 2 file.c
771 .)l
772 As suggested by this example, the
773 .b write
774 command is useful for such tasks as sending and receiving
775 source program text over the message system.
776 The filename in quotes, followed by the line
777 count and character count is echoed on the user's terminal.
778 .ip "\fBz\fP\ \ "
779 .i Mail
780 presents message headers in windowfuls as described under
781 the
782 .b headers
783 command.
784 You can move
785 .i Mail's
786 attention forward to the next window by giving the
787 .(l
788 z+
789 .)l
790 command.  Analogously, you can move to the previous window with:
791 .(l
792 z\-
793 .)l
794 .sh 2 "Custom options"
795 .pp
796 Throughout this manual, we have seen examples of binary and valued options.
797 This section describes each of the options in alphabetical order, including
798 some that you have not seen yet.
799 To avoid confusion, please note that the options are either
800 all lower case letters or all upper case letters.  When I start a sentence
801 such as:
802 .q "Ask"
803 causes
804 .i Mail
805 to prompt you for a subject header,
806 I am only capitalizing
807 .q ask
808 as a courtesy to English.
809 .ip "\fBEDITOR\fP\ \ "
810 The valued option
811 .q EDITOR
812 defines the pathname of the text editor to be used in the
813 .b edit
814 command and ~e.  If not defined, a standard editor is used.
815 .ip "\fBPAGER\fP\ \ "
816 Pathname of the program to use for paginating output when
817 it exceeds \fIcrt\fP lines.
818 A default paginator is used if this option is not defined.
819 .ip "\fBSHELL\fP\ \ "
820 The valued option
821 .q SHELL
822 gives the path name of your shell.  This shell is used for the
823 .b !
824 command and ~! escape.  In addition, this shell expands
825 file names with shell metacharacters like * and ? in them.
826 .ip "\fBVISUAL\fP\ \ "
827 The valued option
828 .q VISUAL
829 defines the pathname of the screen editor to be used in the
830 .b visual
831 command
832 and ~v escape.  A standard screen editor is used if you do not define one.
833 .ip "\fBappend\fP\ \ "
834 The
835 .q append
836 option is binary and
837 causes messages saved in
838 .i mbox
839 to be appended to the end rather than prepended.
840 Normally, \fIMail\fP will put messages in \fImbox\fP
841 in the same order that the system puts messages in your system mailbox.
842 By setting
843 .q append,
844 you are requesting that
845 .i mbox
846 be appended to regardless.  It is in any event quicker to append.
847 .ip "\fBask\fP\ \ "
848 .q "Ask"
849 is a binary option which
850 causes
851 .i Mail
852 to prompt you for the subject of each message you send.
853 If you respond with simply a newline, no subject field will be sent.
854 .ip "\fBaskcc\fP\ \ "
855 .q Askcc
856 is a binary option which
857 causes you to be prompted for additional carbon copy recipients at the
858 end of each message.  Responding with a newline shows your
859 satisfaction with the current list.
860 .ip "\fBautoprint\fP\ \ "
861 .q Autoprint
862 is a binary option which
863 causes the
864 .b delete
865 command to behave like
866 .b dp
867 \*- thus, after deleting a message, the next one will be typed
868 automatically.  This is useful when quickly scanning and deleting
869 messages in your mailbox.
870 .ip "\fBcrt\fP \ \ "
871 The valued option
872 .q crt
873 is used as a threshold to determine how long a message must
874 be before
875 .b PAGER
876 is used to read it.
877 .ip "\fBdebug\fP \ \ "
878 The binary option
879 .q debug
880 causes debugging information to be displayed. Use of this
881 option is the same as using the \fB\-d\fP command line flag.
882 .ip "\fBdot\fP\ \ "
883 .q Dot
884 is a binary option which, if set, causes
885 .i Mail
886 to interpret a period alone on a line as the terminator
887 of the message you are sending.
888 .ip "\fBescape\fP\ \ "
889 To allow you to change the escape character used when sending
890 mail, you can set the valued option
891 .q escape.
892 Only the first character of the
893 .q escape
894 option is used, and it must be doubled if it is to appear as
895 the first character of a line of your message.  If you change your escape
896 character, then ~ loses all its special meaning, and need no longer be doubled
897 at the beginning of a line.
898 .ip "\fBfolder\fP\ \ "
899 The name of the directory to use for storing folders of messages.
900 If this name begins with a `/'
901 .i Mail
902 considers it to be an absolute pathname; otherwise, the folder directory
903 is found relative to your home directory.
904 .ip "\fBhold\fP\ \ "
905 The binary option
906 .q hold
907 causes messages that have been read but not manually dealt with
908 to be held in the system mailbox. This prevents such messages from
909 being automatically swept into your \fImbox\fP file.
910 .ip "\fBignore\fP\ \ "
911 The binary option
912 .q ignore
913 causes \s-2RUBOUT\s0 characters from your terminal to be ignored and echoed
914 as @'s while you are sending mail.  \s-2RUBOUT\s0 characters retain their
915 original meaning in
916 .i Mail
917 command mode.
918 Setting the
919 .q ignore
920 option is equivalent to supplying the
921 .b \-i
922 flag on the command line as described in section 6.
923 .ip "\fBignoreeof\fP\ \ "
924 An option related to
925 .q dot
926 is
927 .q ignoreeof
928 which makes
929 .i Mail
930 refuse to accept a control\-d as the end of a message.
931 .q Ignoreeof
932 also applies to
933 .i Mail
934 command mode.
935 .ip "\fBkeep\fP\ \ "
936 The
937 .q keep
938 option causes
939 .i Mail
940 to truncate your system mailbox instead of deleting it when it
941 is empty.  This is useful if you elect to protect your mailbox, which
942 you would do with the shell command:
943 .(l
944 chmod 600 /var/mail/yourname
945 .)l
946 where
947 .i yourname
948 is your login name.  If you do not do this, anyone can probably read
949 your mail, although people usually don't.
950 .ip "\fBkeepsave\fP\ \ "
951 When you
952 .b save
953 a message,
954 .i Mail
955 usually discards it when you
956 .b quit .
957 To retain all saved messages, set the
958 .q keepsave
959 option.
960 .ip "\fBmetoo\fP\ \ "
961 When sending mail to an alias,
962 .i Mail
963 makes sure that if you are included in the alias, that mail will not
964 be sent to you.  This is useful if a single alias is being used by
965 all members of the group.  If however, you wish to receive a copy of
966 all the messages you send to the alias, you can set the binary option
967 .q metoo.
968 .ip "\fBnoheader\fP\ \ "
969 The binary option
970 .q noheader
971 suppresses the printing of the version and headers when
972 .i Mail
973 is first invoked. Setting this option is the same as using
974 .b \-N
975 on the command line.
976 .ip "\fBnosave\fP\ \ "
977 Normally,
978 when you abort a message with two \s-2RUBOUTs\s0,
979 .i Mail
980 copies the partial letter to the file
981 .q dead.letter
982 in your home directory.  Setting the binary option
983 .q nosave
984 prevents this.
985 .ip "\fBReplyall\fP\ \ "
986 Reverses the sense of
987 .i reply
988 and
989 .i Reply
990 commands.
991 .ip "\fBquiet\fP\ \ "
992 The binary option
993 .q quiet
994 suppresses the printing of the version when
995 .i Mail
996 is first invoked,
997 as well as printing the for example
998 .q "Message 4:"
999 from the
1000 .b type
1001 command.
1002 .ip "\fBrecord\fP\ \ "
1003 If you love to keep records, then the
1004 valued option
1005 .q record
1006 can be set to the name of a file to save your outgoing mail.
1007 Each new message you send is appended to the end of the file.
1008 .ip "\fBscreen\fP\ \ "
1009 When
1010 .i Mail
1011 initially prints the message headers, it determines the number to
1012 print by looking at the speed of your terminal.  The faster your
1013 terminal, the more it prints.
1014 The valued option
1015 .q screen
1016 overrides this calculation and
1017 specifies how many message headers you want printed.
1018 This number is also used for scrolling with the
1019 .b z
1020 command.
1021 .ip "\fBsendmail\fP\ \ "
1022 To use an alternate mail delivery system, set the
1023 .q sendmail
1024 option to the full pathname of the program to use.  Note:  this is not
1025 for everyone!  Most people should use the default delivery system.
1026 .ip "\fBtoplines\fP\ \ "
1027 The valued option
1028 .q toplines
1029 defines the number of lines that the
1030 .q top
1031 command will print out instead of the default five lines.
1032 .ip "\fBverbose\fP\ \ "
1033 The binary option "verbose" causes
1034 .i Mail
1035 to invoke sendmail with the 
1036 .b \-v
1037 flag, which causes it to go into verbose mode and announce expansion
1038 of aliases, etc. Setting the "verbose" option is equivalent to
1039 invoking
1040 .i Mail
1041 with the
1042 .b \-v
1043 flag as described in section 6.