|
|
1.1 root 1: .bp
2: .sh 1 "Additional features"
3: .pp
4: This section describes some additional commands of use for
5: reading your mail, setting options, and handling lists of messages.
6: .sh 2 "Message lists"
7: .pp
8: Several
9: .i Mail
10: commands accept a list of messages as an argument.
11: Along with
12: .b type
13: and
14: .b delete ,
15: described in section 2,
16: there is the
17: .b from
18: command, which prints the message headers associated with the
19: message list passed to it.
20: The
21: .b from
22: command is particularly useful in conjunction with some of the
23: message list features described below.
24: .pp
25: A
26: .i "message list"
27: consists of a list of message numbers, ranges, and names,
28: separated by spaces or tabs. Message numbers may be either
29: decimal numbers, which directly specify messages, or one of the
30: special characters
31: .q \(ua
32: .q "."
33: or
34: .q "$"
35: to specify the first relevant, current, or last
36: relevant message, respectively.
37: .i Relevant
38: here means, for most commands
39: .q "not deleted"
40: and
41: .q "deleted"
42: for the
43: .b undelete
44: command.
45: .pp
46: A range of messages consists of two message numbers (of the form
47: described in the previous paragraph) separated by a dash.
48: Thus, to print the first four messages, use
49: .(l
50: type 1\-4
51: .)l
52: and to print all the messages from the current message to the last
53: message, use
54: .(l
55: type .\-$
56: .)l
57: .pp
58: A
59: .i name
60: is a user name. The user names given in the message list are
61: collected together and each message selected by other means
62: is checked to make sure it was sent by one of the named users.
63: If the message consists entirely of user names, then every
64: message sent by one those users that is
65: .i relevant
66: (in the sense described earlier)
67: is selected. Thus, to print every message sent to you by
68: .q root,
69: do
70: .(l
71: type root
72: .)l
73: .pp
74: As a shorthand notation, you can specify simply
75: .q *
76: to get every
77: .i relevant
78: (same sense)
79: message. Thus,
80: .(l
81: type *
82: .)l
83: prints all undeleted messages,
84: .(l
85: delete *
86: .)l
87: deletes all undeleted messages, and
88: .(l
89: undelete *
90: .)l
91: undeletes all deleted messages.
92: .pp
93: You can search for the presence of a word in subject lines with
94: .b / .
95: For example, to print the headers of all messages that contain the
96: word
97: .q PASCAL,
98: do:
99: .(l
100: from /pascal
101: .)l
102: Note that subject searching ignores upper/lower case differences.
103: .sh 2 "List of commands"
104: .pp
105: This section describes all the
106: .i Mail
107: commands available when
108: receiving mail.
109: .ip \fB!\fP
110: Used to preface a command to be executed by the shell.
111: .ip \fB\-\fP
112: The
113: .rb \-
114: command goes to the previous message and prints it. The
115: .rb \-
116: command may be given a decimal number
117: .i n
118: as an argument, in which case the
119: .i n th
120: previous message is gone to and printed.
121: .ip \fBReply\fP
122: Note the capital R in the name.
123: Frame a reply to a one or more messages.
124: The reply (or replies if you are using this on multiple messages)
125: will be sent ONLY to the person who sent you the message
126: (respectively, the set of people who sent the messages you are
127: replying to).
128: You can
129: add people using the
130: .b ~t
131: and
132: .b ~c
133: tilde escapes. The subject in your reply is formed by prefacing the
134: subject in the original message with
135: .q "Re:"
136: unless it already began thus.
137: If the original message included a
138: .q "reply-to"
139: header field, the reply will go
140: .i only
141: to the recipient named by
142: .q "reply-to."
143: You type in your message using the same conventions available to you
144: through the
145: .b mail
146: command.
147: The
148: .b Reply
149: command is especially useful for replying to messages that were sent
150: to enormous distribution groups when you really just want to
151: send a message to the originator. Use it often.
152: .ip \fBalias\fP
153: Define a name to stand for a set of other names.
154: This is used when you want to send messages to a certain
155: group of people and want to avoid retyping their names.
156: For example
157: .(l
158: alias project john sue willie kathryn
159: .)l
160: creates an alias
161: .i project
162: which expands to the four people John, Sue, Willie, and Kathryn.
163: .ip \fBalternates\fP
164: If you have accounts on several machines, you may find it convenient
165: to use the /usr/lib/aliases on all the machines except one to direct
166: your mail to a single account.
167: The
168: .b alternates
169: command is used to inform
170: .i Mail
171: that each of these other addresses is really
172: .i you .
173: .i Alternates
174: takes a list of user names and remembers that they are all actually you.
175: When you
176: .b reply
177: to messages that were sent to one of these alternate names,
178: .i Mail
179: will not bother to send a copy of the message to this other address (which
180: would simply be directed back to you by the alias mechanism).
181: If
182: .i alternates
183: is given no argument, it lists the current set of alternate names.
184: .b Alternates
185: is usually used in the .mailrc file.
186: .ip \fBchdir\fP
187: The
188: .b chdir
189: command allows you to change your current directory.
190: .b Chdir
191: takes a single argument, which is taken to be the pathname of
192: the directory to change to. If no argument is given,
193: .b chdir
194: changes to your home directory.
195: .ip \fBcopy\fP
196: The
197: .b copy
198: command does the same thing that
199: .b save
200: does, except that it does not mark the messages it is used on
201: for deletion when you quit.
202: .ip \fBdelete\fP
203: Deletes a list of messages. Deleted messages can be reclaimed
204: with the
205: .b undelete
206: command.
207: .ip \fBdt\fP
208: The
209: .b dt
210: command deletes the current message and prints the next message.
211: It is useful for quickly reading and disposing of mail.
212: .ip \fBedit\fP
213: To edit individual messages using the text editor, the
214: .b edit
215: command is provided. The
216: .b edit
217: command takes a list of messages as described under the
218: .b type
219: command and processes each by writing it into the file
220: Message\c
221: .i x
222: where
223: .i x
224: is the message number being edited and executing the text editor on it.
225: When you have edited the message to your satisfaction, write the message
226: out and quit, upon which
227: .i Mail
228: will read the message back and remove the file.
229: .b Edit
230: may be abbreviated to
231: .b e .
232: .ip \fBelse\fP
233: Marks the end of the then-part of an
234: .b if
235: statement and the beginning of the
236: part to take effect if the condition of the
237: .b if
238: statement is false.
239: .ip \fBendif\fP
240: Marks the end of an
241: .b if
242: statement.
243: .ip \fBexit\fP
244: Leave
245: .i Mail
246: without updating the system mailbox or the file your were reading.
247: Thus, if you accidentally delete several messages, you can use
248: .b exit
249: to avoid scrambling your mailbox.
250: .ip \fBfile\fP
251: The same as
252: .b folder .
253: .ip \fBfolders\fP
254: List the names of the folders in your folder directory.
255: .ip \fBfolder\fP
256: The
257: .b folder
258: command switches to a new mail file or folder. With no arguments, it
259: tells you which file you are currently reading. If you give
260: it an argument, it will write out changes (such as deletions)
261: you have made in the current file and read the new file.
262: Some special conventions are recognized for the name:
263: .(b
264: .TS
265: center;
266: c c
267: l a.
268: Name Meaning
269: _
270: # Previous file read
271: % Your system mailbox
272: %name \fIName\fP's system mailbox
273: & Your ~/mbox file
274: +folder A file in your folder directory
275: .TE
276: .)b
277: .ip \fBfrom\fP
278: The
279: .b from
280: command takes a list of messages and prints out the header lines for each one;
281: hence
282: .(l
283: from joe
284: .)l
285: is the easy way to display all the message headers from \*(lqjoe.\*(rq
286: .ip \fBheaders\fP
287: When you start up
288: .i Mail
289: to read your mail, it lists the message headers that you have.
290: These headers tell you who each message is from, when they were
291: sent, how many lines and characters each message is, and the
292: .q "Subject:"
293: header field of each message, if present. In addition,
294: .i Mail
295: tags the message header of each message that has been the object
296: of the
297: .b preserve
298: command with a
299: .q P.
300: Messages that have been
301: .b saved
302: or
303: .b written
304: are flagged with a
305: .q *.
306: Finally,
307: .b deleted
308: messages are not printed at all. If you wish to reprint the current
309: list of message headers, you can do so with the
310: .b headers
311: command. The
312: .b headers
313: command (and thus the initial header listing)
314: only lists the first so many message headers.
315: The number of headers listed depends on the speed of your
316: terminal.
317: This can be overridden by specifying the number of headers you
318: want with the
319: .i window
320: option.
321: .i Mail
322: maintains a notion of the current
323: .q window
324: into your messages for the purposes of printing headers.
325: Use the
326: .b z
327: command to move forward and back a window.
328: You can move
329: .i Mail's
330: notion of the current window directly to a particular message by
331: using, for example,
332: .(l
333: headers 40
334: .)l
335: to move
336: .i Mail's
337: attention to the messages around message 40. The
338: .b headers
339: command can be abbreviated to
340: .b h .
341: .ip \fBhelp\fP
342: Print a brief and usually out of date help message about the commands
343: in
344: .i Mail .
345: Refer to this manual instead.
346: .ip \fBhold\fP
347: Arrange to hold a list of messages in the system mailbox, instead
348: of moving them to the file
349: .i mbox
350: in your home directory. If you set the binary option
351: .i hold ,
352: this will happen by default.
353: .ip \fBif\fP
354: Commands in your
355: .q .mailrc
356: file can be executed conditionally depending on whether you are
357: sending or receiving mail with the
358: .b if
359: command. For example, you can do:
360: .(l
361: if receive
362: \fIcommands\fP...
363: endif
364: .)l
365: An
366: .b else
367: form is also available:
368: .(l
369: if send
370: \fIcommands\fP...
371: else
372: \fIcommands\fP...
373: endif
374: .)l
375: Note that the only allowed conditions are
376: .b receive
377: and
378: .b send .
379: .ip \fBignore\fP
380: Ignore a list of headers.
381: If you use
382: .b p
383: to print messages,
384: these headers
385: will not
386: be printed.
387: If you use
388: .b P ,
389: the headers
390: will be printed.
391: .ip \fBmail\fP
392: Send mail to one or more people. If you have the
393: .i ask
394: option set,
395: .i Mail
396: will prompt you for a subject to your message. Then you
397: can type in your message, using tilde escapes as described in
398: section 4 to edit, print, or modify your message. To signal your
399: satisfaction with the message and send it, type control-d at the
400: beginning of a line, or a . alone on a line if you set the option
401: .i dot .
402: To abort the message, type two interrupt characters (\s-2RUBOUT\s0
403: by default) in a row or use the
404: .b ~q
405: escape.
406: .ip \fBmbox\fP
407: Indicate that a list of messages be sent to
408: .i mbox
409: in your home directory when you quit. This is the default
410: action for messages if you do
411: .i not
412: have the
413: .i hold
414: option set.
415: .ip \fBnext\fP
416: The
417: .b next
418: command goes to the next message and types it. If given a message list,
419: .b next
420: goes to the first such message and types it. Thus,
421: .(l
422: next root
423: .)l
424: goes to the next message sent by
425: .q root
426: and types it. The
427: .b next
428: command can be abbreviated to simply a newline, which means that one
429: can go to and type a message by simply giving its message number or
430: one of the magic characters
431: .q "\(ua"
432: .q "."
433: or
434: .q "$".
435: Thus,
436: .(l
437: \&.
438: .)l
439: prints the current message and
440: .(l
441: 4
442: .)l
443: prints message 4, as described previously.
444: .ip \fBpreserve\fP
445: Same as
446: .b hold .
447: Cause a list of messages to be held in your system mailbox when you quit.
448: .ip \fBquit\fP
449: Leave
450: .i Mail
451: and update the file, folder, or system mailbox your were reading.
452: Messages that you have examined are marked as
453: .q read
454: and messages that existed when you started are marked as
455: .q old.
456: If you were editing your system mailbox and
457: if you have set the binary option
458: .i hold ,
459: all messages which have not been deleted, saved, or mboxed
460: will be retained in your system mailbox.
461: If you were editing your system mailbox and
462: you did
463: .i not
464: have
465: .i hold
466: set, all messages which have not been deleted, saved, or preserved
467: will be moved to the file
468: .i mbox
469: in your home directory.
470: .ip \fBreply\fP
471: Frame a reply to a single message.
472: The reply will be sent to the
473: person who sent you the message to which you are replying, plus all
474: the people who received the original message, except you. You can
475: add people using the
476: .b ~t
477: and
478: .b ~c
479: tilde escapes. The subject in your reply is formed by prefacing the
480: subject in the original message with
481: .q "Re:"
482: unless it already began thus.
483: If the original message included a
484: .q "reply-to"
485: header field, the reply will go
486: .i only
487: to the recipient named by
488: .q "reply-to."
489: You type in your message using the same conventions available to you
490: through the
491: .b mail
492: command.
493: .ip \fBsave\fP
494: It is often useful to be able to save messages on related topics
495: in a file. The
496: .b save
497: command gives you ability to do this. The
498: .b save
499: command takes as argument a lit of message numbers, followed by
500: the name of the file on which to save the messages. The messages
501: are appended to the named file, thus allowing one to keep several
502: messages in the file, stored in the order they were put there.
503: If the named file is preceded by the pipe symbol
504: .q "|"
505: the messages will be piped to the specified command.
506: The
507: .b save
508: command can be abbreviated to
509: .b s .
510: An example of the
511: .b save
512: command relative to our running example is:
513: .(l
514: s 1 2 tuitionmail
515: .)l
516: An example of saving to a hardcopy device is:
517: .(l
518: s 1 2 | opr
519: .)l
520: .b Saved
521: messages are not automatically saved in
522: .i mbox
523: at quit time, nor are they selected by the
524: .b next
525: command described above, unless explicitly specified.
526: .ip \fBset\fP
527: Set an option or give an option a value. Used to customize
528: .i Mail .
529: Section 5.3 contains a list of the options. Options can be
530: .i binary ,
531: in which case they are
532: .i on
533: or
534: .i off ,
535: or
536: .i valued .
537: To set a binary option
538: .i option
539: .i on ,
540: do
541: .(l
542: set option
543: .)l
544: To give the valued option
545: .i option
546: the value
547: .i value ,
548: do
549: .(l
550: set option=value
551: .)l
552: Several options can be specified in a single
553: .b set
554: command.
555: .ip \fBshell\fP
556: The
557: .b shell
558: command allows you to
559: escape to the shell.
560: .b Shell
561: invokes an interactive shell and allows you to type commands to it.
562: When you leave the shell, you will return to
563: .i Mail .
564: The shell used is a default assumed by
565: .i Mail ;
566: you can override this default by setting the valued option
567: .q SHELL,
568: eg:
569: .(l
570: set SHELL=/bin/csh
571: .)l
572: .ip \fBsource\fP
573: The
574: .b source
575: command reads
576: .i Mail
577: commands from a file. It is useful when you are trying to fix your
578: .q .mailrc
579: file and you need to re-read it.
580: .ip \fBtop\fP
581: The
582: .b top
583: command takes a message list and prints the first five lines
584: of each addressed message. It may be abbreviated to
585: .b to .
586: If you wish, you can change the number of lines that
587: .b top
588: prints out by setting the valued option
589: .q "toplines."
590: On a CRT terminal,
591: .(l
592: set toplines=10
593: .)l
594: might be preferred.
595: .ip \fBtype\fP
596: Print a list of messages on your terminal. If you have set the
597: option
598: .i crt
599: to a number and the total number of lines in the messages you are
600: printing exceed that specified by
601: .i crt ,
602: the messages will be printed by a terminal paging program such as
603: .i more .
604: .ip \fBundelete\fP
605: The
606: .b undelete
607: command causes a message that had been deleted previously to regain
608: its initial status. Only messages that have been deleted may be
609: undeleted. This command may be abbreviated to
610: .b u .
611: .ip \fBunset\fP
612: Reverse the action of setting a binary or valued option.
613: .ip \fBvisual\fP
614: It is often useful to be able to invoke one of two editors,
615: based on the type of terminal one is using. To invoke
616: a display oriented editor, you can use the
617: .b visual
618: command. The operation of the
619: .b visual
620: command is otherwise identical to that of the
621: .b edit
622: command.
623: .ne 2v+\n(psu
624: .sp \n(psu
625: Both the
626: .b edit
627: and
628: .b visual
629: commands assume some default text editors. These default editors
630: can be overridden by the valued options
631: .q EDITOR
632: and
633: .q VISUAL
634: for the standard and screen editors. You might want to do:
635: .(l
636: set EDITOR=/usr/ucb/ex VISUAL=/usr/ucb/vi
637: .)l
638: .ip \fBwrite\fP
639: The
640: .b save
641: command always writes the entire message, including the headers,
642: into the file. If you want to write just the message itself, you
643: can use the
644: .b write
645: command. The
646: .b write
647: command has the same syntax as the
648: .b save
649: command, and can be abbreviated to simply
650: .b w .
651: Thus, we could write the second message by doing:
652: .(l
653: w 2 file.c
654: .)l
655: As suggested by this example, the
656: .b write
657: command is useful for such tasks as sending and receiving
658: source program text over the message system.
659: .ip \fBz\fP
660: .i Mail
661: presents message headers in windowfuls as described under
662: the
663: .b headers
664: command.
665: You can move
666: .i Mail's
667: attention forward to the next window by giving the
668: .(l
669: z+
670: .)l
671: command. Analogously, you can move to the previous window with:
672: .(l
673: z\-
674: .)l
675: .sh 2 "Custom options"
676: .pp
677: Throughout this manual, we have seen examples of binary and valued options.
678: This section describes each of the options in alphabetical order, including
679: some that you have not seen yet.
680: To avoid confusion, please note that the options are either
681: all lower case letters or all upper case letters. When I start a sentence
682: such as:
683: .q "Ask"
684: causes
685: .i Mail
686: to prompt you for a subject header,
687: I am only capitalizing
688: .q ask
689: as a courtesy to English.
690: .ip \fBEDITOR\fP
691: The valued option
692: .q EDITOR
693: defines the pathname of the text editor to be used in the
694: .b edit
695: command and ~e. If not defined, a standard editor is used.
696: .ip \fBSHELL\fP
697: The valued option
698: .q SHELL
699: gives the path name of your shell. This shell is used for the
700: .b !
701: command and ~! escape. In addition, this shell expands
702: file names with shell metacharacters like * and ? in them.
703: .ip \fBVISUAL\fP
704: The valued option
705: .q VISUAL
706: defines the pathname of your screen editor for use in the
707: .b visual
708: command
709: and ~v escape. A standard screen editor is used if you do not define one.
710: .ip \fBappend\fP
711: The
712: .q append
713: option is binary and
714: causes messages saved in
715: .i mbox
716: to be appended to the end rather than prepended.
717: Normally,
718: .i Mail will put messages in
719: .i mbox
720: in the same order that the system puts messages in your system mailbox.
721: By setting
722: .q append,
723: you are requesting that
724: .i mbox
725: be appended to regardless. It is in any event quicker to append.
726: .ip \fBask\fP
727: .q "Ask"
728: is a binary option which
729: causes
730: .i Mail
731: to prompt you for the subject of each message you send.
732: If you respond with simply a newline, no subject field will be sent.
733: .ip \fBaskcc\fP
734: .q Askcc
735: is a binary option which
736: causes you to be prompted for additional carbon copy recipients at the
737: end of each message. Responding with a newline shows your
738: satisfaction with the current list.
739: .ip \fBautoprint\fP
740: .q Autoprint
741: is a binary option which
742: causes the
743: .b delete
744: command to behave like
745: .b dp
746: \*- thus, after deleting a message, the next one will be typed
747: automatically. This is useful to quickly scanning and deleting
748: messages in your mailbox.
749: .ip \fBdot\fP
750: .q Dot
751: is a binary option which, if set, causes
752: .i Mail
753: to interpret a period alone on a line as the terminator
754: of a message you are sending.
755: .ip \fBescape\fP
756: To allow you to change the escape character used when sending
757: mail, you can set the valued option
758: .q escape.
759: Only the first character of the
760: .q escape
761: option is used, and it must be doubled if it is to appear as
762: the first character of a line of your message. If you change your escape
763: character, then ~ loses all its special meaning, and need no longer be doubled
764: at the beginning of a line.
765: .ip \fBfolder\fP
766: The name of the directory to use for storing folders of messages.
767: If this name begins with a `/'
768: .i Mail
769: considers it to be an absolute pathname; otherwise, the folder directory
770: is found relative to your home directory.
771: .ip \fBignore\fP
772: The binary option
773: .q ignore
774: causes \s-2RUBOUT\s0 characters from your terminal to be ignored and echoed
775: as @'s while you are sending mail. \s-2RUBOUT\s0 characters retain their
776: original meaning in
777: .i Mail
778: command mode.
779: Setting the
780: .q ignore
781: option is equivalent to supplying the
782: .b \-i
783: flag on the command line as described in section 2.
784: .ip \fBignoreeof\fP
785: An option related to
786: .q dot
787: is
788: .q ignoreeof
789: which makes
790: .i Mail
791: refuse to accept a control\-d as the end of a message.
792: .q Ignoreeof
793: also applies to
794: .i Mail
795: command mode.
796: .ip \fBkeep\fP
797: The
798: .q keep
799: option causes
800: .i Mail
801: to truncate your system mailbox instead of deleting it when it
802: is empty. This is useful if you elect to protect your mailbox, which
803: you would do with the shell command:
804: .(l
805: chmod 600 /usr/spool/mail/yourname
806: .)l
807: where
808: .i yourname
809: is your login name. If you do not do this, anyone can probably read
810: your mail, although people usually don't.
811: .ip \fBkeepsave\fP
812: When you
813: .b save
814: a message,
815: .i Mail
816: usually discards it when you
817: .b quit .
818: To retain all saved messages, set the
819: .q keepsave
820: option.
821: .ip \fBmetoo\fP
822: When sending mail to an alias,
823: .i Mail
824: makes sure that if you are included in the alias, that mail will not
825: be sent to you. This is useful if a single alias is being used by
826: all members of the group. If however, you wish to receive a copy of
827: all the messages you send to the alias, you can set the binary option
828: .q metoo.
829: .ip \fBnosave\fP
830: Normally,
831: when you abort a message with two \s-2RUBOUTs\s0,
832: .i Mail
833: copies the partial letter to the file
834: .q dead.letter
835: in your home directory. Setting the binary option
836: .q nosave
837: prevents this.
838: .ip \fBquiet\fP
839: The binary option
840: .q quiet
841: suppresses the printing of the version when
842: .i Mail
843: is first invoked,
844: as well as printing the for example
845: .q "Message 4:"
846: from the
847: .b type
848: command.
849: .ip \fBrecord\fP
850: If you love to keep records, then the
851: valued option
852: .q record
853: can be set to the name of a file to save your outgoing mail.
854: Each new message you send is appended to the end of the file.
855: .ip \fBscreen\fP
856: When
857: .i Mail
858: initially prints the message headers, it determines the number to
859: print by looking at the speed of your terminal. The faster your
860: terminal, the more it prints.
861: The valued option
862: .q screen
863: overrides this calculation and
864: specifies how many message headers you want printed.
865: This number is also used for scrolling with the
866: .b z
867: command.
868: .ip \fBsendmail\fP
869: To alternate delivery system, set the
870: .q sendmail
871: option to the full pathname of the program to use. Note: this is not
872: for everyone! Most people should use the default delivery system.
873: .ip \fBtoplines\fP
874: The valued option
875: .q toplines
876: defines the number of lines that the
877: .q top
878: command will print out instead of the default five lines.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.