]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/DOC/mh1.nr
Updated documentation and comments about sendmail/pipe.
[nmh] / docs / historical / mh-jun-1982 / DOC / mh1.nr
1 .de $c \" Major Heading printer
2 .ce
3 .b "\\s12\\n+(ch.\\ \\$1\\s0" \" 12 Point Bold Header
4 .(x
5
6 \\n(ch.\\ \\$1
7 .)x
8 .sp 45p \" 45 point space or about 1/2 inch
9 ..
10 .de $0 \" Sub-Heading macro called AFTER printing the heading
11 .(x
12
13 .ti .5i
14 \\$1
15 .)x
16 ..
17 .de $s \" Macro to print footnote separator
18 \"\l'2i' \" No line drawn
19 .if n \
20 . sp 1.3 \" But extra space to make up for it.
21 ..
22 .fc ^ ~ \" The characters ^ and ~ CANNOT BE USED
23 \" throughout this document except as field
24 \" delimiter & pad indicator!
25 .he \*(rq-%-\*(rq
26 .ll 32P \" 32 Picas or about 5+1/3 inch Line Length
27 .nr ss 30p \" 30 point space before section titles
28 .ds . \\fB.\\fP\\h'-(1m/4)' \" Bold period to stand out.
29 .ds << <\\h!-(\\w'<'/2)!<
30 .ds >> >\\h!-(\\w'>'/2)!>
31 .ds ** \v'-3p'\s+1*\s0\v'+3p'
32 .++ C
33 .+c INTRODUCTION
34 .pp
35 Although people can travel cross-country in hours and can
36 reach others by telephone in seconds, communications still depend
37 heavily upon paper, most of which is distributed through the mails.
38 .pp
39 There are several major reasons for this continued dependence on
40 written documents.
41 First, a written document may be proofread
42 and corrected prior to its distribution, giving the author
43 complete control over his words.
44 Thus, a written document is
45 better than a telephone conversation in this respect.
46 Second,
47 a carefully written document is far less likely to be
48 misinterpreted or poorly translated than a phone conversation.
49 Third, a signature offers reasonable verification of authorship,
50 which cannot be provided with media such as telegrams.
51 .pp
52 However, the need for
53 .u fast ,
54 accurate, and reproducible document distribution is
55 obvious.
56 One solution in widespread use is the telefax.
57 Another
58 that is rapidly gaining popularity is electronic mail.
59 Electronic mail is similar to telefax in that the data to be sent
60 are digitized, transmitted via phone lines, and
61 turned back into a document at the receiver.
62 The advantage of
63 electronic mail is in its compression factor.
64 Whereas a telefax
65 must scan a page in very fine lines and send all of the black and
66 white information, electronic mail assigns characters fixed
67 codes which can be transmitted as a few bits of information.
68 Telefax presently has the advantage of being able to transmit an
69 arbitrary page, including pictures, but electronic mail is
70 beginning to deal with this problem.
71 Electronic mail also integrates well
72 with current directions in office automation, allowing documents
73 prepared with sophisticated equipment at one site to be quickly
74 transferred and printed at another site.
75 .pp
76 Currently, most electronic mail is intraorganizational,
77 with mail transfer remaining within one computer.
78 As computer
79 networking becomes more common, however, it is becoming more feasible to
80 communicate with anyone whose computer can be linked to your
81 own via a network.
82 .pp
83 The pioneering efforts on general-purpose electronic mail
84 were by organizations using the Defense Department's ARPANET.[1]
85 The capability to send messages between computers existed before
86 the ARPANET was developed, but it was used only in limited ways.
87 With the advent of the
88 ARPANET, tools began to be developed which made it convenient for
89 individuals or organizations to distribute messages
90 over broad geographic areas, using
91 diverse computer facilities.
92 The interest and activity in
93 message systems has now reached such proportions that steps
94 have been taken within the DoD to coordinate and
95 unify the development of military message systems.
96 The use of electronic mail is expected to increase
97 dramatically in the next few years.
98 The utility of such systems
99 in the command and control and intelligence environments is
100 clear, and applications in these areas will probably lead the
101 way.
102 As the costs for sending and handling electronic messags
103 continue their rapid decrease, such uses can be
104 expected to spread rapidly into other areas and, of course, will
105 not be limited to the DoD.
106 .pp
107 A message system provides tools that help users (individuals
108 or organizations) deal with messages in various ways.
109 Messages
110 must be composed, sent, received, stored, retrieved,
111 forwarded, and replied to.
112 Today's best interactive computer
113 systems provide a variety of word-processing and information
114 handling capabilities.
115 The message handling facilities should be
116 well integrated with the rest of the system, so as to be a
117 graceful extension of overall system capability.
118 .pp
119 The message system described in this report, MH, provides most of the
120 features that can be found in other message systems and also
121 incorporates some new ones.
122 It has been built on the UNIX time-sharing
123 system,[2] a popular operating system for the DEC PDP-11
124 and VAX classes of computers.
125 A \*(lqsecure\*(rq operating
126 system similar to UNIX is currently being developed,[3]
127 and that system will also run MH.
128 .pp
129 This report provides a complete description of MH and
130 thus may serve as a user's manual, although parts of the report
131 will be of interest to non-users as well.
132 Sections 2 and 3, the
133 Overview and Tutorial, present the key
134 ideas of MH and will give those not familiar with message systems
135 an idea of what such systems are like.
136 .pp
137 MH consists of a set of commands which use some special
138 files and conventions.
139 Section 4 covers the information
140 a user needs to know in addition to the
141 commands.
142 The final section, Sec. 5, describes each of
143 the MH commands in detail.
144 A summary of the commands is given in
145 Appendix A, and Appendixes B and C describe the ARPANET
146 conventions for messages (we expect that many users of MH
147 will be using the ARPANET) and the formal syntax of such
148 messages, respectively.
149 Finally, Appendix D provides
150 some illustrations of how MH commands may be used in
151 conjunction with other UNIX facilities.
152 .pp
153 A novel approach has been taken in the design of MH.
154 The
155 design concept will be reported in detail in a forthcoming Rand
156 report, but it can be described briefly as follows.
157 Instead of creating a large subsystem that appears as a single
158 command to the user, MH is a collection of separate commands
159 which are run as separate programs.
160 The file and directory
161 system of UNIX are used directly.
162 Messages are stored as
163 individual files (datasets), and collections of them are grouped
164 into directories.
165 In contrast, most other message systems store
166 messages in a complicated data structure within a monolithic
167 file.
168 With the MH approach, UNIX commands can be
169 interleaved with commands invoking the functions of the message
170 handler.
171 Conversely, existing UNIX commands
172 can be used in connection with messages.
173 For
174 example, all the usual UNIX editing, text-formatting, and printing
175 facilities can be applied directly to individual messages.
176 MH,
177 therefore, consists of a relatively small amount of new code; it
178 makes extensive use of other UNIX software to provide the
179 capabilities found in other message systems.
180 .pp
181 The MH system was developed by the first
182 author, using an approach suggested by the other two authors.
183 Valuable assistance was provided by Phyllis Kantar in the later
184 stages of the system's implementation.
185 Several colleagues
186 contributed to the ideas included in this system, particularly
187 Robert Anderson and David Crocker.
188 In addition, valuable experience
189 in message systems, and a valuable source of ideas, was available
190 to us in the form of a previous message system for UNIX called
191 MS,[4] designed at Rand by David Crocker.
192 .+c OVERVIEW
193 .pp
194 There are three main aspects of MH: the way messages are
195 stored (the message database), the user's profile (which directs
196 how certain actions of the message handler take place), and the
197 commands for dealing with messages.
198 .pp
199 Under MH, each message is stored as a separate file.
200 A user
201 can take any action with a message that he could with an ordinary
202 file in UNIX.
203 A UNIX directory in which messages are stored is
204 called a folder.
205 Each folder contains some standard entries to support
206 the message-handling functions.
207 The messages in a folder have numerical
208 names.
209 These folders (directories)
210 are entries in a particular directory path, described in
211 the user profile, through which MH can find message folders.
212 Using the UNIX \*(lqlink\*(rq facility, it is possible for one copy of a
213 message to be \*(lqfiled\*(rq in more than one folder, providing a
214 message index facility.
215 Also, using the UNIX tree-structured
216 file system, it is possible to have a folder within a folder.
217 This two-level organization provides a \*(lqselection-list\*(rq
218 facility, with the full power of the MH commands available on
219 selected sublists of messages.
220 .pp
221 Each user of MH has a user profile, a file in his $HOME (initial
222 login)
223 directory called \*(lq\*.mh\(ruprofile\*(rq.
224 This profile contains several
225 pieces of information used by the MH commands: a
226 path name to the directory that contains the message folders,
227 information concerning which folder the user last referenced (the
228 \*(lqcurrent\*(rq folder), and parameters that tailor MH commands
229 to the individual user's requirements.
230 It also contains
231 most of the necessary state information concerning how
232 the user is dealing with his messages, enabling MH to be
233 implemented as a set of individual UNIX commands, in contrast to the
234 usual approach of a monolithic subsystem.
235 .pp
236 In MH, incoming mail is appended
237 to the end of a file called \*.mail in a user's $HOME
238 directory.
239 The user adds the new messages to his collection of MH messages
240 by invoking the command
241 .i inc .
242 .i Inc
243 (incorporate) adds the new
244 messages to a folder called \*(lqinbox\*(rq, assigning them names which
245 are consecutive integers starting with the next highest integer
246 available in inbox.
247 .i Inc
248 also produces a
249 .i scan
250 summary of
251 the messages thus incorporated.
252 .pp
253 There are four commands for examining the messages in a
254 folder:
255 .i show ,
256 .i prev ,
257 .i next ,
258 and
259 .i scan .
260 .i Show
261 displays a
262 message in a folder,
263 .i prev
264 displays the message preceding the
265 current message, and
266 .i next
267 displays the message following the
268 current message.
269 .i Scan
270 summarizes the messages in a folder,
271 producing one line per message, showing who the message is from,
272 the date, the subject, etc.
273 .pp
274 The user may move a message from one folder to another with
275 the command
276 .i file .
277 Messages may be removed from a folder
278 by means of the command
279 .i rmm .
280 In addition, a user may query
281 what the current folder is and may specify that a new folder
282 become the current folder, through the command
283 .i folder .
284 .pp
285 A set of messages based on content may be selected by
286 use of the command
287 .i pick .
288 This command searches through
289 messages in a folder and selects those that match a given
290 criterion.
291 A subfolder is created within the original folder,
292 containing links to all the messages that satisfy the selection
293 criteria.
294 .pp
295 A message folder (or subfolder) may be removed by means of
296 the command
297 .i rmf .
298 .pp
299 There are five commands enabling the user to create new
300 messages and send them:
301 .i comp ,
302 .i dist ,
303 .i forw ,
304 .i repl ,
305 and
306 .i send .
307 .i Comp
308 provides the facility for the user to compose a
309 new message;
310 .i dist
311 redistributes mail to additional addressees;
312 .i forw
313 enables the user to forward messages; and
314 .i repl
315 facilitates the generation of a reply to an incoming message.
316 If
317 a message is not sent directly by one of these commands, it may
318 be sent at a later time using the command
319 .i send .
320 .pp
321 All of the elements summarized above
322 are described in more detail in the following sections.
323 Many of the
324 normal facilities of UNIX provide additional capabilities for
325 dealing with messages in various ways.
326 For example, it is
327 possible to print messages
328 on the line-printer without requiring any additional code within
329 MH.
330 Using standard UNIX facilities, any terminal output can be
331 redirected to a file for repeated or future viewing.
332 In general,
333 the flexibility and capabilities of the UNIX interface with the
334 user are preserved as a result of the integration of MH into the UNIX
335 structure.
336 .+c TUTORIAL
337 .pp
338 This tutorial provides a brief introduction to the MH commands.
339 It should be sufficient
340 to allow the user to read his mail, do some simple manipulations of
341 it, and create and send messages.
342 .pp
343 A message has two major pieces: the
344 header and the body.
345 The body consists of the text of the message
346 (whatever you care to type in).
347 It follows the header and is separated from
348 it by an empty line.
349 (When you compose a message, the form that appears
350 on your terminal shows a line of dashes after the header.
351 This is for
352 convenience and is replaced by an empty line when the message is
353 sent.) The header is composed of several components, including the
354 subject of the message and the person to whom it is addressed.
355 Each component starts with a name
356 and a colon; components must not start with a blank.
357 The text of the
358 component may take more than one line, but each continuation line must
359 start with a blank.
360 Messages typically have \*(lqto:\*(rq, \*(lqcc:\*(rq, and
361 \*(lqsubject:\*(rq components.
362 When composing a message, you should include
363 the \*(lqto:\*(rq and \*(lqsubject:\*(rq components; the \*(lqcc:\*(rq (for people
364 you want to send copies to) is not necessary.
365 .pp
366 The basic MH commands are
367 .i inc ,
368 .i scan ,
369 .i show ,
370 .i next ,
371 .i prev ,
372 .i rmm ,
373 .i comp ,
374 and
375 .i repl .
376 These are described below.
377
378 .i inc
379 .pp
380 When you get the message \*(lqYou have mail\*(rq, type the command
381 .i inc .
382 You will get a \*(lqscan listing\*(rq such as:
383
384 .nf
385 .ta .4i 1.2i 3i
386 ^7+~^^\07/13~^^Cas~^revival of measurement work
387 ^8~^^10/\09~^^Norm~^NBS people and publications
388 ^9~^^11/26~^^To:norm~^question \*(<<Are there any functions
389 .re
390 .fi
391 .pp
392 This shows the messages you received since the last time you
393 executed this command (
394 .i inc
395 adds these new messages to
396 your inbox folder).
397 You can see this list again, plus a list of any
398 other messages you have, by using the
399 .i scan
400 command.
401
402 .i scan
403 .pp
404 The scan listing shows the message number, followed by the
405 date and the sender.
406 (If you are the sender, the addressee in the \*(lqto:\*(rq
407 component is displayed.
408 You may send yourself a message by including
409 your name among the \*(lqto:\*(rq or \*(lqcc:\*(rq addressees.)
410 It also shows the message's subject; if
411 the subject is short, the first part of the body of the message is
412 included after the characters \*(<<.
413
414 .i show
415 .pp
416 This command shows the current message, that is,
417 the first one of the new messages after an
418 .i inc .
419 If the message is not
420 specified by name (number), it is
421 generally the last message referred to by an MH command.
422 For example,
423
424 .ta 1i
425 .ti .5i
426 ^\fIshow\fP\05~^will show message 5.
427 .pp
428 You can use the show command to copy a message or print a
429 message.
430
431 .(b L
432 .in .5i
433 .ta 1i
434 ^\fIshow\fR\0>\0\fIx\fR~^will copy the message to file x.
435 .br
436 ^\fIshow\fR\0|\0\fIprint\fR~^will print the message, using the \fIprint\fR command.
437 .br
438 ^\fInext\fR~^will show the message that follows the current message.
439 .br
440 ^\fIprev\fR~^will show the message previous to the current message.
441 .br
442 ^\fIrmm\fR~^will remove the current message.
443 .br
444 ^\fIrmm\03\fR~^will remove message 3.
445 .)b
446
447 .i comp
448 .pp
449 The
450 .i comp
451 command puts you in the editor to write or edit a message.
452 Fill in or
453 delete the \*(lqto:\*(rq, \*(lqcc:\*(rq, and \*(lqsubject:\*(rq fields, as appropriate, and
454 type the body of the message.
455 Then
456 exit normally from the editor.
457 You will be asked
458 \*(lqWhat now?\*(rq.
459 Type a carriage return to see the options.
460 Typing \fBsend\fR
461 will cause the message to be sent; typing \fBquit\fR will cause an exit
462 from
463 .i comp ,
464 with the message draft saved.
465 .pp
466 If you quit without sending the message, it will be saved in a file
467 called /usr/<name>/Mail/draft (where /usr/<name> is your $HOME directory).
468 You can edit this file and send the message later, using the
469 .i send
470 command.
471
472 .ne 4
473 .i "comp\0\-editor\0prompter"
474 .pp
475 This command uses a different editor and is useful for preparing
476 \*(lqquick and dirty\*(rq messages.
477 It prompts you for each component of the
478 header.
479 Type the information for that component, or type a carriage
480 return to omit the component.
481 After that, type the body of the
482 message.
483 Backspacing is the only form of editing allowed with this editor.
484 When the body is complete, type a carriage return followed by <CTRL-D>
485 (<OPEN> on Ann Arbor terminals).
486 This completes the initial preparation of the message; from then on, use
487 the same procedures as with
488 .i comp
489 (above).
490
491 .ne 5
492 .i repl
493 .br
494 .i "repl\0n"
495 .pp
496 This command makes up an initial message form with a header
497 that is appropriate for
498 replying to an existing message.
499 The message being answered is the
500 current message if no message number is mentioned, or n if a number
501 is specified.
502 After the header is completed, you can finish the message as in
503 .i comp
504 (above).
505 .pp
506 This is enough information to get you going using MH.
507 There are more commands,
508 and the commands described here have more features.
509 Subsequent sections
510 explain MH in complete detail.
511 The system is quite powerful if you
512 want to use its sophisticated features, but the foregoing commands
513 suffice for sending and receiving messages.
514 .pp
515 There are numerous additional capabilities you may wish to explore.
516 For example, the
517 .i pick
518 command will select a subset of messages
519 based on specified criteria such as sender or subject.
520 Groups of
521 messages may be designated, as described in Sec. V, under \*(lqMessage
522 Naming\*(rq.
523 The file \*(lq\*.mh\(ruprofile\*(rq can be used to tailor your use of
524 the message system to your needs and preferences, as described in Sec. V,
525 under \*(lqThe User Profile\*(rq.
526 In general, you may
527 learn additional features of the system selectively, according to your
528 requirements,
529 by studying the relevant sections of this manual.
530 There is no need to
531 learn all the details of the system at once.
532 .+c "DETAILED DESCRIPTION"
533 .pp
534 This section describes the MH system in detail, including the components
535 of the user profile, the conventions for message naming, and some of
536 the other MH conventions.
537 Readers who are
538 generally familiar with computer systems will be able to follow
539 the principal ideas, although some details may be meaningful only to
540 those familiar with UNIX.
541 .uh "THE USER PROFILE"
542 .pp
543 The first time an MH command is issued by a new user, the system
544 prompts for a \*(lqpath\*(rq and creates an MH \*(lqprofile\*(rq.
545 .pp
546 Each MH user has a profile which contains current
547 state information for the MH package and, optionally, tailoring
548 information for each individual program.
549 When a folder becomes
550 the current folder, it is recorded in the user's profile.
551 Other profile entries control the MH path (where folders and
552 special files are kept), folder and message protections, editor
553 selection, and default arguments for each MH program.
554 .pp
555 The MH profile is stored in the file \*(lq\*.mh\(ruprofile\*(rq in the
556 user's $HOME directory.
557 It has the format of a message without
558 any body.
559 That is, each profile entry is on one line, with a
560 keyword followed by a colon (:) followed by text particular to
561 the keyword.
562 .br
563 \(rh\ \ \&
564 .i "This file must not have blank lines."
565 .br
566 The keywords
567 may have any combination of upper and lower case.
568 (See Appendix
569 B for a description of message formats.)
570 .pp
571 For the average MH user, the only profile entry of
572 importance is \*(lqPath\*(rq.
573 Path specifies a directory in which MH
574 folders and certain files such as \*(lqdraft\*(rq are found.
575 The
576 argument to this keyword must be a legal UNIX path that names an
577 existing directory.
578 If this path is unrooted (i.e., does not
579 begin with a \fB/\fR), it will be presumed to start from the
580 user's $HOME directory.
581 All folder and message references within
582 MH will relate to this path unless full path names are used.
583 .pp
584 Message protection defaults to 664, and folder protection to
585 751.
586 These may be changed by profile entries \*(lqMsg-Protect\*(rq
587 and \*(lqFolder-Protect\*(rq, respectively.
588 The argument to these
589 keywords is an octal number which is used as the UNIX file mode.\**
590 .(f
591 \**See
592 .i chmod (I)
593 in the
594 .i "UNIX Programmer's Manual" .[5]
595 .)f
596 .pp
597 When an MH program starts running, it looks through the
598 user's profile for an entry with a keyword matching the program's
599 name.
600 For example, when
601 .i comp
602 is run, it looks for a \*(lqcomp\*(rq
603 profile entry.
604 If one is found, the text of the profile entry is
605 used as the default switch setting until all defaults are overridden
606 by explicit switches passed to the program as arguments.
607 Thus the profile
608 entry \*(lqcomp:\0\-form\0standard.list\*(rq would direct
609 .i comp
610 to use the
611 file \*(lqstandard.list\*(rq as the message skeleton.
612 If an explicit
613 form switch is given to the
614 .i comp
615 command, it will override the
616 switch obtained from the profile.
617 .pp
618 In UNIX, a program may exist under several names, either by
619 linking or aliasing.
620 The actual invocation name is used by an MH
621 program when scanning for its profile defaults.
622 Thus, each MH program
623 may have several names by which it can be invoked, and each name
624 may have a different set of default switches.
625 For example, if
626 .i comp
627 is invoked by the name
628 .i icomp ,
629 the profile entry
630 \*(lqicomp\*(rq will control the default switches for this invocation of
631 the
632 .i comp
633 program.
634 This provides a powerful
635 definitional facility for commonly used switch settings.
636 .pp
637 The default editor
638 for editing within
639 .i comp ,
640 .i repl ,
641 .i forw ,
642 and
643 .i dist ,
644 is \*(lq/bin/ned\*(rq.\**
645 .(f
646 \**See Ref. 6 for a description of
647 the NED text editor.
648 .)f
649 A different editor may be used by specifying
650 the profile entry
651 \*(lqEditor: \*(rq.
652 The argument to \*(lqEditor\*(rq is the name of an
653 executable program or shell command file which can be found via
654 the user's $PATH defined search path, excluding the current
655 directory.
656 The \*(lqEditor:\*(rq profile specification
657 may in turn be overridden by a \*(lq\-editor\0<editor>\*(rq
658 profile switch associated with
659 .i comp ,
660 .i repl ,
661 .i forw ,
662 or
663 .i dist .
664 Finally, an explicit editor switch specified with any
665 of these four commands will have ultimate precedence.
666 .pp
667 During message composition, more than one editor may be
668 used.
669 For example, one editor (such as
670 .i prompter )
671 may be used
672 initially, and a second editor may be invoked later to revise
673 the message being composed
674 (see the discussion of
675 .i comp
676 in Section 5 for details).
677 A profile entry \*(lq<lasteditor>\-next:\0<editor>\*(rq specifies the name of
678 the editor to be used after a particular editor.
679 Thus \*(lqcomp:\0\-e\0prompter\*(rq
680 causes the initial text to be collected by
681 .i prompter ,
682 and the profile entry \*(lqprompter\-next:\0ed\*(rq names ed as the
683 editor to be invoked for the next round of editing.
684 .pp
685 Some of the MH commands, such as
686 .i show ,
687 can be used on
688 message folders owned by others, if those folders are readable.
689 However,
690 you cannot write in someone else's folder.
691 All the MH command
692 actions not requiring write permission may be used with
693 a \*(lqread-only\*(rq folder.
694 In a writable folder, a file named
695 \*(lqcur\*(rq is used to contain its current message name.
696 For read-only folders, the current message name is
697 stored in the user's profile.
698 .pp
699 Table 1 lists examples of the currently defined profile
700 entries, typical arguments, and the programs that reference the
701 entries.
702 .in .9i
703 .ll -.9i
704 .ta 2.3i
705 .sp 30p
706 .ce
707 Table 1
708 .sp 8p
709 .ce
710 P\s-2ROFILE\s0 C\s-2OMPONENTS\s0
711 .hl \" ~12p preceding + 1v (12p) after
712 .nf
713 ^^MH Programs that
714 ^Keyword and Argument~^\ Use Component\h'|\n(.lu-.9i'\l'|0' \" \l'..' does underlining
715 .sp
716 ^Path:\0Mail~^All
717 ^Current-Folder:\0inbox~^Most
718 ^Editor:\0/bin/ed~^\fIcomp, dist, forw, repl\fR
719 ^Msg\-Protect:\0644~^\fIinc\fR
720 ^Folder\-Protect:\0711~^\fIfile, inc, pick\fR
721 ^<program>:\0default switches~^All
722 ^cur\-<read-onlyfolder>:\0172~^Most
723 ^prompter\-next:\0ed~^\fIcomp, dist, forw, repl\fR
724 .hl
725 .ll +1i
726 .in 0
727 .fi
728 .pp
729 Path
730 .u should
731 be present.
732 Folder is maintained
733 automatically by many MH commands (see the \*(lqContext\*(rq sections of
734 the individual commands in Sec. V).
735 All other entries are optional,
736 defaulting to the values described above.
737 .uh "MESSAGE NAMING"
738 .pp
739 Messages may be referred to explicitly or implicitly when
740 using MH commands.
741 A formal syntax of message names is given in Appendix C, but the
742 following description should be sufficient for most MH users.
743 Some details of message naming that apply only to certain
744 commands are included in the description of those
745 commands.
746 .pp
747 Most of the MH commands accept arguments specifying one or
748 more folders, and one or more messages to operate on.
749 The use of
750 the word \*(lqmsg\*(rq as an argument to a command means that exactly one
751 message name may be specified.
752 A message name may be a number,
753 such as 1, 33, or 234, or it may be
754 one of the \*(lqreserved\*(rq message names:
755 first, last, prev, next, and cur.
756 (As a shorthand, a
757 period (\*.) is equivalent to cur.)
758 The meanings of these names
759 are straightforward: \*(lqfirst\*(rq is the first message in the
760 folder; \*(lqlast\*(rq is the last
761 message in the folder; \*(lqprev\*(rq is the
762 message numerically previous to the current message; \*(lqnext\*(rq
763 is the message numerically following the current message; \*(lqcur\*(rq
764 (or \*(lq\*.\*(rq) is the current message in the folder.
765 .pp
766 The default in commands that take a \*(lqmsg\*(rq argument is
767 always \*(lqcur\*(rq.
768 .pp
769 The word \*(lqmsgs\*(rq indicates that several messages may be
770 specified.
771 Such a specification consists of several message
772 designations separated by spaces.
773 A message designation is
774 either a message name or a message range.
775 A message range is a
776 specification of the form name1\-name2 or name1:n, where name1 and
777 name2 are message names and n is an integer.
778 The first form
779 designates all the messages from name1 to name2 inclusive; this
780 must be a non-empty range.
781 The second form specifies up to n
782 messages, starting with name1 if name1 is a number, or first,
783 cur, or next, and ending with name1 if name1 is last or
784 prev.
785 This interpretation of n is overridden if n is preceded
786 by a plus sign or a minus sign;
787 +n always means up to n messages starting with
788 name1, and \-n always means up to n messages ending with name1.
789 Repeated specifications of the same message have the same effect
790 as a single specification of
791 the message.
792 Examples of
793 specifications are:
794
795 .(b
796 1 5 7\-11 22
797 first 6 8 next
798 first\-10
799 last:5
800 .)b
801 .pp
802 The message name \*(lqall\*(rq is a shorthand for \*(lqfirst\-last\*(rq,
803 indicating all of the messages in the folder.
804 .pp
805 The limit on the number of messages in an expanded message
806 list is generally 999\*-the maximum number of messages in a
807 folder.
808 However, the
809 .i show
810 command and the
811 commands `\fIpick\0\-scan\fR' and `\fIpick\0\-show\fR'
812 are constrained to have argument lists
813 that are no more than 512 characters long.
814 (Under Version 7 UNIX this limit is 4096.)
815 .pp
816 In commands that accept \*(lqmsgs\*(rq arguments, the default is
817 either cur or all, depending on which makes more sense.
818 .pp
819 In all of the MH commands, a plus sign preceding an argument
820 indicates a folder name.
821 Thus, \*(lq+inbox\*(rq is the name of the
822 user's standard inbox.
823 If an explicit folder argument is given
824 to an MH command, it will become the current folder (that is,
825 the \*(lqCurrent-Folder:\*(rq entry
826 in \*(lq\*.mh\(ruprofile\*(rq will be changed to this
827 folder).
828 In the case of the
829 .i file
830 and
831 .i pick
832 commands, which
833 can have multiple output folders, a new source folder (other than
834 the default current folder) is specified by \*(lq\-src\0+folder\*(rq.
835 .uh "OTHER MH CONVENTIONS"
836 .pp
837 One very powerful feature of MH is that the MH commands may
838 be issued from any current directory, and the proper path to
839 the appropriate folder(s) will be taken from the user's profile.
840 If the MH path is not appropriate for a specific folder or file,
841 the automatic prepending of the MH path can be avoided by
842 beginning a folder or file name with \fB/\fR.
843 Thus any specific full
844 path may be specified.
845 .pp
846 Arguments to the various programs may be given in any order,
847 with the exception of a few switches whose arguments must follow
848 immediately, such as \*(lq\-src\0+folder\*(rq for \fIpick\fR and \fIfile\fR.
849 .pp
850 Whenever an MH command prompts the user, the valid options
851 will be listed in response to a <RETURN>.
852 (The first of the
853 listed options is the default if end-of-file is encountered, such
854 as from a command file.) A valid response is any \fIunique\fR
855 abbreviation of one of the listed options.
856 .pp
857 Standard UNIX documentation conventions are used in this report
858 to describe MH command syntax.
859 Arguments enclosed in brackets
860 ([ ]) are optional; exactly one of the arguments enclosed
861 within braces ({ }) must be specified, and all other
862 arguments are required.
863 The use of ellipsis dots (...) indicates
864 zero or more repetitions of the previous item.
865 For example,
866 \*(lq+folder ...\*(rq would indicate that one or more \*(lq+folder\*(rq arguments
867 is required and \*(lq[+folder ...]\*(rq indicates that 0 or more
868 \*(lq+folder\*(rq arguments may be given.
869 .pp
870 MH departs from UNIX standards by using switches that consist of
871 more than one character, e.g. \*(lq\-header\*(rq.
872 To minimize typing,
873 only a unique abbreviation of a switch need be typed; thus, for
874 \*(lq\-header\*(rq, \*(lq\-hea\*(rq is probably sufficient, depending on the
875 other switches the command accepts.
876 Each MH program
877 accepts the switch \*(lq\-help\*(rq (which \fImust\fR be spelled out fully)
878 and produces a syntax description and a list of switches.
879 In the
880 list of switches, parentheses indicate required characters.
881 For example, all \*(lq\-help\*(rq switches will appear as \*(lq\-(help)\*(rq,
882 indicating that no abbreviation is accepted.
883 .pp
884 Many MH switches have both on and off forms, such as
885 \*(lq\-format\*(rq and \*(lq\-noformat\*(rq.
886 In many of the descriptions in Sec. V,
887 only one form is defined; the other form, often used to
888 nullify profile switch settings, is assumed to be the opposite.
889 .(b L
890 .uh "MH COMMANDS"
891 .pp
892 The MH package comprises 16 programs:
893
894 .nf
895 .in .5i
896 .ta 1.5i
897 ^comp~^Compose a message
898 ^dist~^Redistribute a message
899 ^file~^Move messages between folders
900 ^folder~^Select/list status of folders
901 ^forw~^Forward a message
902 ^inc~^Incorporate new mail
903 ^next~^Show the next message
904 ^pick~^Select a set of messages by context
905 ^prev~^Show the previous message
906 ^prompter~^Prompting editor front end for composing messages
907 ^repl~^Reply to a message
908 ^rmf~^Remove a folder
909 ^rmm~^Remove messages
910 ^scan~^Produce a scan listing of selected messages
911 ^send~^Send a previously composed message
912 ^show~^Show messages
913 .fi
914 .re
915 .)b
916 .pp
917 These programs are described below.
918 The form of the descriptions
919 conforms to the standard
920 form for the description of UNIX commands.
921 .ll 6.5i
922 .lt 6.5i
923 .nr Us 0 1
924 .fo '7th Edition'UNIX/32V(Rand)'\\\\\\\\n+(Us'
925 .de SC
926 .he '\\$1(1)'-%-'\\$1(1)'
927 .nr Us 0 1
928 .bp
929 .(x
930 .ti .8i
931 \\$1
932 .)x
933 ..
934 .de NA
935 .b \\s-2NAME\\s0
936 .ti .5i
937 ..
938 .de SY
939 .sp
940 .b \\s-2SYNOPSIS\\s0
941 .in 1i
942 .ti .5i
943 .na
944 ..
945 .de DE
946 .ad
947 .sp
948 .in 0
949 .b \\s-2DESCRIPTION\\s0
950 .sp
951 .fi
952 .in .5i
953 ..
954 .de Fi
955 .(b L
956 .ti 0
957 .b \\s-2Files\\s0
958 .ta 2i
959 ..
960 .de Pr
961 .)b
962 .(b L F
963 .in 2.5i
964 .ti 0
965 .b "\\s-2Profile Components\\s0"
966 .ti .5i
967 ..
968 .de Ps
969 .ti .5i
970 ..
971 .de De
972 .)b
973 .(b L
974 .in .5i
975 .ti 0
976 .b \\s-2Defaults\\s0
977 ..
978 .de Co
979 .)b
980 .(b L F
981 .ti 0
982 .b \\s-2Context\\s0
983 .br
984 ..
985 .de En
986 .)b
987 .in 0
988 ..
989 .SC COMP
990 .NA
991 comp \- compose a message
992
993 .SY
994 comp [\-editor editor] [\-form formfile] [file] [\-use] [\-nouse] [\-help]
995
996 .DE
997 \fIComp\fP is used to create a new message to be mailed.
998 If
999 \fIfile\fP is not specified, the file named \*(lqdraft\*(rq in the user's MH
1000 directory will be used.
1001 \fIComp\fR copies a message form to
1002 the file being composed and then invokes an editor on the
1003 file.
1004 The default editor is /bin/ned, which may be overridden with
1005 the `\-editor' switch or with a profile entry \*(lqEditor:\*(rq.
1006 (See Ref. 5 for a
1007 description of the NED text editing system.)
1008 The default
1009 message form contains the following elements:
1010
1011 To:
1012 cc:
1013 Subject:
1014 ----------
1015
1016 If the file named \*(lqcomponents\*(rq exists in the user's MH directory,
1017 it will be used instead of this form.
1018 If `\-form
1019 formfile' is specified, the specified formfile (from the MH
1020 directory) will be used as the skeleton.
1021 The line of dashes
1022 or a blank line must be left between the header and the
1023 body of the message for the message to be identified properly when it is
1024 sent (see \fIsend;\fR).
1025 The switch `\-use' directs \fIcomp\fR to
1026 continue editing an already started message.
1027 That is, if a
1028 \fIcomp\fR (or \fIdist\fR, \fIrepl\fR, or \fIforw\fR) is terminated without
1029 sending the message, the message can be edited again via
1030 \*(lqcomp \-use\*(rq.
1031
1032 If the specified file (or draft) already exists, \fIcomp\fR will ask
1033 if you want to delete it before continuing.
1034 A reply of \fBNo\fR will abort the
1035 \fIcomp\fR, \fByes\fR will replace the existing draft with a blank
1036 skeleton, \fBlist\fR will display the draft, and \fBuse\fR will use it
1037 for further composition.
1038
1039 Upon exiting from the editor, \fIcomp\fR will ask \*(lqWhat now?\*(rq.
1040 The valid
1041 responses are \fBlist\fR, to list the draft on the terminal; \fBquit\fR, to
1042 terminate the session and preserve the draft; \fBquit delete\fR, to terminate,
1043 then delete the draft; \fBsend\fR, to send the message; \fBsend verbose\fR, to
1044 cause the delivery process to be monitored; \fBedit <editor>\fR, to invoke
1045 <editor> for further editing; and \fBedit\fR, to re-edit using the
1046 same editor that was used on the preceding round unless a profile
1047 entry \*(lq<lasteditor>\-next: <editor>\*(rq names an alternative editor.
1048
1049 .Fi
1050 ^/etc/mh/components~^The message skeleton
1051 ^or <mh-dir>/components~^Rather than the standard skeleton
1052 ^$HOME/\*.mh\(ruprofile~^The user profile
1053 ^<mh-dir>/draft~^The default message file
1054 ^/usr/bin/send~^To send the composed message
1055 .Pr
1056 ^Path:~^To determine the user's MH directory
1057 .Ps
1058 ^Editor:~^To override the use of /bin/ned as the default editor
1059 .Ps
1060 ^<lasteditor>\-next:~^To name an editor to be used after exit from <lasteditor>
1061 .De
1062 `file' defaults to draft
1063 `\-editor' defaults to /bin/ned
1064 `\-nouse'
1065 .Co
1066 \fIComp\fR does not affect either the current folder or the current message.
1067 .En
1068 .SC DIST
1069 .NA
1070 dist \- redistribute a message to additional addresses
1071 .SY
1072 dist [+folder] [msg] [\-form formfile] [\-editor editor]
1073 [\-annotate] [\-noannotate]
1074 [\-inplace] [\-noinplace]
1075 [\-help]
1076 .DE
1077 \fIDist\fR is similar to \fIforw\fR.
1078 It prepares the specified
1079 message for redistribution to addresses that (presumably) are
1080 not on the original address list.
1081 The file \*(lqdistcomps\*(rq in the
1082 user's MH directory, or a standard form, or the file specified by
1083 `\-form formfile' will be used as the blank components file to
1084 be prepended to the message being distributed.
1085 The standard form
1086 has the components \*(lqDistribute-to:\*(rq and \*(lqDistribute-cc:\*(rq.
1087 When
1088 the message is sent, \*(lqDistribution-Date:\0date\*(rq,
1089 \*(lqDistribution-From:\0name\*(rq, and
1090 \*(lqDistribution-Id:\0id\*(rq (if `\-msgid' is
1091 specified to \fIsend\fR;) will be prepended to the outgoing message.
1092 Only those addresses in \*(lqDistribute-To\*(rq, \*(lqDistribute-cc\*(rq, and
1093 \*(lqDistribute-Bcc\*(rq will be sent.
1094 Also, a \*(lqDistribute-Fcc:\0folder\*(rq
1095 will be honored (see \fIsend;\fR).
1096
1097 \fISend\fR recognizes a message as a redistribution message by the
1098 existence of the field \*(lqDistribute-To:\*(rq, so don't try to
1099 redistribute a message with only a \*(lqDistribute-cc:\*(rq.
1100
1101 If the `\-annotate' switch is given, each message being
1102 distributed will be annotated with the lines:
1103
1104 Distributed:\0\*(<<date\*(>>
1105 Distributed:\0Distribute-to: names
1106
1107 where each \*(lqto\*(rq list contains as many lines as required.
1108 This annotation
1109 will be done only if the message is sent directly from \fIdist\fR.
1110 If the
1111 message is not sent immediately from \fIdist\fR (i.e., if it is sent later
1112 via \fIsend;\fR),
1113 \*(lqcomp \-use\*(rq may be used to re-edit and send the constructed message, but
1114 the annotations won't take place.
1115 The '\-inplace' switch causes annotation to
1116 be done in place in order to preserve links to the annotated message.
1117
1118 See \fIcomp\fR for a description of the `\-editor' switch and for options
1119 upon exiting from the editor.
1120
1121 .Fi
1122 ^/etc/mh/components~^The message skeleton
1123 ^or <mh-dir>/components~^Rather than the standard skeleton
1124 ^$HOME/\*.mh\(ruprofile~^The user profile
1125 ^<mh-dir>/draft~^The default message file
1126 ^/usr/bin/send~^To send the composed message
1127 .Pr
1128 ^Path:~^To determine the user's MH directory
1129 .Ps
1130 ^Editor:~^To override the use of /bin/ned as the default editor
1131 .Ps
1132 ^<lasteditor>\-next:~^To name an editor to be used after exit from <lasteditor>
1133 .De
1134 `+folder' defaults to the current folder
1135 `msg' defaults to cur
1136 `\-editor' defaults to /bin/ned
1137 `\-noannotate'
1138 `\-noinplace'
1139 .Co
1140 If a +folder is specified, it will become the current
1141 folder, and the current message will be set to the message
1142 being redistributed.
1143 .En
1144 .SC FILE
1145 .NA
1146 file \- file message(s) in (an)other folder(s)
1147 .SY
1148 file [\-src +folder] [msgs] [\-link] [\-preserve] +folder\ ...
1149 [\-nolink] [\-nopreserve] [\-help]
1150 .DE
1151 \fIFile\fR moves (\fImv\fR(I)) or links (\fIln\fR(I)) messages from a
1152 source folder into one or more destination folders.
1153 If you think
1154 of a message as a sheet of paper, this operation is not
1155 unlike filing the sheet of paper (or copies) in file cabinet
1156 folders.
1157 When a message is filed, it is linked into the
1158 destination folder(s) if possible, and is copied otherwise.
1159 As long
1160 as the destination folders are all on the same file system, multiple filing
1161 causes little storage overhead.
1162 This facility provides a good way to cross-file or multiply-index
1163 messages.
1164 For example, if a message is received from Jones about
1165 the ARPA Map Project, the instruction
1166
1167 file\0cur\0+jones\0+Map
1168
1169 would allow the message to be found in either of the two
1170 folders `jones' or `Map'.
1171
1172 If a destination folder doesn't exist, \fIfile\fR will ask if you
1173 want to create one.
1174 A negative response will abort the file
1175 operation.
1176
1177 `\-link' preserves the source folder copy of the message
1178 (i.e., it does a \fIln\fR(I) rather than a \fImv\fR(I)), whereas,
1179 `\-nolink' deletes the \*(lqfiled\*(rq messages from the source
1180 folder.
1181 Normally, when a message is filed, it is assigned the
1182 next highest number available in each of the destination folders.
1183 Use of the `\-preserve' switch will override this message
1184 \*(lqrenaming\*(rq, but name conflicts may occur, so
1185 use this switch cautiously.
1186 (See \fIpick\fR for more details on
1187 message numbering.)
1188
1189 If `\-link' is not specified (or `\-nolink' is specified),
1190 the filed messages will be removed (unlink(II)) from the
1191 source folder.
1192
1193 .Fi
1194 ^$HOME/\*.mh\(ruprofile~^The user profile
1195 .Pr
1196 ^Path:~^To determine the user's MH directory
1197 .Ps
1198 ^Current-Folder:~^To find the default current folder
1199 .Ps
1200 ^Folder\-Protect:~^To set mode when creating a new folder
1201 .De
1202 `\-src +folder' defaults to the current folder
1203 `msgs' defaults to cur
1204 `\-nolink'
1205 `\-nopreserve'
1206 .Co
1207 If `\-src +folder' is given, it will become the
1208 current folder for future MH commands.
1209 If neither `\-link' nor
1210 `all' are specified, the current message in the source
1211 folder will be set to the last message specified; otherwise, the
1212 current message won't be changed.
1213 .En
1214 .SC FOLDER
1215 .NA
1216 folder \- set/list current folder/message
1217 .SY
1218 folder [+folder] [msg] [\-all] [\-fast] [\-nofast] [\-up] [\-down]
1219 [\-header] [\-noheader] [\-total] [\-nototal] [\-help]
1220
1221 .ti .5i
1222 folders <equivalent to 'folder \-all'>
1223 .DE
1224 Since the MH environment is the shell, it is easy to lose
1225 track of the current folder from day to day.
1226 \fIFolder\fR will
1227 list the current folder, the number of messages in it, the
1228 range of the messages (low-high), and the current message within
1229 the folder, and will flag a selection list or extra files if they
1230 exist.
1231 An example of the output is:
1232
1233 inbox+ has 16 messages ( 3\- 22); cur= 5.
1234
1235 But it is well to note here that \\n(Us is \n(Us.
1236
1237 If a `+folder' and/or `msg' are specified, they will
1238 become the current folder and/or message.
1239 An `\-all' switch
1240 will produce a line for each folder in the user's MH directory,
1241 sorted alphabetically.
1242 These folders are preceded by the read-only
1243 folders, which occur as \*.mh\(ruprofile \*(lqcur\-\*(rq entries.
1244 For example,
1245
1246 .nf
1247 .ta 1.5i 2.1i 2.7i 3.5i
1248 ^~Folder\ \ ^^~#\ of\ ^^messages~^^(~\ range\~ );\ ^cur msg (other files)
1249 ^~/fsd/rs/m/tacc\ \ ^^has~35\ ^^messages~^^(~1\-\035);\ ^cur=\ 23.
1250 ^~/rnd/phyl/Mail/EP\ \ ^^has~82\ ^^messages~^^(~1\-108);\ ^cur=\ 82.
1251 ^~ff\ \ ^^has~4\ ^^messages~^^(~1\-\0\04);\ ^cur=\ \01.
1252 ^~inbox+\ ^^has~16\ ^^messages~^^(~3\-\022);\ ^cur=\ \05.
1253 ^~mh\ \ ^^has~76\ ^^messages~^^(~1\-\076);\ ^cur=\ 70.
1254 ^~notes\ \ ^^has~2\ ^^messages~^^(~1\-\0\02);\ ^cur=\ \01.
1255 ^~ucom\ \ ^^has~124\ ^^messages~^^(~1\-124);\ ^cur=\ \06; (select).
1256
1257 ^^^~TOTAL=\0339\ ^messages\0in\0\07\0Folders.
1258 .re
1259 .fi
1260
1261 The \*(lq+\*(rq after inbox indicates that it is the current folder.
1262 The \*(lq(select)\*(rq indicates that the folder ucom has a selection
1263 list produced by \fIpick\fR.
1264 If \*(lqothers\*(rq had appeared in parentheses at
1265 the right of a line, it would indicate that there are files in
1266 the folder directory that don't belong under the MH file naming
1267 scheme.
1268
1269 The header is output if either an `\-all' or a `\-header' switch
1270 is specified; it is suppressed by `\-noheader'.
1271 Also, if \fIfolder\fR
1272 is invoked by a name ending with \*(lqs\*(rq (e.g., \fIfolders\fR),
1273 `\-all' is assumed.
1274 A `\-total' switch will produce only the
1275 summary line.
1276
1277 If `\-fast' is given, only the folder name (or names in the
1278 case of `\-all') will be listed.
1279 (This is faster because the
1280 folders need not be read.)
1281
1282 The switches `\-up' and `\-down' change the folder to be the
1283 one above or below the current folder.
1284 That is, \*(lqfolder \-down\*(rq
1285 will set the folder to \*(lq<current\-folder>/select\*(rq, and if the
1286 current folder is a selection-list folder, \*(lqfolder \-up\*(rq will
1287 set the current folder to the parent of the selection-list.
1288 (See \fIpick\fR for details on selection-lists.)
1289 .Fi
1290 ^$HOME/\*.mh\(ruprofile~^The user profile
1291 ^/bin/ls~^To fast-list the folders
1292 .Pr
1293 ^Path:~^To determine the user's MH directory
1294 .Ps
1295 ^Current-Folder:~^To find the default current folder
1296 .De
1297 `+folder' defaults to the current folder
1298 `msg' defaults to none
1299 `\-nofast'
1300 `\-noheader'
1301 `\-nototal'
1302 .Co
1303 If `+folder' and/or `msg' are given, they will become the
1304 current folder and/or message.
1305 .En
1306 .SC FORW
1307 .NA
1308 forw \- forward messages
1309 .SY
1310 forw [+folder] [msgs] [\-editor editor] [\-form formfile]
1311 [\-annotate] [\-noannotate]
1312 [\-inplace] [\-noinplace]
1313 [\-help]
1314 .DE
1315 \fIForw\fR may be used to prepare a message containing other
1316 messages.
1317 It constructs the new message from the components file
1318 or `\-form formfile' (see \fIcomp\fR), with a body composed of the
1319 message(s) to be forwarded.
1320 An editor is invoked as in \fIcomp\fR,
1321 and after editing is complete, the user is prompted before the message
1322 is sent.
1323
1324 If the `\-annotate' switch is given, each message being
1325 forwarded will be annotated with the lines
1326
1327 Forwarded: \*(<<date\*(>>
1328 Forwarded: To: names
1329 Forwarded: cc: names
1330
1331 where each \*(lqTo:\*(rq and \*(lqcc:\*(rq list contains as many lines as required.
1332 This annotation will be done only if the message is sent directly
1333 from \fIforw\fR.
1334 If the message is not sent immediately from \fIforw\fR,
1335 \*(lqcomp \-use\*(rq may be used in a later session to re-edit and send
1336 the constructed message, but the annotations won't take place.
1337 The `\-inplace' switch permits annotating a message in place in
1338 order to preserve its links.
1339
1340 See \fIcomp\fR for a description of the `\-editor' switch.
1341 .Fi
1342 ^/etc/mh/components~^The message skeleton
1343 ^or <mh-dir>/components~^Rather than the standard skeleton
1344 ^$HOME/\*.mh\(ruprofile~^The user profile
1345 ^<mh-dir>/draft~^The default message file
1346 ^/usr/bin/send~^To send the composed message
1347 .Pr
1348 ^Path:~^To determine the user's MH directory
1349 .Ps
1350 ^Editor:~^To override the use of /bin/ned as the default editor
1351 .Ps
1352 ^Current-Folder:~^To find the default current folder
1353 .Ps
1354 ^<lasteditor>\-next:~^To name an editor to be used after exit from <lasteditor>
1355 .De
1356 `+folder' defaults to the current folder
1357 `msgs' defaults to cur
1358 `\-editor' defaults to /bin/ned
1359 `\-noannotate'
1360 `\-noinplace'
1361 .Co
1362 If a +folder is specified, it will become
1363 the current folder, and the current message will be set to
1364 the first message being forwarded.
1365 .En
1366 .SC INC
1367 .NA
1368 inc \- incorporate new mail
1369 .SY
1370 inc [+folder] [\-audit audit-file] [\-help]
1371 .DE
1372 \fIInc\fR incorporates mail from the user's incoming mail drop
1373 (\*.mail) into an MH folder.
1374 If `+folder' isn't specified,
1375 the folder named \*(lqinbox\*(rq in the user's MH directory will be used.
1376 The
1377 new messages being incorporated are assigned numbers starting
1378 with the next highest number in the folder.
1379 If the specified (or
1380 default) folder doesn't exist, the user will be queried prior to
1381 its creation.
1382 As the messages are processed, a \fIscan\fR listing
1383 of the new mail is produced.
1384
1385 If the user's profile contains a \*(lqMsg\-Protect: nnn\*(rq entry, it
1386 will be used as the protection on the newly created messages,
1387 otherwise the MH default of 664 will be used.
1388 During all
1389 operations on messages, this initially assigned protection will
1390 be preserved for each message, so \fIchmod\fR(I) may be used to set a
1391 protection on an individual message, and its protection will be
1392 preserved thereafter.
1393
1394 If the switch `\-audit audit-file' is specified (usually as a
1395 default switch in the profile), then \fIinc\fR will append a header
1396 line and a line per message to the end of the specified
1397 audit-file with the format:
1398
1399 .nf
1400 .ti 1i
1401 \*(<<inc\*(>> date
1402 .ti 1.5i
1403 <scan line for first message>
1404 .ti 1.5i
1405 <scan line for second message>
1406 .ti 2.5i
1407 <etc.>
1408 .fi
1409
1410 This is useful for keeping track of volume and source of incoming
1411 mail.
1412 Eventually, \fIrepl\fR, \fIforw\fR, \fIcomp\fR, and \fIdist\fR may also
1413 produce audits to this (or another) file, perhaps with
1414 \*(lqMessage-Id:\*(rq information to keep an exact correspondence history.
1415 \*(lqAudit-file\*(rq will be in the user's MH directory unless a full
1416 path is specified.
1417
1418 \fIInc\fR will incorporate even illegally formatted messages into the
1419 user's MH folder, inserting a blank line prior to the offending
1420 component and printing a comment identifying the bad message.
1421
1422 In all cases, the \*.mail file will be zeroed.
1423 .Fi
1424 ^$HOME/\*.mh\(ruprofile~^The user profile
1425 ^$HOME/\*.mail~^The user's mail drop
1426 ^<mh-dir>/audit-file~^Audit trace file (optional)
1427 .Pr
1428 ^Path:~^To determine the user's MH directory
1429 .Ps
1430 ^Folder\-Protect:~^For protection on new folders
1431 .Ps
1432 ^Msg\-Protect:~^For protection on new messages
1433 .De
1434 `+folder' defaults to \*(lqinbox\*(rq
1435 .Co
1436 The folder into which the message is
1437 being incorporated will become the
1438 current folder, and the first message incorporated will be the
1439 current message.
1440 This leaves the context ready for a \fIshow\fR
1441 of the first new message.
1442 .En
1443 .SC NEXT
1444 .NA
1445 next \- show the next message
1446 .SY
1447 next [+folder] [\-switches for \fIl\fR] [\-help]
1448 .DE
1449 \fINext\fR performs a \fIshow\fR on the next message in the
1450 specified (or current) folder.
1451 Like \fIshow\fR, it passes any
1452 switches on to the program \fIl\fR, which is called to list the
1453 message.
1454 This command is exactly equivalent to \*(lqshow next\*(rq.
1455 .Fi
1456 ^$HOME/\*.mh\(ruprofile~^The user profile
1457 .Pr
1458 ^Path:~^To determine the user's MH directory
1459 .Ps
1460 ^Current-Folder:~^To find the default current folder
1461 .De
1462 .Co
1463 If a folder is specified, it will become the current folder, and the
1464 message that is shown (i.e., the next message in sequence)
1465 will become the current message.
1466 .En
1467 .SC PICK
1468 .NA
1469 pick \- select messages by content
1470 .SY
1471 .ta .4i 1.8i
1472 .nf
1473 .in .5i
1474 ^pick~^^\0\-cc~^ [\-src +folder] [msgs] [\-help] [\-scan] [\-noscan]
1475 ^^^\0\-date~^ [\-show] [\-noshow] [\-nofile] [\-nokeep]
1476 ^^^\0\-from~^
1477 ^^^\s+2\b'\(lt\(bv\(bv\(lk\(bv\(bv\(lb'\s0 \-search~\s+2\b'\(rt\(bv\(bv\(rk\(bv\(bv\(rb'\s0^ pattern
1478 ^^^\0\-subject~^
1479 ^^^\0\-to~^ [\-file [\-preserve] [\-link] +folder ... [\-nopreserve] [\-nolink] ]
1480 ^^^\0\-\-component~^ [\-keep [\-stay] [\-nostay] [+folder ...] ]
1481 .fi
1482
1483 .re
1484 .ti .5i
1485 typically:
1486 .in 1i
1487 pick\0\-from\0jones\0\-scan
1488 .br
1489 pick\0\-to\0holloway
1490 .br
1491 pick\0\-subject\0ned\0\-scan\0\-keep
1492 .DE
1493 \fIPick\fR searches messages within a folder for the specified
1494 contents, then performs several operations on the selected
1495 messages.
1496
1497 A modified \fIgrep\fR(I) is used to perform the searching, so the
1498 full regular expression (see \fIed\fR(I)) facility is available
1499 within `pattern'.
1500 With `\-search', pattern is used directly,
1501 and with the others, the grep pattern constructed is:
1502
1503 .ti +.5i
1504 \*(lq^component:\*.\*(**pattern\*(rq
1505
1506 This means that the pattern specified for a `\-search' will be
1507 found everywhere in the message, including the header and the body,
1508 while the other search requests are limited to the single
1509 specified component.
1510 The expression `\-\-component pattern'
1511 is a shorthand for
1512 specifying `\-search \*(lqcomponent:\*.\*(**pattern\*(rq\ '; it is used to pick
1513 a component not in the set [cc date from subject to].
1514 An
1515 example is \*(lqpick \-\-reply\-to pooh \-show\*(rq.
1516
1517 Searching is performed on a per-line basis.
1518 Within the header of
1519 the message, each component is treated as one long line, but in
1520 the body, each line is separate.
1521 Lower-case letters in the
1522 search pattern will match either lower or upper case in the
1523 message, while upper case will match only upper case.
1524
1525 Once the search has been performed, the selected messages
1526 are scanned (see \fIscan\fR) if the `\-scan' switch is given, and
1527 then they are shown (see \fIshow\fR) if the `\-show' switch is
1528 given.
1529 After these two operations, the file operations (if
1530 requested) are performed.
1531
1532 The `\-file' switch operates exactly like the \fIfile\fR command, with the
1533 same meaning for the `\-preserve' and `\-link' switches.
1534
1535 The `\-keep' switch is similar to `\-file', but it produces a folder that
1536 is a subfolder of the folder being searched and defines it as
1537 the current folder (unless the `\-stay' flag is used).
1538 This
1539 subfolder contains the messages which matched the search
1540 criteria.
1541 All of the MH commands may be used with the sub-folder
1542 as the current folder.
1543 This gives the user considerable power
1544 in dealing with subsets of messages in a folder.
1545
1546 The messages in a folder produced by `\-keep' will always have the
1547 same numbers as they have in the source folder (i.e., the
1548 `\-preserve' switch is automatic).
1549 This way, the message
1550 numbers are consistent with the folder from which the messages
1551 were selected.
1552 Messages are not removed from the source folder
1553 (i.e., the `\-link' switch is assumed).
1554 If a `+folder' is not
1555 specified, the standard name \*(lqselect\*(rq will be used.
1556 (This is the
1557 meaning of \*(lq(select)\*(rq when it appears in the output of the
1558 \fIfolder\fR command.) If `+folder' arguments are given to
1559 `\-keep', they will be used rather than \*(lqselect\*(rq for the names
1560 of the subfolders.
1561 This allows for several subfolders to be
1562 maintained concurrently.
1563
1564 When a `\-keep' is performed, the subfolder becomes the current folder.
1565 This can be overridden by use
1566 of the `\-stay' switch.
1567
1568 Here's an example:
1569
1570 .nf
1571 \01 % folder +inbox
1572 \02 inbox+ has 16 messages ( 3\- 22); cur= 3.
1573 \03 % pick \-from dcrocker
1574 \04 6 hits.
1575 \05 [+inbox/select now current]
1576 \06 % folder
1577 \07 inbox/select+ has \06 messages ( 3\- 16); cur= 3.
1578 \08 % scan
1579 .ds + \\h'\\w!+!'
1580 \09 \03+ 6/20 Dcrocker Re: ned file update issue...
1581 10 \06\*+ 6/23 Dcrocker removal of files from /tm...
1582 11 \08\*+ 6/27 Dcrocker Problems with the new ned...
1583 12 13\*+ 6/28 dcrocker newest nned \*(<<I would ap...
1584 13 15\*+ 7/\05 Dcrocker nned \*(<<Last week I asked...
1585 14 16\*+ 7/\05 dcrocker message id format \*(<<I re...
1586 15 % show all | print
1587 16 [produce a full listing of this set of messages on the line printer.]
1588 17 % folder \-up
1589 18 inbox+ has 16 messages ( 3\- 22); cur= 3; (select).
1590 19 % folder \-down
1591 20 inbox/select+ has 6 messages ( 3\- 16); cur= 3.
1592 21 % rmf
1593 22 [+inbox now current]
1594 23 % folder
1595 24 inbox+ has 16 messages ( 3\- 22); cur= 3.
1596 .fi
1597
1598 This is a rather lengthy example, but it shows the power of the
1599 MH package.
1600 In item 1, the current folder is set to inbox.
1601 In 3,
1602 all of the messages from dcrocker are found in inbox and linked
1603 into the folder \*(lqinbox/select\*(rq.
1604 (Since no action switch is
1605 specified, `\-keep' is assumed.) Items 6 and 7 show that this
1606 subfolder is now the current folder.
1607 Items 8 through 14 are a
1608 \fIscan\fR of the selected messages (note that they are all from dcrocker
1609 and are all in upper and lower case).
1610 Item 15 lists all of the messages to
1611 the high-speed printer.
1612 Item 17 directs \fIfolder\fR to set the
1613 current folder to the parent of the selection-list folder, which
1614 is now current.
1615 Item 18 shows that this has been done.
1616 Item 19 resets
1617 the current folder to the selection list, and 21 removes the
1618 selection-list folder and resets the current folder to the
1619 parent folder, as shown in 22 and 23.
1620 .Fi
1621 ^$HOME/\*.mh\(ruprofile~^The user profile
1622 .Pr
1623 ^Path:~^To determine the user's MH directory
1624 .Ps
1625 ^Folder\-Protect:~^For protection on new folders
1626 .Ps
1627 ^Current-Folder:~^To find the default current folder
1628 .De
1629 `\-src +folder' defaults to current
1630 `msgs' defaults to all
1631 .fi
1632 `\-keep +select' is the default if no `\-scan', `\-show', or `\-file' is specified
1633 .Co
1634 If a `\-src +folder' is specified, it will
1635 become the current folder, unless a `\-keep' with 0 or 1
1636 folder arguments makes the selection-list subfolder the
1637 current folder.
1638 Each selection-list folder will have its
1639 current message set to the first of the messages linked into
1640 it unless the selection list already existed, in which case the
1641 current message won't be changed.
1642 .En
1643 .SC PREV
1644 .NA
1645 prev \- show the previous message
1646 .SY
1647 prev [+folder] [\-switches for \fIl\fR] [\-help]
1648 .DE
1649 \fIPrev\fR performs a \fIshow\fR on the previous message in the specified
1650 (or current) folder.
1651 Like \fIshow\fR, it passes any switches on to the
1652 program \fIl\fR, which is called to list the message.
1653 This command
1654 is exactly equivalent to \*(lqshow prev\*(rq.
1655 .Fi
1656 ^$HOME/\*.mh\(ruprofile~^The user profile
1657 .Pr
1658 ^Path:~^To determine the user's MH directory
1659 .Ps
1660 ^Current-Folder:~^To find the default current folder
1661 .De
1662 .Co
1663 If a folder is specified, it will become current, and the
1664 message that is shown (i.e., the previous message in sequence)
1665 will become the current message.
1666 .En
1667 .SC PROMPTER
1668 .NA
1669 prompter \- prompts the editor front end
1670 .SY
1671 This program is not called directly but takes the place
1672 of an editor and acts as an editor front end.
1673
1674 .ti .5i
1675 prompter [\-erase chr] [\-kill chr] [\-help]
1676 .DE
1677 \fIPrompter\fR is an editor which allows rapid composition of
1678 messages.
1679 It is particularly useful to network and low-speed
1680 (less than 2400 baud) users of MH.
1681 It is an MH program in that
1682 it can have its own profile entry with switches, but it can't
1683 be invoked directly as all other MH commands can; it is an editor
1684 in that it is invoked by an \*(lq\-editor prompter\*(rq switch or by the
1685 profile entry \*(lqEditor: prompter\*(rq, but functionally it is merely
1686 a text-collector and not a true editor.
1687
1688 \fIPrompter\fR expects to be called from \fIcomp\fR, \fIrepl\fR, \fIdist\fR, or
1689 \fIforw\fR, with a draft file as an argument.
1690 For example, \*(lqcomp
1691 \-editor prompter\*(rq will call \fIprompter\fR with the file \*(lqdraft\*(rq already set
1692 up with blank components.
1693 For each blank component it finds in
1694 the draft, it prompts the user and accepts a response.
1695 A
1696 <RETURN> will cause the whole component to be left out.
1697 A \*(lq\\\*(rq
1698 preceding a <RETURN> will continue the response on the next line,
1699 allowing for multiline components.
1700
1701 Any component that is non-blank will be copied and echoed to the
1702 terminal.
1703
1704 The start of the message body is prompted by a line of
1705 dashes.
1706 If the body is non-blank, the prompt is
1707 \*(lq--------Enter additional text\*(rq.
1708 Message-body typing is terminated with
1709 a <CTRL-D> (or <CLOSE>).
1710 Control is returned to the calling
1711 program, where the user is asked \*(lqWhat now?\*(rq.
1712 See \fIcomp\fR for
1713 the valid options.
1714
1715 During \fIprompter\fR execution, the line-deletion character is
1716 redefined to be <CTRL-F> (<OPEN> on a NED Ann Arbor terminal)
1717 rather than @, to facilitate the typing of ARPANET addresses such as
1718 \*(lqKierr @ PARC\*(rq.
1719 The standard UNIX character-deletion code is
1720 changed from # to <CTRL-A>, but the destructive backspace key
1721 will continue to work normally.
1722 These two characters may be
1723 specified by the user via the arguments \*(lq\-kill chr\*(rq and \*(lq\-erase
1724 chr\*(rq, where chr may be a character; or \*(lq\\nnn\*(rq, where nnn is the
1725 octal value for the character.
1726 (Again, these may come from the
1727 default switches specified in the user's profile.)
1728
1729 A <DEL> during message-body typing is equivalent to
1730 <CTRL-D> for compatibility with NED.
1731 A <DEL> during
1732 component typing will abort the command that invoked
1733 \fIprompter\fR.
1734 .Fi
1735 None
1736 .Pr
1737 ^prompter-next:~^To name the editor to be used on exit from \fIprompter\fR
1738 .De
1739 `\-editor' defaults to /bin/ned
1740 `\-kill \\006'
1741 `\-erase \\001'
1742 .Co
1743 None
1744 .En
1745 .SC REPL
1746 .NA
1747 repl \- reply to a message
1748 .SY
1749 repl [+folder] [msg] [\-editor editor] [\-inplace] [\-annotate]
1750 [\-help] [\-noinplace] [\-noannotate]
1751 .DE
1752 \fIRepl\fR aids a user in producing a reply to an existing
1753 message.
1754 In its simplest form (with no arguments), it will set up
1755 a message-form skeleton in reply to the current message in the
1756 current folder, invoke the editor, and send the composed
1757 message if so directed.
1758 The composed message is constructed as
1759 follows:
1760
1761 .nf
1762 .in 1i
1763 To: <Reply-To> or <From>
1764 cc: <cc>, <To>
1765 Subject: Re: <Subject>
1766 In-reply-to: Your message of <Date>
1767 .ti +\w'In-reply-to: 'u
1768 <Message-Id>
1769 .in .5i
1770 .fi
1771
1772 where field names enclosed in angle brackets (< >) indicate the
1773 contents of the named field from the message to which the reply
1774 is being made.
1775 Once the skeleton is constructed, an editor is
1776 invoked (as in \fIcomp\fR, \fIdist\fR, and \fIforw\fR).
1777 While in the editor,
1778 the message being replied to is available through a link named
1779 \*(lq@\*(rq.
1780 In NED, this means the replied-to message may be \*(lqused\*(rq
1781 with \*(lquse @\*(rq, or put in a window by \*(lqwindow @\*(rq.
1782
1783 As in \fIcomp\fR, \fIdist\fR, and \fIforw\fR, the user will be queried
1784 before the message is sent.
1785 If the `\-annotate' switch is
1786 specified, the replied-to message will be annotated with the
1787 single line
1788
1789 .ti +.5i
1790 Replied: \*(<<Date\*(>>
1791
1792 only if the message is sent directly.
1793 The command
1794 \*(lqcomp \-use\*(rq may be used to pick up interrupted editing, as in
1795 \fIdist\fR and \fIforw\fR; the `\-inplace' switch annotates the message in place,
1796 so that all folders with links to it will see the annotation.
1797 .Fi
1798 ^$HOME/\*.mh\(ruprofile~^The user profile
1799 ^<mh-dir>/draft~^The constructed message file
1800 ^/usr/bin/send~^To send the composed message
1801 .Pr
1802 ^Path:~^To determine the user's MH directory
1803 .Ps
1804 ^Editor:~^To override the use of /bin/ned as the default editor
1805 .Ps
1806 ^Current-Folder:~^To find the default current folder
1807 .De
1808 `+folder' defaults to current
1809 `msgs' defaults to cur
1810 `\-editor' defaults to /bin/ned
1811 `\-noannotate'
1812 `\-noinplace'
1813 .Co
1814 If a `+folder' is specified, it will become the current
1815 folder, and the current message will be set to the replied-to
1816 message.
1817 .En
1818 .SC RMF
1819 .NA
1820 rmf \- remove folder
1821 .SY
1822 rmf [+folder] [\-help]
1823 .DE
1824 \fIRmf\fR removes all of the files (messages) within the specified
1825 (or default) folder, and then removes the directory (folder).
1826 If
1827 there are any files within the folder which are not a part of MH,
1828 they will \fInot\fR be removed, and an error will be produced.
1829 If the
1830 folder is given explicitly or the current folder is a
1831 subfolder (i.e., a selection list from \fIpick\fR), it will be
1832 removed without confirmation.
1833 If no argument is specified and
1834 the current folder is not a selection-list folder, the
1835 user will be asked for confirmation.
1836
1837 \fIRmf\fR irreversibly deletes messages that don't have other links,
1838 so use it with caution.
1839
1840 If the folder being removed is a subfolder, the parent
1841 folder will become the new current folder, and \fIrmf\fR will
1842 produce a message telling the user this has happened.
1843 This
1844 provides an easy mechanism for selecting a set of messages,
1845 operating on the list, then removing the list and returning to
1846 the current folder from which the list was extracted.
1847 (See the
1848 example under \fIpick\fR.)
1849
1850 The files that \fIrmf\fR will delete are cur, any file beginning
1851 with a comma, and files with purely numeric names.
1852 All others
1853 will produce error messages.
1854
1855 \fIRmf\fR of a read-only folder will delete the \*(lqcur\-\*(rq entry from the
1856 profile without affecting the folder itself.
1857 .Fi
1858 ^$HOME/\*.mh\(ruprofile~^The user profile
1859 .Pr
1860 ^Path:~^To determine the user's MH directory
1861 .Ps
1862 ^Current-Folder:~^To find the default current folder
1863 .De
1864 `+folder' defaults to current, usually with confirmation
1865 .Co
1866 \fIRmf\fR will set the current folder to the parent folder if a
1867 subfolder is removed; or if the current folder is removed,
1868 it will make \*(lqinbox\*(rq current.
1869 Otherwise, it doesn't change the
1870 current folder or message.
1871 .En
1872 .SC RMM
1873 .NA
1874 rmm \- remove messages
1875 .SY
1876 rmm [+folder] [msgs] [\-help]
1877 .DE
1878 \fIRmm\fR removes the specified messages by renaming the message
1879 files with preceding commas.
1880 (This is the Rand-UNIX backup file
1881 convention.)
1882
1883 The current message is not changed by \fIrmm\fR, so a \fInext\fR will
1884 advance to the next message in the folder as expected.
1885 .Fi
1886 ^$HOME/\*.mh\(ruprofile~^The user profile
1887 .Pr
1888 ^Path:~^To determine the user's MH directory
1889 .Ps
1890 ^Current-Folder:~^To find the default current folder
1891 .De
1892 `+folder' defaults to current
1893 `msgs' defaults to cur
1894 .Co
1895 If a folder is given, it will become current.
1896 .En
1897 .SC SCAN
1898 .NA
1899 scan \- produce a one-line-per-message scan listing
1900 .SY
1901 scan [+folder] [msgs] [\-ff] [\-header] [\-help]
1902 [\-noff] [\-noheader]
1903 .DE
1904 \fIScan\fR produces a one-line-per-message listing of the specified
1905 messages.
1906 Each \fIscan\fR line contains the message number (name),
1907 the date, the \*(lqFrom\*(rq field, the \*(lqSubject\*(rq field, and, if room
1908 allows, some of the body of the message.
1909 For example:
1910
1911 .nf
1912 .ta .5i 1.2i 2.6i
1913 ^ #~^^Date~^^ From~^Subject\ \ \ \ \[\*(<<Body]
1914 ^15+~^^7/\05~^^Dcrocker~^nned \*(<<Last week I asked some of
1915 ^16\ \-~^^7/\05~^^dcrocker~^message id format \*(<<I recommend
1916 ^18~^^7/\06~^^Obrien~^Re: Exit status from mkdir
1917 ^19~^^7/\07~^^Obrien~^"scan" listing format in MH
1918 .re
1919 .fi
1920
1921 The `+' on message 15 indicates that it is the current message.
1922 The `\-' on message 16 indicates that it has been
1923 replied to, as indicated by a \*(lqReplied:\*(rq component produced by
1924 an `\-annotate' switch to the \fIrepl\fR command.
1925
1926 If there is sufficient room left on the \fIscan\fR line after the
1927 subject, the line will be filled with text from the body,
1928 preceded by \*(<<.
1929 \fIScan\fR actually reads each of the specified
1930 messages and parses them to extract the desired fields.
1931 During parsing, appropriate error messages will be produced if
1932 there are format errors in any of the messages.
1933
1934 The `\-header' switch produces a header line prior to the \fIscan\fR
1935 listing, and the `\-ff' switch will cause a form feed to be
1936 output at the end of the \fIscan\fR listing.
1937 See Appendix D.
1938 .Fi
1939 ^$HOME/\*.mh\(ruprofile~^The user profile
1940 .Pr
1941 ^Path:~^To determine the user's MH directory
1942 .Ps
1943 ^Current-Folder:~^To find the default current folder
1944 .De
1945 Defaults:
1946 `+folder' defaults to current
1947 `msgs' defaults to all
1948 `\-noff'
1949 `\-noheader'
1950 .Co
1951 If a folder is given, it will become current.
1952 The current
1953 message is unaffected.
1954 .En
1955 .SC SEND
1956 .NA
1957 send \- send a message
1958 .SY
1959 send [file] [\-draft] [\-verbose] [\-format] [\-msgid]
1960 [\-help] [\-noverbose] [\-noformat] [\-nomsgid]
1961 .DE
1962 \fISend\fR will cause the specified file (default <mh-dir>/draft) to
1963 be delivered to each of the addresses in the \*(lqTo:\*(rq, \*(lqcc:\*(rq, and \*(lqBcc:\*(rq
1964 fields of the message.
1965 If `\-verbose' is specified, \fIsend;\fR
1966 will monitor the delivery of local and net mail.
1967 \fISend\fR with no
1968 argument will query whether the draft is the intended file, whereas
1969 `\-draft' will suppress this question.
1970 Once the message has
1971 been mailed (or queued) successfully, the file will be renamed
1972 with a leading comma, which allows it to be retreived until the
1973 next draft message is sent.
1974 If there are errors in the
1975 formatting of the message, \fIsend;\fR will abort with a (hopefully)
1976 helpful error message.
1977
1978 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
1979 delivery, but the \*(lqBcc:\*(rq field itself will be deleted from all
1980 copies of the outgoing message.
1981
1982 Prior to sending the message, the fields \*(lqFrom: user\*(rq, and
1983 \*(lqDate: now\*(rq will be prepended to the message.
1984 If `\-msgid' is
1985 specified, then a \*(lqMessage-Id:\*(rq field will also be added to the
1986 message.
1987 If the message already contains a \*(lqFrom:\*(rq field, then a
1988 \*(lqSender: user\*(rq field will be added instead.
1989 (An already existing
1990 \*(lqSender:\*(rq field will be deleted from the message.)
1991
1992 If the user doesn't specify `\-noformat', each of the entries in
1993 the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq format
1994 entries.
1995 This standard format is designed to be usable by all
1996 of the message handlers on the various systems around the
1997 ARPANET.
1998
1999 If an \*(lqFcc: folder\*(rq is encountered, the message will be copied
2000 to the specified folder in the format in which it will appear to any
2001 receivers of the message.
2002 That is, it will have the prepended
2003 fields and field reformatting.
2004
2005 If a \*(lqDistribute-To:\*(rq field is encountered, the message
2006 is handled as a redistribution message (see \fIdist\fR for
2007 details), with \*(lqDistribution-Date: now\*(rq and \*(lqDistribution-From: user\*(rq
2008 added.
2009 .Fi
2010 ^$HOME/\*.mh\(ruprofile~^The user profile
2011 .Pr
2012 ^Path:~^To determine the user's MH directory
2013 .De
2014 `file' defaults to draft
2015 `\-noverbose'
2016 `\-format'
2017 `\-nomsgid'
2018 .Co
2019 \fISend\fR has no effect on the current message or folder.
2020 .En
2021 .SC SHOW
2022 .NA
2023 show \- show (list) messages
2024 .SY
2025 show [+folder] [msgs] [\-pr] [\-nopr] [\-draft] [\-help]
2026 [\fIl\fR or \fIpr\fR switches]
2027 .DE
2028 \fIShow\fR lists each of the specified messages to the standard
2029 output (typically, the terminal).
2030 The messages are listed exactly
2031 as they are, with no reformatting.
2032 A program called \fIl\fR is
2033 invoked to do the listing, and any switches not recognized by
2034 \fIshow\fR are passed along to \fIl\fR.
2035
2036 If no \*(lqmsgs\*(rq are specified, the current message is used.
2037 If
2038 more than one message is specified, \fIl\fR will prompt for a
2039 <return> prior to listing each message.
2040
2041 \fIl\fR will list each message, a page at a time.
2042 When the end of
2043 page is reached, \fIl\fR will ring the bell and wait for a <RETURN>
2044 or <CTRL-D>.
2045 If a <return> is entered, \fIl\fR will clear the
2046 screen before listing the next page, whereas <CTRL-D> will not.
2047 The switches to \fIl\fR are
2048 `\-p#' to indicate the page length in lines, and `\-w#' to
2049 indicate the width of the page in characters.
2050
2051 If the standard output is not a terminal, no queries are made,
2052 and each file is listed with a one-line header and two lines of
2053 separation.
2054
2055 If `\-pr' is specified, then \fIpr\fR(I) will be invoked rather than
2056 \fIl\fR, and the switches (other than `\-draft') will be passed
2057 along.
2058 \*(lqShow \-draft\*(rq will list the file <mh-dir>/draft if it
2059 exists.
2060 .Fi
2061 ^$HOME/\*.mh\(ruprofile~^The user profile
2062 ^/bin/l~^Screen-at-a-time list program
2063 ^/bin/pr~^\fIpr\fR(I)
2064 .Pr
2065 ^Path:~^To determine the user's MH directory
2066 .Ps
2067 ^Current-Folder:~^To find the default current folder
2068 .De
2069 `+folder' defaults to current
2070 `msgs' defaults to cur
2071 `\-nopr'
2072 .Co
2073 If a folder is given, it will become the current message.
2074 The last message
2075 listed will become the current message.
2076 .En
2077 .fo ''-%-''
2078 .he ''''
2079 \".AH COMMAND SUMMARY*
2080 .(x
2081
2082
2083 APPENDICES
2084 .)x _
2085 .++ A
2086 \".+c "COMMAND SUMMARY\**"
2087 .bp
2088 .ll 32P
2089 .lt 32P
2090 .ce
2091 COMMAND SUMMARY\**
2092 .(f
2093 \**All commands accept a \-help switch.
2094 .)f
2095 .(x
2096
2097 A.\ COMMAND\ SUMMARY
2098 .)x
2099 .sp 3
2100 .nr ch +1
2101 .nf
2102 comp [file] [\-editor editor] [\-form formfile]
2103 [\-use] [\-nouse]
2104
2105 dist [+folder] [msg] [\-form formfile] [\-editor editor]
2106 [\-annotate] [\-noannotate]
2107 [\-inplace] [\-noinplace]
2108
2109 file [\-src +folder][msgs] [\-link] [\-preserve] +folder ...
2110 [\-nolink] [\-nopreserve]
2111
2112 folder [+folder] [msg] [\-all] [\-fast] [\-nofast] [\-up] [\-down]
2113 [\-header] [\-noheader] [\-total] [\-nototal]
2114
2115 forw [+folder] [msgs] [\-editor editor] [\-form formfile]
2116 [\-annotate] [\-noannotate]
2117 [\-inplace] [\-noinplace]
2118
2119 inc [+folder] [\-audit audit-file]
2120
2121 next [+folder] [\-switches for \fIl\fR]
2122
2123 pick {\-cc } [\-src +folder] [msgs]
2124 {\-date } [\-scan] [\-noscan] [\-show] [\-noshow]
2125 {\-from }
2126 {\-search } pattern [\-nofile] [\-nokeep]
2127 {\-subject }
2128 {\-to } [\-file [\-preserve] [\-nopreserve] [\-link]
2129 {\-\-component} [\-nolink] +folder ... ]
2130 [\-keep [\-stay] [+folder ...] [\-nostay] ]
2131
2132 prev [+folder] [\-switches for \fIl\fR]
2133
2134 prompter [\-erase chr] [\-kill chr]
2135
2136 repl [+folder] [msg] [\-editor editor] [\-annotate] [\-noannotate]
2137 [\-inplace] [\-noinplace]
2138
2139 rmf [+folder]
2140
2141 rmm [+folder] [msgs]
2142
2143 scan [+folder] [msgs] [\-ff] [\-header]
2144 [\-noff] [\-noheader]
2145
2146 send [file] [\-draft] [\-verbose] [\-format] [\-msgid]
2147 [\-noverbose] [\-noformat] [\-nomsgid]
2148
2149 show [+folder] [msgs] [\-pr] [\-nopr] [\-draft]
2150 [\fIl\fR or \fIpr\fR switches]
2151 .fi
2152 .he ''-%-''
2153 .fo ''''
2154 .+c "MESSAGE FORMAT"
2155 .pp
2156 This section paraphrases the format of ARPANET text messages
2157 given in Ref. 6.
2158 .lp
2159 ASSUMPTIONS
2160 .np
2161 Messages
2162 are expected to consist of lines of text.
2163 Graphics and binary data are not handled.
2164 .np
2165 No data compression is accepted.
2166 All text is clear
2167 ASCII 7-bit data.
2168 .lp
2169 LAYOUT
2170 .lp
2171 A general \*(lqmemo\*(rq framework is used.
2172 A message consists of a
2173 block of information in a rigid format, followed by general
2174 text with no specified format.
2175 The rigidly formatted first
2176 part of a message is called the header, and the free-format
2177 portion is called the body.
2178 The header must always
2179 exist, but the body is optional.
2180 .lp
2181 THE HEADER
2182 .lp
2183 Each header item can be viewed as a single logical line of ASCII
2184 characters.
2185 If the text of a header item extends across several
2186 real lines, the continuation lines are indicated by leading
2187 spaces or tabs.
2188 .lp
2189 Each header item is called a component and is composed of a
2190 keyword or name, along with associated text.
2191 The keyword begins at the
2192 left margin, may contain spaces or tabs, may not exceed 63
2193 characters, and is terminated by a colon (:).
2194 Certain
2195 components (as identified by their keywords) must follow rigidly
2196 defined formats in their text portions.
2197 .lp
2198 The text for most formatted components (e.g., \*(lqDate:\*(rq and \*(lqMessage-Id:\*(rq)
2199 is produced automatically.
2200 The only ones entered by the
2201 user are address fields such as \*(lqTo:\*(rq, \*(lqcc:\*(rq, etc.
2202 ARPA addresses
2203 are assigned mailbox names and host computer specifications.
2204 The
2205 rough format is \*(lqmailbox at host\*(rq, such as \*(lqBorden at Rand-Unix\*(rq.
2206 Multiple addresses are separated by commas.
2207 A missing host is
2208 assumed to be the local host.
2209 .ne 10
2210 .lp
2211 THE BODY
2212 .lp
2213 A blank line signals that all following text up to the end of the file
2214 is the body.
2215 (A blank line is defined as a pair of
2216 <end-of-line> characters with \fIno\fR characters in between.)
2217 No formatting is expected or enforced within the body.
2218 .lp
2219 Within MH, a line consisting of dashes is accepted
2220 as the header delimiter.
2221 This is a cosmetic feature applying
2222 only to locally composed mail.
2223 .+c "MESSAGE NAME BNF"
2224
2225 .ta 1.2i 1.8i 3.2i
2226 .nf
2227 .in 1i
2228 ^msgs~^^:=~^^msgspec~^|
2229 ^^^^msgs msgspec
2230
2231 ^msgspec~^^:=~^^msg~^|
2232 ^^^^^msg-range~^|
2233 ^^^^msg-sequence
2234
2235 ^msg~^^:=~^^msg-name~^|
2236 ^^^^<number>^
2237
2238 ^msg-name~^^:=~^^\*(lqfirst\*(rq~^|
2239 ^^^^^\*(lqlast\*(rq~^|
2240 ^^^^^\*(lqcur\*(rq~^|
2241 ^^^^^\*(lq\*.\*(rq~^|
2242 ^^^^^\*(lqnext\*(rq~^|
2243 ^^^^\*(lqprev\*(rq
2244
2245 ^msg-range~^^:=~^^msg\*(lq-\*(rqmsg~^|
2246 ^^^^^\*(lqall\*(rq
2247
2248 ^msg-sequence~^^:=~^msg\*(lq:\*(rqsigned-number
2249
2250 ^signed-number~^^:=~^^\*(lq+\*(rq<number>~^|
2251 ^^^^^\*(lq\--\*(rq<number>~^|
2252 ^^^^<number>
2253 .re \" Reset Tabs
2254 .fi
2255 .sp
2256 .pp
2257 Where <number> is a decimal number in the range 1 to 999.
2258 .pp
2259 Msg-range specifies all of the messages in the given range
2260 and must not be empty.
2261 .pp
2262 Msg-sequence specifies up to <number> of messages, beginning
2263 with \*(lqmsg\*(rq (in the case of first, cur, next, or <number>),
2264 or ending with \*(lqmsg\*(rq (in the case of prev or last).
2265 +<number> forces \*(lqstarting with msg\*(rq, and \-<number> forces
2266 \*(lqending with number\*(rq.
2267 In all cases, \*(lqmsg\*(rq must exist.
2268
2269 .+c "EXAMPLES OF SHELL COMMANDS"
2270 .pp
2271 UNIX commands may be mixed with MH commands to obtain additional
2272 functions.
2273 These may be prepared as files (known as
2274 shell command files or
2275 shell scripts).
2276 The following two examples are useful functions that
2277 illustrate the possibilities.
2278 Other functions, such as copying,
2279 deleting, renaming, etc., can be achieved in a similar fashion.
2280
2281 HARDCOPY
2282 .pp
2283 The command:
2284
2285 .ti +.5i
2286 (scan\0\-ff\0\-header;\0show\0all\0\-pr\0\-f)\0|\0print
2287
2288 produces a scan listing of the current folder, followed by a
2289 form feed, followed by a formatted listing of all messages
2290 in the folder, one per page.
2291 Omitting \*(lq\-pr\0\-f\*(rq will cause the
2292 messages to be concatenated, separated by a one-line header
2293 and two blank lines.
2294 .pp
2295 You can create variations on this theme, using \fIpick\fR.
2296
2297
2298 RENUMBERING
2299 .pp
2300 To compact the message numbers within the folder called inbox,
2301 use the commands:
2302
2303 .in 5
2304 .nf
2305 .ta 3i
2306 ^file\0\-src\0+inbox\0all\0+temp~^/* file and renumber */
2307 ^file\0all\0\-src\0+temp\0+inbox~^/* move 'em back */
2308 ^rmf\0+temp~^/* remove \*(lqtemp\*(rq */
2309 ^folder\0+inbox~^/* reset \*(lqcurrent\*(rq folder */
2310 .re
2311 .fi
2312 .in 0
2313 .+c REFERENCES
2314 .in .4i
2315 .ti 0
2316 1. Crocker, D. H., J. J. Vittal, K. T. Pogran, and D. A. Henderson, Jr.,
2317 \*(lqStandard for the Format of ARPA Network Test Messages,\*(rq \fIArpanet Request
2318 for Comments\fR, No. 733, Network Information Center 41952, Augmentation
2319 Research Center, Stanford Research Institute,
2320 November 1977.
2321
2322 .ti 0
2323 2. Thompson, K., and D. M. Ritchie, \*(lqThe UNIX Time-sharing System,\*(rq
2324 \fICommunications of the ACM\fR, Vol. 17, July 1974, pp. 365-375.
2325
2326 .ti 0
2327 3. McCauley, E. J., and P. J. Drongowski, \*(lqKSOS\-The Design of a Secure
2328 Operating System,\*(rq \fIAFIPS Conference Proceedings\fR,
2329 National Computer Conference,
2330 Vol. 48, 1979, pp. 345-353.
2331
2332 .ti 0
2333 4. Crocker, David H., \fIFramework and Functions of the \*(lqMS\*(rq Personal
2334 Message System\fR, The Rand Corporation, R-2134-ARPA, December 1977.
2335
2336 .ti 0
2337 5. Thompson, K., and D. M. Ritchie, \fIUNIX Programmer's Manual\fR, 6th ed.,
2338 Western Electric Company, May 1975 (available only to UNIX licensees).
2339
2340 .ti 0
2341 6. Bilofsky, Walter, \fIThe CRT Text Editor NED\-Introduction and
2342 Reference Manual\fR, The Rand Corporation, R-2176-ARPA, December 1977.
2343 .de $c
2344 .ce
2345 .b "\\s12\\$1\\s0" \" 12 Point Bold Header
2346 .(x y
2347
2348 \\$1
2349 .)x
2350 .sp 3
2351 ..
2352 .hx
2353 .tp
2354 .nf
2355 .sp 15
2356 .ps 18
2357 .vs 24
2358 .ft B
2359 .ce 2
2360 THE MH MESSAGE HANDLING SYSTEM:
2361 USER'S MANUAL
2362 .ps
2363 .vs
2364 .ft
2365 .sp .75i
2366 .ps 12
2367 .ft B
2368 .ce
2369 PREPARED FOR THE AIR FORCE
2370 .ps
2371 .ft
2372 .sp 1i
2373 .ps 14
2374 .vs 17
2375 .ft B
2376 .ce 3
2377 BRUCE S. BORDEN
2378 R. STOCKTON GAINES
2379 NORMAN Z. SHAPIRO
2380 .ps
2381 .ft
2382 .vs
2383 .sp |-3.5i
2384 .ps 16
2385 .vs 20
2386 .ft B
2387 .ce 2
2388 R-2367-PAF
2389 OCTOBER 1979
2390 .ps
2391 .ft
2392 .vs
2393 .pn 3
2394 .af % i
2395 .+c PREFACE
2396 .pp
2397 This report describes a system for dealing with messages transmitted on a
2398 computer. Such messages might originate with other users of the same
2399 computer or might come from an outside source through a network to which the user's
2400 computer is connected. Such computer-based message systems are
2401 becoming increasingly widely used, both within and outside the Department
2402 of Defense.
2403 .pp
2404 The message handling system MH was developed for two reasons.
2405 One was to investigate some
2406 research ideas concerning how a message system might take advantage of
2407 the architecture of the UNIX time-sharing operating system for
2408 Digital Equipment Corporation PDP-11 and VAX computers, and the special
2409 features of UNIX's command-level interface with the user (the
2410 \*(lqshell\*(rq). The other reason was to provide a better and more
2411 adaptable base than that of conventional designs
2412 on which to build a command and control message system.
2413 The effort has succeeded in both
2414 regards, although this report mainly describes the message system itself
2415 and how it fits in with UNIX. The main research results are being
2416 described and analyzed in a forthcoming Rand report.
2417 The system is currently being used as part
2418 of a tactical command and control \*(lqlaboratory,\*(rq which is also being described
2419 in a separate report.
2420 .pp
2421 The present report should be of interest to three groups of readers. First,
2422 it is a complete reference manual for the users of MH (although
2423 users outside of Rand must take into
2424 account differences from the local Rand environment). Second, it should be
2425 of interest to those who have a general knowledge of computer-based
2426 message systems, both in civilian and military environments. Finally,
2427 it should be of interest to those who build large subsystems that
2428 interface with users, since it illustrates a new approach to such
2429 interfaces.
2430 .pp
2431 This report was prepared as part of the Rand project entitled \*(lqData
2432 Automation Research\*(rq, sponsored by Project AIR FORCE.
2433 .+c SUMMARY
2434 .pp
2435 Electronic communication of text messages is becoming
2436 commonplace. Computer-based message systems\-software
2437 packages that provide tools for dealing with messages\-are used in many
2438 contexts. In particular, message systems are becoming
2439 increasingly important in command and control and intelligence
2440 applications.
2441 .pp
2442 This report describes a message handling system called MH.
2443 This system provides the user
2444 with tools to compose, send, receive, store, retrieve, forward, and
2445 reply to messages. MH has been built on the UNIX time-sharing system,
2446 a popular operating system developed for the DEC PDP-11 and VAX classes of
2447 computers.
2448 .pp
2449 A complete description of MH is given for users of
2450 the system. For those who do not intend to use the system, this description
2451 gives a general idea of what a message system is like. The system involves
2452 some new ideas about how large subsystems can be constructed. These design
2453 concepts and a comparison of MH with other message systems
2454 will be published in a forthcoming Rand report.
2455 .pp
2456 The interesting and unusual features of MH include the
2457 following: The user command interface to MH is the UNIX \*(lqshell\*(rq
2458 (the standard UNIX command interpreter). Each separable
2459 component of message handling, such as message composition or
2460 message display, is a separate command. Each program is driven from
2461 and updates a private user environment, which is stored as a file
2462 between program invocations. This private environment also contains
2463 information to \*(lqcustom tailor\*(rq MH to the individual's tastes. MH
2464 stores each message as a separate file under UNIX, and it utilizes the
2465 tree-structured UNIX file system to organize groups of files within
2466 separate directories or \*(lqfolders.\*(rq All of the UNIX facilities
2467 for dealing with files and directories, such as
2468 renaming, copying, deleting, cataloging, off-line printing, etc., are
2469 applicable to messages and directories of messages (folders). Thus,
2470 important capabilities needed in a message system are available in MH without
2471 the need (often seen in other message systems) for code that
2472 duplicates the facilities of the supporting operating system.
2473 It also allows users familiar with the shell to use MH with minimal
2474 effort.
2475 .de $c
2476 .ce
2477 .b "\\s12\\$1\\s0" \" 12 Point Bold Header
2478 .sp 3
2479 ..
2480 .pn 1
2481 .af % i
2482 .