|
|
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: The
504: .b save
505: command can be abbreviated to
506: .b s .
507: An example of the
508: .b save
509: command relative to our running example is:
510: .(l
511: s 1 2 tuitionmail
512: .)l
513: .b Saved
514: messages are not automatically saved in
515: .i mbox
516: at quit time, nor are they selected by the
517: .b next
518: command described above, unless explicitly specified.
519: .ip \fBset\fP
520: Set an option or give an option a value. Used to customize
521: .i Mail .
522: Section 5.3 contains a list of the options. Options can be
523: .i binary ,
524: in which case they are
525: .i on
526: or
527: .i off ,
528: or
529: .i valued .
530: To set a binary option
531: .i option
532: .i on ,
533: do
534: .(l
535: set option
536: .)l
537: To give the valued option
538: .i option
539: the value
540: .i value ,
541: do
542: .(l
543: set option=value
544: .)l
545: Several options can be specified in a single
546: .b set
547: command.
548: .ip \fBshell\fP
549: The
550: .b shell
551: command allows you to
552: escape to the shell.
553: .b Shell
554: invokes an interactive shell and allows you to type commands to it.
555: When you leave the shell, you will return to
556: .i Mail .
557: The shell used is a default assumed by
558: .i Mail ;
559: you can override this default by setting the valued option
560: .q SHELL,
561: eg:
562: .(l
563: set SHELL=/bin/csh
564: .)l
565: .ip \fBsource\fP
566: The
567: .b source
568: command reads
569: .i Mail
570: commands from a file. It is useful when you are trying to fix your
571: .q .mailrc
572: file and you need to re-read it.
573: .ip \fBtop\fP
574: The
575: .b top
576: command takes a message list and prints the first five lines
577: of each addressed message. It may be abbreviated to
578: .b to .
579: If you wish, you can change the number of lines that
580: .b top
581: prints out by setting the valued option
582: .q "toplines."
583: On a CRT terminal,
584: .(l
585: set toplines=10
586: .)l
587: might be preferred.
588: .ip \fBtype\fP
589: Print a list of messages on your terminal. If you have set the
590: option
591: .i crt
592: to a number and the total number of lines in the messages you are
593: printing exceed that specified by
594: .i crt ,
595: the messages will be printed by a terminal paging program such as
596: .i more .
597: .ip \fBundelete\fP
598: The
599: .b undelete
600: command causes a message that had been deleted previously to regain
601: its initial status. Only messages that have been deleted may be
602: undeleted. This command may be abbreviated to
603: .b u .
604: .ip \fBunset\fP
605: Reverse the action of setting a binary or valued option.
606: .ip \fBvisual\fP
607: It is often useful to be able to invoke one of two editors,
608: based on the type of terminal one is using. To invoke
609: a display oriented editor, you can use the
610: .b visual
611: command. The operation of the
612: .b visual
613: command is otherwise identical to that of the
614: .b edit
615: command.
616: .ne 2v+\n(psu
617: .sp \n(psu
618: Both the
619: .b edit
620: and
621: .b visual
622: commands assume some default text editors. These default editors
623: can be overridden by the valued options
624: .q EDITOR
625: and
626: .q VISUAL
627: for the standard and screen editors. You might want to do:
628: .(l
629: set EDITOR=/usr/ucb/ex VISUAL=/usr/ucb/vi
630: .)l
631: .ip \fBwrite\fP
632: The
633: .b save
634: command always writes the entire message, including the headers,
635: into the file. If you want to write just the message itself, you
636: can use the
637: .b write
638: command. The
639: .b write
640: command has the same syntax as the
641: .b save
642: command, and can be abbreviated to simply
643: .b w .
644: Thus, we could write the second message by doing:
645: .(l
646: w 2 file.c
647: .)l
648: As suggested by this example, the
649: .b write
650: command is useful for such tasks as sending and receiving
651: source program text over the message system.
652: .ip \fBz\fP
653: .i Mail
654: presents message headers in windowfuls as described under
655: the
656: .b headers
657: command.
658: You can move
659: .i Mail's
660: attention forward to the next window by giving the
661: .(l
662: z+
663: .)l
664: command. Analogously, you can move to the previous window with:
665: .(l
666: z\-
667: .)l
668: .sh 2 "Custom options"
669: .pp
670: Throughout this manual, we have seen examples of binary and valued options.
671: This section describes each of the options in alphabetical order, including
672: some that you have not seen yet.
673: To avoid confusion, please note that the options are either
674: all lower case letters or all upper case letters. When I start a sentence
675: such as:
676: .q "Ask"
677: causes
678: .i Mail
679: to prompt you for a subject header,
680: I am only capitalizing
681: .q ask
682: as a courtesy to English.
683: .ip \fBEDITOR\fP
684: The valued option
685: .q EDITOR
686: defines the pathname of the text editor to be used in the
687: .b edit
688: command and ~e. If not defined, a standard editor is used.
689: .ip \fBSHELL\fP
690: The valued option
691: .q SHELL
692: gives the path name of your shell. This shell is used for the
693: .b !
694: command and ~! escape. In addition, this shell expands
695: file names with shell metacharacters like * and ? in them.
696: .ip \fBVISUAL\fP
697: The valued option
698: .q VISUAL
699: defines the pathname of your screen editor for use in the
700: .b visual
701: command
702: and ~v escape. A standard screen editor is used if you do not define one.
703: .ip \fBappend\fP
704: The
705: .q append
706: option is binary and
707: causes messages saved in
708: .i mbox
709: to be appended to the end rather than prepended.
710: Normally,
711: .i Mail will put messages in
712: .i mbox
713: in the same order that the system puts messages in your system mailbox.
714: By setting
715: .q append,
716: you are requesting that
717: .i mbox
718: be appended to regardless. It is in any event quicker to append.
719: .ip \fBask\fP
720: .q "Ask"
721: is a binary option which
722: causes
723: .i Mail
724: to prompt you for the subject of each message you send.
725: If you respond with simply a newline, no subject field will be sent.
726: .ip \fBaskcc\fP
727: .q Askcc
728: is a binary option which
729: causes you to be prompted for additional carbon copy recipients at the
730: end of each message. Responding with a newline shows your
731: satisfaction with the current list.
732: .ip \fBautoprint\fP
733: .q Autoprint
734: is a binary option which
735: causes the
736: .b delete
737: command to behave like
738: .b dp
739: \*- thus, after deleting a message, the next one will be typed
740: automatically. This is useful to quickly scanning and deleting
741: messages in your mailbox.
742: .ip \fBdot\fP
743: .q Dot
744: is a binary option which, if set, causes
745: .i Mail
746: to interpret a period alone on a line as the terminator
747: of a message you are sending.
748: .ip \fBescape\fP
749: To allow you to change the escape character used when sending
750: mail, you can set the valued option
751: .q escape.
752: Only the first character of the
753: .q escape
754: option is used, and it must be doubled if it is to appear as
755: the first character of a line of your message. If you change your escape
756: character, then ~ loses all its special meaning, and need no longer be doubled
757: at the beginning of a line.
758: .ip \fBfolder\fP
759: The name of the directory to use for storing folders of messages.
760: If this name begins with a `/'
761: .i Mail
762: considers it to be an absolute pathname; otherwise, the folder directory
763: is found relative to your home directory.
764: .ip \fBignore\fP
765: The binary option
766: .q ignore
767: causes \s-2RUBOUT\s0 characters from your terminal to be ignored and echoed
768: as @'s while you are sending mail. \s-2RUBOUT\s0 characters retain their
769: original meaning in
770: .i Mail
771: command mode.
772: Setting the
773: .q ignore
774: option is equivalent to supplying the
775: .b \-i
776: flag on the command line as described in section 2.
777: .ip \fBignoreeof\fP
778: An option related to
779: .q dot
780: is
781: .q ignoreeof
782: which makes
783: .i Mail
784: refuse to accept a control\-d as the end of a message.
785: .q Ignoreeof
786: also applies to
787: .i Mail
788: command mode.
789: .ip \fBkeep\fP
790: The
791: .q keep
792: option causes
793: .i Mail
794: to truncate your system mailbox instead of deleting it when it
795: is empty. This is useful if you elect to protect your mailbox, which
796: you would do with the shell command:
797: .(l
798: chmod 600 /usr/spool/mail/yourname
799: .)l
800: where
801: .i yourname
802: is your login name. If you do not do this, anyone can probably read
803: your mail, although people usually don't.
804: .ip \fBkeepsave\fP
805: When you
806: .b save
807: a message,
808: .i Mail
809: usually discards it when you
810: .b quit .
811: To retain all saved messages, set the
812: .q keepsave
813: option.
814: .ip \fBmetoo\fP
815: When sending mail to an alias,
816: .i Mail
817: makes sure that if you are included in the alias, that mail will not
818: be sent to you. This is useful if a single alias is being used by
819: all members of the group. If however, you wish to receive a copy of
820: all the messages you send to the alias, you can set the binary option
821: .q metoo.
822: .ip \fBnosave\fP
823: Normally,
824: when you abort a message with two \s-2RUBOUTs\s0,
825: .i Mail
826: copies the partial letter to the file
827: .q dead.letter
828: in your home directory. Setting the binary option
829: .q nosave
830: prevents this.
831: .ip \fBquiet\fP
832: The binary option
833: .q quiet
834: suppresses the printing of the version when
835: .i Mail
836: is first invoked,
837: as well as printing the for example
838: .q "Message 4:"
839: from the
840: .b type
841: command.
842: .ip \fBrecord\fP
843: If you love to keep records, then the
844: valued option
845: .q record
846: can be set to the name of a file to save your outgoing mail.
847: Each new message you send is appended to the end of the file.
848: .ip \fBscreen\fP
849: When
850: .i Mail
851: initially prints the message headers, it determines the number to
852: print by looking at the speed of your terminal. The faster your
853: terminal, the more it prints.
854: The valued option
855: .q screen
856: overrides this calculation and
857: specifies how many message headers you want printed.
858: This number is also used for scrolling with the
859: .b z
860: command.
861: .ip \fBsendmail\fP
862: To alternate delivery system, set the
863: .q sendmail
864: option to the full pathname of the program to use. Note: this is not
865: for everyone! Most people should use the default delivery system.
866: .ip \fBtoplines\fP
867: The valued option
868: .q toplines
869: defines the number of lines that the
870: .q top
871: 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.