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