Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / doc / MH.me
1 .\"     This file is automatically generated.  Do not edit!
2 .\" @(#)$Id: MH.rf,v 1.30 1995/12/06 01:27:51 jromine Exp $
3 .po +.75i
4 .de $c                          \" Major Heading printer
5 .ce
6 .b "\\s12\\n+(ch.\\ \\$1\\s0"   \" 12 Point Bold Header
7 .(x
8
9 \ \ \ \\n(ch.\\ \\ \\$1
10 .)x
11 .sp 45p         \" 45 point space or about 1/2 inch
12 ..
13 \".nr xs .15v     \" Put index entries closer together
14 .(x
15
16 Section
17 .)x _
18 .de $0          \" Sub-Heading macro called AFTER printing the heading
19 .(x
20 .sp .3v
21 .ti .5i
22 \\$1
23 .)x
24 ..
25 .de $s          \" Macro to print footnote separator
26 \"\l'2i'        \" No line drawn
27 .if n \
28 .       sp 1.3  \" But extra space to make up for it.
29 ..
30 .fc ^ ~         \" The characters ^ and ~ CANNOT BE USED
31 \"                 throughout this document except as field
32 \"                 delimiter & pad indicator!
33 .he ''-%-''
34 .ll 32P         \" 32 Picas or about 5+1/3 inch Line Length
35 .if n .ll 72m   \" Use 72 ems for nroff
36 .nr ss 30p      \" 30 point space before section titles
37 .nr fm 5v       \" RAND likes bigger than normal [3v] bottom margins
38 .nr bm 7v       \"   ditto
39 .ds . \\fB.\\fP\\h'-(1m/3)' \" Bold period to stand out.
40 .ds << <\\h!-(\\w'<'/2)!<
41 .ds >> >\\h!-(\\w'>'/2)!>
42 .ds ** \v'-3p'\s+1*\s0\v'+3p'
43 .so version.rf
44 .tp
45 .(l C
46 \fIdiscard this page\fR
47 .sp 4
48 The RAND \fIMH\fR
49 Message Handling System:
50 User's Manual
51 .sp
52 UCI Version
53 .sp 2
54 \*(td
55 \*(MH
56 .)l
57 .++ C
58 .+c INTRODUCTION
59 .pp
60 Although people can travel cross-country in hours and can
61 reach others by telephone in seconds, communications still depend
62 heavily upon paper, most of which is distributed through the mails.
63 .pp
64 There are several major reasons for this continued dependence on
65 written documents.
66 First, a written document may be proofread
67 and corrected prior to its distribution, giving the author
68 complete control over his words.
69 Thus, a written document is
70 better than a telephone conversation in this respect.
71 Second,
72 a carefully written document is far less likely to be
73 misinterpreted or poorly translated than a phone conversation.
74 Third, a signature offers reasonable verification of authorship,
75 which cannot be provided with media such as telegrams.
76 .pp
77 However, the need for
78 .u fast ,
79 accurate, and reproducible document distribution is
80 obvious.
81 One solution in widespread use is the telefax.
82 Another
83 that is rapidly gaining popularity is electronic mail.
84 Electronic mail is similar to telefax in that the data to be sent
85 are digitized, transmitted via phone lines, and
86 turned back into a document at the receiver.
87 The advantage of
88 electronic mail is in its compression factor.
89 Whereas a telefax
90 must scan a page in very fine lines and send all of the black and
91 white information, electronic mail assigns characters fixed
92 codes which can be transmitted as a few bits of information.
93 Telefax presently has the advantage of being able to transmit an
94 arbitrary page, including pictures, but electronic mail is
95 beginning to deal with this problem.
96 Electronic mail also integrates well
97 with current directions in office automation, allowing documents
98 prepared with sophisticated equipment at one site to be quickly
99 transferred and printed at another site.
100 .pp
101 Currently, most electronic mail is intraorganizational,
102 with mail transfer remaining within one computer.
103 As computer
104 networking becomes more common, however, it is becoming more feasible to
105 communicate with anyone whose computer can be linked to your
106 own via a network.
107 .pp
108 The pioneering efforts on general-purpose electronic mail
109 were by organizations using the DoD ARPAnet[1].
110 The capability to send messages between computers existed before
111 the ARPAnet was developed, but it was used only in limited ways.
112 With the advent of the
113 ARPAnet, tools began to be developed which made it convenient for
114 individuals or organizations to distribute messages
115 over broad geographic areas, using
116 diverse computer facilities.
117 The interest and activity in
118 message systems has now reached such proportions that steps
119 have been taken within the DoD to coordinate and
120 unify the development of military message systems.
121 The use of electronic mail is expected to increase
122 dramatically in the next few years.
123 The utility of such systems
124 in the command and control and intelligence environments is
125 clear, and applications in these areas will probably lead the
126 way.
127 As the costs for sending and handling electronic messages
128 continue their rapid decrease, such uses can be
129 expected to spread rapidly into other areas and, of course, will
130 not be limited to the DoD.
131 .pp
132 A message system provides tools that help users (individuals
133 or organizations) deal with messages in various ways.
134 Messages
135 must be composed, sent, received, stored, retrieved,
136 forwarded, and replied to.
137 Today's best interactive computer
138 systems provide a variety of word-processing and information
139 handling capabilities.
140 The message handling facilities should be
141 well integrated with the rest of the system, so as to be a
142 graceful extension of overall system capability.
143 .pp
144 The message system described in this report, \fIMH\fR, provides most of the
145 features that can be found in other message systems and also
146 incorporates some new ones.
147 It has been built on the UNIX time-sharing
148 system[2], a popular operating system for the DEC PDP-11\**
149 and VAX-11 classes of computers.
150 .(f
151 \** PDP and VAX are trademarks of Digital Equipment Corporation.
152 .)f
153 A \*(lqsecure\*(rq operating
154 system similar to UNIX is currently being developed[3],
155 and that system will also run \fIMH\fR.
156 .pp
157 This report provides a complete description of \fIMH\fR and
158 thus may serve as a user's manual, although parts of the report
159 will be of interest to non-users as well.
160 Sections 2 and 3, the
161 Overview and Tutorial, present the key
162 ideas of \fIMH\fR and will give those not familiar with message systems
163 an idea of what such systems are like.
164 .pp
165 \fIMH\fR consists of a set of commands which use some special
166 files and conventions.
167 The final section is divided into three parts.
168 The first part covers the information
169 a user needs to know in addition to the
170 commands.
171 Then, each of the \fIMH\fR commands is described in detail.
172 Finally, other obscure details are revealed.
173 A summary of the commands is given in Appendix A,
174 and the syntax of message sequences is given in Appendix B.
175 .pp
176 A novel approach has been taken in the design of \fIMH\fR.
177 Instead of creating a large subsystem that appears as a single
178 command to the user (such as MS[4]),
179 \fIMH\fR is a collection of separate commands
180 which are run as separate programs.
181 The file and directory
182 system of UNIX are used directly.
183 Messages are stored as
184 individual files (datasets), and collections of them are grouped
185 into directories.
186 In contrast, most other message systems store
187 messages in a complicated data structure within a monolithic
188 file.
189 With the \fIMH\fR approach, UNIX commands can be
190 interleaved with commands invoking the functions of the message
191 handler.
192 Conversely, existing UNIX commands
193 can be used in connection with messages.
194 For
195 example, all the usual UNIX editing, text-formatting, and printing
196 facilities can be applied directly to individual messages.
197 MH,
198 therefore, consists of a relatively small amount of new code; it
199 makes extensive use of other UNIX software to provide the
200 capabilities found in other message systems.
201 .+c OVERVIEW
202 .pp
203 There are three main aspects of \fIMH\fR\0:  the  way  messages  are
204 stored (the message database), the user's profile (which directs
205 how certain actions of the message handler take place), and the
206 commands for dealing with messages.
207 .pp
208 Under \fIMH\fR, each message is stored as a separate file.
209 A user
210 can take any action with a message that he could with an ordinary
211 file in UNIX.
212 A UNIX directory in which messages are stored is
213 called a folder.
214 Each folder contains some standard entries to support
215 the message-handling functions.
216 The messages in a folder have numerical
217 names.
218 These folders (directories)
219 are entries in a particular directory path, described in
220 the user profile, through which \fIMH\fR can find message folders.
221 Using the UNIX \*(lqlink\*(rq facility, it is possible for one copy of a
222 message to be \*(lqfiled\*(rq in more than one folder, providing a
223 message index facility.
224 Also, using the UNIX tree-structured
225 file system, it is possible to have a folder within a folder,
226 nested arbitrarily deep,
227 and have the full power of the \fIMH\fR commands available.
228 .pp
229 Each user of \fIMH\fR has a user profile, a file in
230 his \fB$HOME\fR (initial login) directory called \fI\&.mh\(ruprofile\fR.
231 This profile contains several
232 pieces of information used by the \fIMH\fR commands:
233 a path name to the directory that contains the message folders
234 and parameters that tailor \fIMH\fR commands
235 to the individual user's requirements.
236 There is also another file,
237 called the user context,
238 which contains information concerning which folder the user last referenced
239 (the \*(lqcurrent\*(rq folder).
240 It also contains
241 most of the necessary state information concerning how
242 the user is dealing with his messages, enabling \fIMH\fR to be
243 implemented as a set of individual UNIX commands, in contrast to the
244 usual approach of a monolithic subsystem.
245 .pp
246 In \fIMH\fR, incoming mail is appended
247 to the end of a file in a system spooling area for the user.
248 This area is called the mail drop directory,
249 and the file is called the user's mail drop.
250 Normally when the user logins in,
251 s/he is informed of new mail
252 (or the \fIMH\fR program \fImsgchk\fR may be run).
253 The user adds the new messages to his/her collection of \fIMH\fR messages
254 by invoking the command
255 \fIinc\fR.
256 The \fIinc\fR (incorporate) command adds the new
257 messages to a folder called \*(lqinbox\*(rq, assigning them names which
258 are consecutive integers starting with the next highest integer
259 available in inbox.
260 \fIinc\fR also produces a
261 \fIscan\fR summary of
262 the messages thus incorporated.
263 A folder can be compacted into a single file,
264 for easy storage,
265 by using the \fIpackf\fR command.
266 Also,
267 messages within a folder can be sorted by date and time with the \fIsortm\fR
268 command.
269
270 .pp
271 There are four commands for examining the messages in a
272 folder:
273 \fIshow\fR,
274 \fIprev\fR,
275 \fInext\fR,
276 and
277 \fIscan\fR.
278 The \fIshow\fR command displays a message in a folder,
279 \fIprev\fR displays the message preceding the current message, and
280 \fInext\fR displays the message following the current message.
281 \fIMH\fR lets the user choose the program that displays individual messages.
282 A special program, \fImhl\fR, can be used to display messages according
283 to the user's preferences.
284 The \fIscan\fR command summarizes the messages in a folder,
285 normally producing one line per message, showing who the message is from,
286 the date, the subject, etc.
287 .pp
288 The user may move a message from one folder to another with
289 the command
290 \fIrefile\fR.
291 Messages may be removed from a folder
292 by means of the command
293 \fIrmm\fR.
294 In addition, a user may query
295 what the current folder is and may specify that a new folder
296 become the current folder, through the command
297 \fIfolder\fR.
298 All folders may be summarized with the \fIfolders\fR command.
299 A message folder (or subfolder) may be removed by means of
300 the command
301 \fIrmf\fR.
302 .pp
303 A set of messages based on content may be selected by
304 use of the command \fIpick\fR.
305 This command searches through
306 messages in a folder and selects those that match a given
307 set of criteria.
308 These messages are then bound to a \*(lqsequence\*(rq name for use with other
309 \fIMH\fR commands.
310 The \fImark\fR command manipulates these sequences.
311 .pp
312 There are five commands enabling the user to create new
313 messages and send them:
314 \fIcomp\fR,
315 \fIdist\fR,
316 \fIforw\fR,
317 \fIrepl\fR,
318 and
319 \fIsend\fR.
320 The \fIcomp\fR command
321 provides the facility for the user to compose a
322 new message;
323 \fIdist\fR redistributes mail to additional addressees;
324 \fIforw\fR enables the user to forward messages; and
325 \fIrepl\fR facilitates the generation of a reply to an incoming message.
326 The last three commands may optionally annotate the original message.
327 Messages may be arbitrarily annotated with the \fIanno\fR command.
328 Once a draft has been constructed by one of the four above composition
329 programs,
330 a user\-specifiable program is run to query the user as to the disposition of
331 the draft prior to sending.
332 \fIMH\fR provides the simple \fIwhatnow\fR program to start users off.
333 If
334 a message is not sent directly by one of these commands, it may
335 be sent at a later time using the command
336 \fIsend\fR.
337 \fIMH\fR allows the use of any UNIX editor when composing a message.
338 For rapid entry, a special editor, \fIprompter\fR, is provided.
339 For programs, a special mail-sending program, \fImhmail\fR, is provided.
340 .pp
341 \fIMH\fR supports a personal aliasing facility which gives users the
342 capability to considerably shorten address typein
343 and use meaningful names for addresses.
344 The \fIali\fR program can be used to query \fIMH\fR as to the expansion of a
345 list of aliases.
346 After composing a message, but prior to sending, the \fIwhom\fR command
347 can be used to determine exactly who a message would go to.
348 .pp
349 \fIMH\fR provides a natural interface for telling the user's shell the names
350 of \fIMH\fR messages and folders.
351 The \fImhpath\fR program achieves this capability.
352 .pp
353 The \fIburst\fR command can be used to \*(lqshred\*(rq digests of messages
354 into individual messages.
355 .pp
356 All of the elements summarized above
357 are described in more detail in the following sections.
358 Many of the
359 normal facilities of UNIX provide additional capabilities for
360 dealing with messages in various ways.
361 For example, it is
362 possible to print messages
363 on the line-printer without requiring any additional code within
364 \fIMH\fR\0.
365 Using standard UNIX facilities, any terminal output can be
366 redirected to a file for repeated or future viewing.
367 In general,
368 the flexibility and capabilities of the UNIX interface with the
369 user are preserved as a result of the integration of \fIMH\fR into the UNIX
370 structure.
371 .+c TUTORIAL
372 .pp
373 This tutorial provides a brief introduction to the \fIMH\fR commands.
374 It should be sufficient
375 to allow the user to read his mail, do some simple manipulations of
376 it, and create and send messages.
377 .pp
378 A message has two major pieces:  the
379 header and the body.
380 The body consists of the text of the message
381 (whatever you care to type in).
382 It follows the header and is separated from
383 it by an empty line.
384 (When you compose a message, the form that appears
385 on your terminal shows a line of dashes after the header.
386 This is for
387 convenience and is replaced by an empty line when the message is
388 sent.)  The header is composed of several components, including the
389 subject of the message and the person to whom it is addressed.
390 Each component starts with a name
391 and a colon; components must not start with a blank.
392 The text of the
393 component may take more than one line, but each continuation line must
394 start with a blank.
395 Messages typically have \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
396 \*(lqSubject:\*(rq components.
397 When composing a message, you should include
398 the \*(lqTo:\*(rq and \*(lqSubject:\*(rq components;
399 the \*(lqcc:\*(rq (for people you want to send copies to) is not necessary.
400 .pp
401 The basic \fIMH\fR commands are
402 \fIinc\fR,
403 \fIscan\fR,
404 \fIshow\fR,
405 \fInext\fR,
406 \fIprev\fR,
407 \fIrmm\fR,
408 \fIcomp\fR,
409 and
410 \fIrepl\fR.
411 These are described below.
412
413 \fIinc\fR
414 .pp
415 When you get the message \*(lqYou have mail\*(rq, type the command \fIinc\fR.
416 You will get a \*(lqscan listing\*(rq such as:
417
418 .nf
419 .in +.5i
420 .ta \w'7+  'u +\w'11/26  'u +\w'To:norm  'u
421 7+      \07/13  Cas     revival of measurement work
422 8       10/\09  Norm    NBS people and publications
423 9       11/26   To:norm question \*(<<Are there any functions
424 .re
425 .in -.5i
426 .fi
427 .pp
428 This shows the messages you received since the last time you
429 executed this command (\fIinc\fR adds these new messages to your inbox folder).
430 You can see this list again, plus a list of any
431 other messages you have, by using the
432 \fIscan\fR command.
433
434 \fIscan\fR
435 .pp
436 The scan listing shows the message number, followed by the
437 date and the sender.
438 (If you are the sender, the addressee in the \*(lqTo:\*(rq
439 component is displayed.
440 You may send yourself a message by including
441 your name among the \*(lqTo:\*(rq or \*(lqcc:\*(rq addressees.)
442 It also shows the message's subject; if
443 the subject is short, the first part of the body of the message is
444 included after the characters \*(<<.
445
446 .ne 5
447 \fIshow\fR
448 .pp
449 This command shows the current message, that is,
450 the first one of the new messages after an
451 \fIinc\fR.
452 If the message is not
453 specified by name (number), it is
454 generally the last message referred to by an \fIMH\fR command.
455 For example,
456
457
458 .ta \w'\fIshow\fR\0|\0\fIlpr\fR  'u
459 .ti .5i
460 ^\fIshow\fP\05~^will show message 5.
461 .re
462
463 .pp
464 You can use the show command to copy a message or print a
465 message.
466
467 .(b L
468 .in .5i
469 .ta \w'\fIshow\fR\0|\0\fIlpr\fR  'u
470 ^\fIshow\fR\0>\0\fIx\fR~^will copy the message to file x.
471 .br
472 ^\fIshow\fR\0|\0\fIlpr\fR~^will print the message, using the \fIlpr\fR command.
473 .br
474 ^\fInext\fR~^will show the message that follows the current message.
475 .br
476 ^\fIprev\fR~^will show the message previous to the current message.
477 .br
478 ^\fIrmm\fR~^will remove the current message.
479 .br
480 ^\fIrmm\03\fR~^will remove message 3.
481 .)b
482
483 .ne 5
484 \fIcomp\fR
485 .pp
486 The
487 \fIcomp\fR command puts you in the editor to write or edit a message.
488 Fill in or
489 delete the \*(lqTo:\*(rq, \*(lqcc:\*(rq, and \*(lqSubject:\*(rq fields,
490 as appropriate, and type the body of the message.
491 Then
492 exit normally from the editor.
493 You will be asked
494 \*(lqWhat now?\*(rq.
495 Type a carriage return to see the options.
496 Typing \fBsend\fR
497 will cause the message to be sent; typing \fBquit\fR will cause an exit
498 from
499 \fIcomp\fR,
500 with the message draft saved.
501 .pp
502 If you quit without sending the message, it will be saved in a file
503 called <name>/Mail/draft (where <name> is your \fB$HOME\fR directory).
504 You can resume editing the message later with \*(lqcomp\0\-use\*(rq;
505 or you can send the message later, using the \fIsend\fR command.
506
507 .ne 4
508 \fIcomp\0\-editor\0prompter\fR
509 .pp
510 This command uses a different editor and is useful for preparing
511 \*(lqquick and dirty\*(rq messages.
512 It prompts you for each component of the
513 header.
514 Type the information for that component, or type a carriage
515 return to omit the component.
516 After that, type the body of the
517 message.
518 Backspacing is the only form of editing allowed with this editor.
519 When the body is complete, type a carriage return followed by <EOT>
520 (usually <CTRL-D>).
521 This completes the initial preparation of the message; from then on, use
522 the same procedures as with
523 \fIcomp\fR (above).
524
525 .ne 5
526 \fIrepl\fR
527 .br
528 \fIrepl\fR\0n 
529 .pp
530 This command makes up an initial message form with a header
531 that is appropriate for
532 replying to an existing message.
533 The message being answered is the
534 current message if no message number is mentioned, or n if a number
535 is specified.
536 After the header is completed, you can finish the message as in
537 \fIcomp\fR (above).
538 .pp
539 This is enough information to get you going using \fIMH\fR.
540 There are more commands,
541 and the commands described here have more features.
542 Subsequent sections
543 explain \fIMH\fR in complete detail.
544 The system is quite powerful if you
545 want to use its sophisticated features, but the foregoing commands
546 suffice for sending and receiving messages.
547 .pp
548 There are numerous additional capabilities you may wish to explore.
549 For example, the
550 \fIpick\fR command will select a subset of messages
551 based on specified criteria such as sender and/or subject.
552 Groups of
553 messages may be designated, as described in Sec. IV,
554 under \fBMessage Naming\fR.
555 The file \fI\&.mh\(ruprofile\fR can be used to tailor your use of
556 the message system to your needs and preferences, as described in Sec. IV,
557 under \fBThe User Profile\fR.
558 In general, you may
559 learn additional features of the system selectively, according to your
560 requirements,
561 by studying the relevant sections of this manual.
562 There is no need to
563 learn all the details of the system at once.
564 .+c "DETAILED DESCRIPTION"
565 .pp
566 This section describes the \fIMH\fR system in detail, including the components
567 of the user profile, the conventions for message naming, and some of
568 the other \fIMH\fR conventions.
569 Readers who are
570 generally familiar with computer systems will be able to follow
571 the principal ideas, although some details may be meaningful only to
572 those familiar with UNIX.
573 .uh "THE USER PROFILE"
574 .pp
575 The first time an \fIMH\fR command is issued by a new user, the system
576 prompts for a \*(lqPath\*(rq and creates an \fIMH\fR \*(lqprofile\*(rq.
577 .pp
578 Each \fIMH\fR user has a profile which contains tailoring
579 information for each individual program.
580 Other profile entries control the \fIMH\fR path (where folders and
581 special files are kept), folder and message protections, editor
582 selection, and default arguments for each \fIMH\fR program.
583 Each user of \fIMH\fR also has a context file which contains
584 current state information for the \fIMH\fR package
585 (the location of the context file is kept in the user's \fIMH\fR directory,
586 or may be named in the user profile).
587 When a folder becomes
588 the current folder, it is recorded in the user's context.
589 (Other state information is kept in the context file,
590 see the manual entry for \fImh\-profile\0\fR(5) for more details.)
591 In general,
592 the term \*(lqprofile entry\*(rq refer to entries in either the profile or
593 context file.
594 Users of \fIMH\fR needn't worry about the distinction,
595 \fIMH\fR handles these things automatically.
596 .pp
597 The \fIMH\fR profile is stored in the file \fI\&.mh\(ruprofile\fR in the
598 user's \fB$HOME\fR directory\**.
599 .(f
600 \** By defining the envariable \fB$MH\fR,
601 you can specify an alternate profile to be used by \fIMH\fR commands.
602 .)f
603 It has the format of a message without
604 any body.
605 That is, each profile entry is on one line, with a
606 keyword followed by a colon (:) followed by text particular to
607 the keyword.
608 .br
609 \(rh\ \ \&
610 \fIThis file must not have blank lines.\fR
611 .br
612 The keywords
613 may have any combination of upper and lower case.
614 (See the information of \fImh\-mail\fR later on in this manual
615 for a description of message formats.)
616 .pp
617 For the average \fIMH\fR user, the only profile entry of
618 importance is \*(lqPath\*(rq.
619 Path specifies a directory in which \fIMH\fR
620 folders and certain files such as \*(lqdraft\*(rq are found.
621 The
622 argument to this keyword must be a legal UNIX path that names an
623 existing directory.
624 If this path is not absolute
625 (i.e., does not begin with a \fB/\fR\0),
626 it will be presumed to start from the user's \fB$HOME\fR directory.
627 All folder and message references within
628 \fIMH\fR will relate to this path unless full path names are used.
629 .pp
630 Message protection defaults to 644, and folder protection to
631 711.
632 These may be changed by profile entries \*(lqMsg-Protect\*(rq
633 and \*(lqFolder-Protect\*(rq, respectively.
634 The argument to these
635 keywords is an octal number which is used as the UNIX file mode\**.
636 .(f
637 \** See \fIchmod\fR\0(1) in the \fIUNIX Programmer's Manual\fR\0[5].
638 .)f
639 .pp
640 When an \fIMH\fR program starts running, it looks through the
641 user's profile for an entry with a keyword matching the program's
642 name.
643 For example, when
644 \fIcomp\fR is run, it looks for a \*(lqcomp\*(rq
645 profile entry.
646 If one is found, the text of the profile entry is
647 used as the default switch setting until all defaults are overridden
648 by explicit switches passed to the program as arguments.
649 Thus the profile
650 entry \*(lqcomp:\0\-form\0standard.list\*(rq would direct
651 \fIcomp\fR to use the
652 file \*(lqstandard.list\*(rq as the message skeleton.
653 If an explicit
654 form switch is given to the
655 \fIcomp\fR command, it will override the
656 switch obtained from the profile.
657 .pp
658 In UNIX, a program may exist under several names,
659 either by linking or aliasing.
660 The actual invocation name is used by an \fIMH\fR
661 program when scanning for its profile defaults\**.
662 .(f
663 \** Unfortunately,
664 the shell does not preserve aliasing information when calling a program,
665 hence if a program is invoked by an alias different than its name,
666 the program will examine the profile entry for it's name,
667 not the alias that the user invoked it as.
668 The correct solution is to create a (soft) link in your \fI$HOME/bin\fR
669 directory to the \fIMH\fR program of your choice.
670 By giving this link a different name,
671 you can use an alternate set of defaults for the command.
672 .)f
673 Thus, each \fIMH\fR program
674 may have several names by which it can be invoked, and each name
675 may have a different set of default switches.
676 For example, if
677 \fIcomp\fR is invoked by the name
678 \fIicomp\fR,
679 the profile entry
680 \*(lqicomp\*(rq will control the default switches for this invocation of
681 the
682 \fIcomp\fR program.
683 This provides a powerful
684 definitional facility for commonly used switch settings.
685 .pp
686 The default editor
687 for editing within
688 \fIcomp\fR,
689 \fIrepl\fR,
690 \fIforw\fR,
691 and
692 \fIdist\fR,
693 is usually \fIprompter\fR,
694 but might be something else at your site,
695 such as \fI/usr/ucb/ex\fR or \fI/bin/e\fR.
696 A different editor may be used by specifying
697 the profile entry
698 \*(lqEditor: \*(rq.
699 The argument to \*(lqEditor\*(rq is the name of an
700 executable program or shell command file which can be found via
701 the user's $PATH defined search path, excluding the current
702 directory.
703 The \*(lqEditor:\*(rq profile specification
704 may in turn be overridden by a `\-editor\0<editor>'
705 profile switch associated with
706 \fIcomp\fR,
707 \fIrepl\fR,
708 \fIforw\fR,
709 or
710 \fIdist\fR.
711 Finally, an explicit editor switch specified with any
712 of these four commands will have ultimate precedence.
713 .pp
714 During message composition, more than one editor may be
715 used.
716 For example, one editor (such as \fIprompter\fR\0)
717 may be used
718 initially, and a second editor may be invoked later to revise
719 the message being composed
720 (see the discussion of
721 \fIcomp\fR in Section 5 for details).
722 A profile entry \*(lq<lasteditor>\-next:\0<editor>\*(rq specifies the name of
723 the editor to be used after a particular editor.
724 Thus \*(lqcomp:\0\-e\0prompter\*(rq
725 causes the initial text to be collected by
726 \fIprompter\fR,
727 and the profile entry \*(lqprompter\-next:\0ed\*(rq names ed as the
728 editor to be invoked for the next round of editing.
729 .pp
730 Some of the \fIMH\fR commands, such as
731 \fIshow\fR,
732 can be used on
733 message folders owned by others, if those folders are readable.
734 However,
735 you cannot write in someone else's folder.
736 All the \fIMH\fR command
737 actions not requiring write permission may be used with
738 a \*(lqread-only\*(rq folder.
739 .pp
740 Table 1 lists examples of some of the currently defined profile
741 entries, typical arguments, and the programs that reference the
742 entries.
743 .bp
744 .in .9i
745 .ll -.9i
746 .ta \w'<program>:\0default switches  'u
747 .sp 30p
748 .ce
749 Table 1
750 .sp 8p
751 .ce
752 P\s-2ROFILE\s0 C\s-2OMPONENTS\s0
753 .hl             \" ~12p preceding + 1v (12p) after
754 .nf
755 ^^\fIMH\fR Programs that
756 ^Keyword and Argument~^\ use Component\h'|\n(.lu-.9i'\v'4p'\l'|0'\v'-4p'  \" \l'..' does underlining
757 .sp
758 ^Path:\0Mail~^All
759 ^Current-Folder:\0inbox~^Most
760 ^Editor:\0/usr/ucb/ex~^\fIcomp, dist, forw, repl\fR
761 ^Inbox:\0inbox~^\fIinc, rmf\fR
762 ^Msg\-Protect:\0644~^\fIinc\fR
763 ^Folder\-Protect:\0711~^\fIinc, pick, refile\fR
764 ^<program>:\0default switches~^All
765 ^prompter\-next:\0ed~^\fIcomp, dist, forw, repl\fR
766 .hl
767 .ll +.9i
768 .in 0
769 .fi
770 .pp
771 Path
772 .u should
773 be present.
774 Current\-Folder is maintained
775 automatically by many \fIMH\fR commands (see the \fBContext\fR sections of
776 the individual commands in Sec. IV).
777 All other entries are optional,
778 defaulting to the values described above.
779 .uh "MESSAGE NAMING"
780 .pp
781 Messages may be referred to explicitly or implicitly when
782 using \fIMH\fR commands.
783 A formal syntax of message names is given in Appendix B, but the
784 following description should be sufficient for most \fIMH\fR users.
785 Some details of message naming that apply only to certain
786 commands are included in the description of those
787 commands.
788 .pp
789 Most of the \fIMH\fR commands accept arguments specifying one or
790 more folders, and one or more messages to operate on.
791 The use of
792 the word \*(lqmsg\*(rq as an argument to a command means that exactly one
793 message name may be specified.
794 A message name may be a number,
795 such as 1, 33, or 234, or it may be
796 one of the \*(lqreserved\*(rq message names:
797 first, last, prev, next, and cur.
798 (As a shorthand, a
799 period (\&.) is equivalent to cur.)
800 The meanings of these names are straightforward:
801 \*(lqfirst\*(rq is the first message in the folder;
802 \*(lqlast\*(rq is the last message in the folder;
803 \*(lqprev\*(rq is the message numerically previous to the current message;
804 \*(lqnext\*(rq is the message numerically following the current message;
805 \*(lqcur\*(rq (or \*(lq\&.\*(rq) is the current message in the folder.
806 In addition,
807 \fIMH\fR supports user\-defined\-sequences;
808 see the description of the \fImark\fR command for more information.
809 .pp
810 The default in commands that take a \*(lqmsg\*(rq argument is
811 always \*(lqcur\*(rq.
812 .pp
813 The word \*(lqmsgs\*(rq indicates that several messages may be
814 specified.
815 Such a specification consists of several message
816 designations separated by spaces.
817 A message designation is
818 either a message name or a message range.
819 A message range is a
820 specification of the form name1\-name2 or name1:n, where name1 and
821 name2 are message names and n is an integer.
822 The first form
823 designates all the messages from name1 to name2 inclusive; this
824 must be a non-empty range.
825 The second form specifies up to n
826 messages, starting with name1 if name1 is a number, or first,
827 cur, or next, and ending with name1 if name1 is last or
828 prev.
829 This interpretation of n is overridden if n is preceded
830 by a plus sign or a minus sign;
831 +n always means up to n messages starting with
832 name1, and \-n always means up to n messages ending with name1.
833 Repeated specifications of the same message have the same effect
834 as a single specification of
835 the message.
836 Examples of
837 specifications are:
838
839 .(b
840 1 5 7\-11 22
841 first 6 8 next
842 first\-10
843 last:5
844 .)b
845 .pp
846 The message name \*(lqall\*(rq is a shorthand for \*(lqfirst\-last\*(rq,
847 indicating all of the messages in the folder.
848 .pp
849 In commands that accept \*(lqmsgs\*(rq arguments, the default is
850 either cur or all, depending on which makes more sense.
851 .pp
852 In all of the \fIMH\fR commands, a plus sign preceding an argument
853 indicates a folder name.
854 Thus, \*(lq+inbox\*(rq is the name of the
855 user's standard inbox.
856 If an explicit folder argument is given
857 to an \fIMH\fR command, it will become the current folder (that is,
858 the \*(lqCurrent-Folder:\*(rq entry
859 in the user's profile will be changed to this folder).
860 In the case of the
861 \fIrefile\fR command, which
862 can have multiple output folders, a new source folder (other than
863 the default current folder) is specified by `\-src\0+folder'.
864 .uh "OTHER MH CONVENTIONS"
865 .pp
866 One very powerful feature of \fIMH\fR is that the \fIMH\fR commands may
867 be issued from any current directory, and the proper path to
868 the appropriate folder(s) will be taken from the user's profile.
869 If the \fIMH\fR path is not appropriate for a specific folder or file,
870 the automatic prepending of the \fIMH\fR path can be avoided by
871 beginning a folder or file name with \fB/\fR,
872 or with \fB\&./\fR or \fB\&.\&./\fR component.
873 Thus any specific absolute path may be specified along with any path
874 relative to the current working directory.
875 .pp
876 Arguments to the various programs may be given in any order,
877 with the exception of a few switches whose arguments must follow
878 immediately, such as `\-src\0+folder' for \fIrefile\fR.
879 .pp
880 Whenever an \fIMH\fR command prompts the user, the valid options
881 will be listed in response to a <RETURN>.
882 (The first of the
883 listed options is the default if end-of-file is encountered,
884 such as from a command file.)
885 A valid response is any \fIunique\fR abbreviation of one of the listed options.
886 .pp
887 Standard UNIX documentation conventions are used in this report
888 to describe \fIMH\fR command syntax.
889 Arguments enclosed in brackets
890 ([ ]) are optional; exactly one of the arguments enclosed
891 within braces ({ }) must be specified, and all other
892 arguments are required.
893 The use of ellipsis dots (...) indicates
894 zero or more repetitions of the previous item.
895 For example,
896 \*(lq+folder ...\*(rq would indicate that one or more \*(lq+folder\*(rq
897 arguments is required
898 and \*(lq[+folder ...]\*(rq indicates that 0 or more
899 \*(lq+folder\*(rq arguments may be given.
900 .pp
901 \fIMH\fR departs from UNIX standards by using switches that consist of
902 more than one character, e.g. `\-header'.
903 To minimize typing,
904 only a unique abbreviation of a switch need be typed; thus, for
905 `\-header', `\-hea' is probably sufficient, depending on the
906 other switches the command accepts.
907 Each \fIMH\fR program
908 accepts the switch `\-help' (which \fBmust\fR be spelled out fully)
909 and produces a syntax description and a list of switches.
910 In the
911 list of switches, parentheses indicate required characters.
912 For example, all `\-help' switches will appear as \*(lq\-(help)\*(rq,
913 indicating that no abbreviation is accepted.
914 Furthermore,
915 the `\-help' switch tells the version of the \fIMH\fR program you invoked.
916 .pp
917 Many \fIMH\fR switches have both on and off forms, such as
918 `\-format' and `\-noformat'.
919 In many of the descriptions which follow,
920 only one form is defined; the other form, often used to
921 nullify profile switch settings, is assumed to be the opposite.
922 .br
923 .bp
924 .uh "MH COMMANDS"
925 .pp
926 The \fIMH\fR package comprises several programs:
927 .\"    I pity the fool who tampers with the next line...
928 .ds ZZ -me
929 .so mh.me
930 .pp
931 These programs are described below.
932 The form of the descriptions
933 conforms to the standard
934 form for the description of UNIX commands.
935 .if t \{
936 .ll 6.5i
937 .lt 6.5i
938 \}
939 .fo '[mh.6]'MH.6.8'UCI version'
940 .de SC
941 .he '\\$1(\\$2)'-%-'\\$1(\\$2)'
942 .bp
943 .(x
944 .ti .8i
945 \\$1
946 .)x
947 ..
948 .de NA
949 .b \\s-2NAME\\s0
950 .ti .5i
951 ..
952 .de SY
953 .sp
954 .b \\s-2SYNOPSIS\\s0
955 .in 1i
956 .ti .5i
957 .na
958 ..
959 .de DE
960 .ad
961 .sp
962 .in 0
963 .b  \\s-2DESCRIPTION\\s0
964 .sp
965 .fi
966 .in .5i
967 ..
968 .de Uh
969 .ad
970 .sp
971 .ti -.25i
972 .b "\\s-2\\$1\\s0"
973 .sp
974 .fi
975 ..
976 .de Hh
977 .ad
978 .sp
979 .in 0
980 .b "\\s-2Helpful Hints\\s0"
981 .sp
982 .fi
983 .in .5i
984 ..
985 .de Fi
986 .(b L
987 .ti 0
988 .b \\s-2Files\\s0
989 .ta \w'/opt/mh-6.8.5/lib/ExtraBigFileName  'u
990 ..
991 .de Pr
992 .)b
993 .(b L F
994 .ta \w'ExtraBigProfileName  'u
995 .ti 0
996 .b "\\s-2Profile Components\\s0"
997 .ti .5i
998 ..
999 .de Ps
1000 .ti .5i
1001 ..
1002 .de Sa
1003 .)b
1004 .(b L F
1005 .ti 0
1006 .b "\\s-2See Also\\s0"
1007 .br
1008 ..
1009 .de De
1010 .)b
1011 .(b L
1012 .in .5i
1013 .ti 0
1014 .b \\s-2Defaults\\s0
1015 ..
1016 .de Ds
1017 ..
1018 .de Co
1019 .)b
1020 .(b L F
1021 .ti 0
1022 .b \\s-2Context\\s0
1023 .br
1024 ..
1025 .de Hi
1026 .)b
1027 .(b L F
1028 .ti 0
1029 .b \\s-2History\\s0
1030 .br
1031 ..
1032 .de Bu
1033 .)b
1034 .(b L F
1035 .ti 0
1036 .b \\s-2Bugs\\s0
1037 .br
1038 ..
1039 .de En
1040 .)b
1041 .in 0
1042 ..
1043 .po -.50i
1044 .so ali.me
1045 .so anno.me
1046 .so burst.me
1047 .so comp.me
1048 .so dist.me
1049 .so folder.me
1050 .so forw.me
1051 .so inc.me
1052 .so mark.me
1053 .so mhl.me
1054 .so mhmail.me
1055 .so mhn.me
1056 .so mhook.me
1057 .so mhparam.me
1058 .so mhpath.me
1059 .so msgchk.me
1060 .so msh.me
1061 .so next.me
1062 .so packf.me
1063 .so pick.me
1064 .so prev.me
1065 .so prompter.me
1066 .so rcvstore.me
1067 .so refile.me
1068 .so repl.me
1069 .so rmf.me
1070 .so rmm.me
1071 .so scan.me
1072 .so send.me
1073 .so show.me
1074 .so slocal.me
1075 .so sortm.me
1076 .so vmh.me
1077 .so whatnow.me
1078 .so whom.me
1079 .po +.50i
1080 .he ''-%-''
1081 .fo ''''
1082 .br
1083 .if t \{
1084 .ll 32P
1085 .lt 32P
1086 \}
1087 .bp
1088 .uh "MORE DETAILS"
1089 .pp
1090 This section describes some of the more intense points of the \fIMH\fR system,
1091 by expanding on topics previously discussed.
1092 The format presented conforms to the standard form for the description of UNIX
1093 documentation.
1094 .if t \{
1095 .ll 6.5i
1096 .lt 6.5i
1097 \}
1098 .fo '[mh.6]'MH.6.8'UCI version'
1099 .po -.50i
1100 .so mh-alias.me
1101 .so mh-format.me
1102 .so mh-mail.me
1103 .so mh-profile.me
1104 .so mh-sequence.me
1105 .so ap.me
1106 .so conflict.me
1107 .so dp.me
1108 .so fmtdump.me
1109 .so install-mh.me
1110 .so post.me
1111 .po +.50i
1112 .he ''-%-''
1113 .fo ''''
1114 .br
1115 .if t \{
1116 .ll 32P
1117 .lt 32P
1118 \}
1119 .+c "REPORTING PROBLEMS"
1120 .pp
1121 If problems are encountered with an \fIMH\fR program,
1122 the problems should be reported to the local maintainers of \fIMH\fR.
1123 When doing this,
1124 the name of the program should be reported,
1125 along with the version information for the program.
1126 To find out what version of an \fIMH\fR program is being run,
1127 invoke the program with the `\-help' switch.
1128 In addition to listing the syntax of the command,
1129 the program will list information pertaining to its version.
1130 This information includes the version of \fIMH\fR,
1131 the host it was generated on,
1132 and the date the program was loaded.
1133 A second line of information,
1134 found on versions of \fIMH\fR after #5.380 include \fIMH\fR configuration
1135 options.
1136 For example,
1137
1138 .in +.5i
1139 version: MH 6.1 #1[UCI] (nrtc-gremlin) of Wed Nov  6 01:13:53 PST 1985
1140 .br
1141 options: [BSD42] [MHE] [NETWORK] [SENDMTS] [MMDFII] [SMTP] [POP]
1142 .in -.5i
1143
1144 The `6.1 #1[UCI]' indicates that the program is from the UCI \fImh.6\fR
1145 version of \fIMH\fR.
1146 The program was generated on the host `nrtc-gremlin' on
1147 `Wed Nov  6 01:13:53 PST 1985'.
1148 It's usually a good idea to send the output of the `\-help' switch along
1149 with your report.
1150
1151 If there is no local \fIMH\fR maintainer,
1152 try the address \fBBug-MH\fR.
1153 If that fails, use the Internet mailbox \fBBug-MH@ICS.UCI.EDU\fR.
1154
1155 .+c "ADVANCED FEATURES"
1156 .de UH
1157 .lp
1158 .b "\\$1"
1159 .pp
1160 .(x
1161 .ti .8i
1162 \\$1
1163 .)x
1164 ..
1165 .pp
1166 This section describes some features of \fIMH\fR that were included strictly
1167 for advanced \fIMH\fR users.
1168 These capabilities permit \fIMH\fR to exhibit more powerful behavior for the
1169 seasoned \fIMH\fR users.
1170 .uh "USER\-DEFINED SEQUENCES"
1171 .pp
1172 User\-defined sequences allow the \fIMH\fR user a tremendous amount of power
1173 in dealing with groups of messages in the same folder
1174 by allowing the user to bind a group of messages to a meaningful symbolic
1175 name.
1176 The user may choose any name for a message sequence,
1177 as long as it consists of alphanumeric characters and does not conflict with
1178 the standard \fIMH\fR reserved message names
1179 (e.g., \*(lqfirst\*(rq, etc).
1180 After defining a sequence,
1181 it can be used wherever an \fIMH\fR command expects a `msg' or `msgs'
1182 argument.
1183 .pp
1184 A restricted form of message ranges are allowed with user\-defined
1185 sequences. The form \*(lqname:n\*(rq, specifies up to the first `n' messages
1186 which are part of the user\-defined sequence `name'.
1187 A leading plus sign is allowed on `n', but is ignored.
1188 The interpretation of n is overridden if n is preceded
1189 by a minus sign;
1190 `\-n' always means up to the last `n' messages which are part of the
1191 sequence `name'.
1192 .pp
1193 Although all \fIMH\fR commands expand user\-defined sequences as appropriate,
1194 there are two commands that allow the user to define and manipulate them:
1195 \fIpick\fR and \fImark\fR.
1196 .UH "Pick and User\-Defined Sequences"
1197 .pp
1198 Most users of \fIMH\fR will use user\-defined sequences only with
1199 the \fIpick\fR command.
1200 By giving the `\-sequence\ name' switch to \fIpick\fR
1201 (which can occur more than once on the command line),
1202 each sequence named is defined as those messages which \fIpick\fR matched
1203 according the the selection criteria it was given.
1204 Hence,
1205
1206 .ti +.5i
1207 pick\0\-from\0frated\0\-seq\0fred
1208
1209 finds all those messages in the current folder which were from
1210 \*(lqfrated\*(rq,
1211 creates a sequence called \*(lqfred\*(rq,
1212 and then adds them to the sequence.
1213 The user could then invoke
1214
1215 .ti +.5i
1216 scan\0fred
1217
1218 to get a \fIscan\fR listing of those messages.
1219 Note that by default,
1220 \fIpick\fR creates the named sequences
1221 before it adds the selected messages to the sequence.
1222 Hence, if the named sequence already existed,
1223 the sequence is destroyed prior to being re-defined
1224 (nothing happens to the messages that were a part of this sequence,
1225 they simply cease to be members of that sequence).
1226 By using the `\-nozero' switch, this behavior can be inhibited,
1227 as in
1228
1229 .in +.5i
1230 pick\0\-from\0frated\0\-seq\0sgroup
1231 .br
1232 pick\0\-from\0fear\0\-seq\0sgroup\0\-nozero
1233 .br
1234 pick\0\-from\0freida\0\-seq\0sgroup\0\-nozero
1235 .in -.5i
1236
1237 finds all those messages in the current folder which were from
1238 \*(lqfrated\*(rq, \*(lqfear\*(rq, or \*(lqfreida\*(rq,
1239 and defines the sequence called \*(lqsgroup\*(rq as exactly those messages.
1240 These operations amounted to an \*(lqinclusive\-or\*(rq of three selection
1241 criteria,
1242 using \fIpick\fR,
1243 one can also generate the \*(lqand\*(rq of some selection criteria as well:
1244
1245 .in +.5i
1246 pick\0\-from\0frated\0\-seq\0fred
1247 .br
1248 pick\0\-before\0friday\0\-seq\0fred\0fred
1249 .in -.5i
1250
1251 This example defines the sequence called \*(lqfred\*(rq as exactly those
1252 messages from \*(lqfrated\*(rq that were dated prior to \*(lqfriday\*(rq.\**
1253 .(f
1254 \** Of course,
1255 it is much easier to simply use the built\-in boolean operation of
1256 \fIpick\fR to get the desired results:
1257
1258 .ti +.5i
1259 pick\0\-from\0frated\0\-or\0\-from\0fear\0\-or\0\-from\0freida\0\-seq\0sgroup
1260
1261 and
1262
1263 .ti +.5i
1264 pick\0\-from\0frated\0\-and\0\-before\0friday\0\-seq\0fred
1265
1266 do exactly the same thing as the five commands listed above.
1267 Hence, the `\-nozero' option to \fIpick\fR is only useful to manipulate
1268 existing sequences.
1269 .)f
1270 .pp
1271 \fIPick\fR is normally used as a back\-quoted command,
1272 for example,
1273
1274 .ti +.5i
1275 scan\0`pick\0\-from\0postmaster`
1276
1277 Now suppose that the user decides that another command should be issued,
1278 using exactly those messages.
1279 Since,
1280 \fIpick\fR wasn't given a `\-sequence\ name' argument in this example,
1281 the user would end\-up typing the entire back\-quoted command again.
1282 A simpler way is to add a default sequence name to the \&.mh\(ruprofile.
1283 For example,
1284
1285 .ti +.5i
1286 pick:\0\-seq\0select\0\-list
1287
1288 will tell \fIpick\fR to always define the sequence \*(lqselect\*(rq whenever
1289 it's run.
1290 The `-list' is necessary since the `\-sequence\ name' switch sets `\-nolist'
1291 whenever the former is encountered.
1292 Hence, this profile entry makes \fIpick\fR define the \*(lqselect\*(rq
1293 sequence and otherwise behave exactly as if there was no profile entry at all.
1294 .UH "Mark and User\-Defined Sequences"
1295 .pp
1296 The \fImark\fR command lets the user perform low\-level manipulation of
1297 sequences,
1298 and also provides a well\-needed debug facility to the
1299 implementors/developers/maintainers of \fIMH\fR (the \fIMH\fR\-hacks).
1300 In the future, a user\-friendly \*(lqfront\-end\*(rq for \fImark\fR will
1301 probably be developed to give the \fIMH\fR user a way to take better
1302 advantage of the underlying facilities.
1303 .UH "Public and Private User\-Defined Sequences"
1304 .pp
1305 There are two kinds of sequences: \fIpublic\fR sequences,
1306 and \fIprivate\fR sequences.
1307 \fIPublic\fR sequences of a folder are accessible to any \fIMH\fR user that
1308 can read that folder and are kept in the \&.mh\(rusequences file in the folder.
1309 \fIPrivate\fR sequences are accessible only to the \fIMH\fR user that defined
1310 those sequences and are kept in the user's \fIMH\fR context file.
1311 By default,
1312 \fIpick\fR (and \fImark\fR\0) create \fIpublic\fR sequences
1313 if the folder for which the sequences are being defined is writable by the
1314 \fIMH\fR user.
1315 Otherwise, \fIprivate\fR sequences are created.
1316 This can be overridden with the `\-public' and `\-nopublic' switches.
1317 .UH "Sequence Negation"
1318 .pp
1319 In addition to telling an \fIMH\fR command to use the messages in the sequence
1320 \*(lqseen\*(rq, as in
1321
1322 .ti +.5i
1323 refile\0seen\0+old
1324
1325 it would be useful to be easily able to tell an \fIMH\fR command to use all
1326 messages \fIexcept\fR those in the sequence.
1327 One way of doing this would be to use \fImark\fR and define the sequence
1328 explicitly,
1329 as in
1330
1331 .ti +.5i
1332 mark\0\-delete\0\-zero\0seen\0\-seq\0notseen
1333
1334 which,
1335 owing to \fImark\fR\0's cryptic interpretation of `\-delete' and `\-zero',
1336 defines the sequence \*(lqnotseen\*(rq to be all messages not in the sequence
1337 \*(lqseen\*(rq.
1338 Naturally,
1339 anytime the sequence \*(lqseen\*(rq is changed,
1340 \*(lqnotseen\*(rq will have to be updated.
1341 Another way to achieve this is to define the entry
1342 \*(lqSequence\-Negation:\*(rq in the \&.mh\(ruprofile.
1343 If the entry was
1344
1345 .ti +.5i
1346 Sequence\-Negation:\0not
1347
1348 then anytime an \fIMH\fR command was given \*(lqnotseen\*(rq as a `msg' or
1349 `msgs' argument,
1350 it would substitute all messages that are not a member of the sequence
1351 \*(lqseen\*(rq.
1352 That is,
1353
1354 .ti +.5i
1355 refile\0notseen\0+new
1356
1357 does just that.
1358 The value of the \*(lqSequence\-Negation:\*(rq entry in the profile can be
1359 any string.
1360 Hence,
1361 experienced users of \fIMH\fR do not use a word,
1362 but rather a special character which their shell does not interpret
1363 (users of the \fICShell\fR use a single caret or circumflex (usually shift\-6),
1364 while users of the Bourne shell use an exclamation\-mark).
1365 This is because there is nothing to prevent a user of \fIMH\fR from defining a
1366 sequence with this string as its prefix,
1367 if the string is nothing by letters and digits.
1368 Obviously,
1369 this could lead to confusing behavior
1370 if the \*(lqSequence\-Negation:\*(rq entry leads \fIMH\fR to believe that two
1371 sequences are opposites by virtue of their names differing by the prefix
1372 string.
1373 .UH "The Previous Sequence"
1374 .pp
1375 Many times users find themselves issuing a series of commands on the same
1376 sequences of messages.
1377 If the user first defined these messages as a sequence,
1378 then considerable typing may be saved.
1379 If the user doesn't have this foresight,
1380 \fIMH\fR provides a handy way of having \fIMH\fR remember the `msgs' or
1381 `msg' argument last given to an \fIMH\fR command.
1382 If the entry \*(lqPrevious\-Sequence:\*(rq is defined in the
1383 \&.mh\(ruprofile,
1384 then when the command finishes,
1385 it will define the sequence(s) named in the value of this entry as being
1386 exactly those messages that were specified.
1387 Hence, a profile entry of
1388
1389 .ti +.5i
1390 Previous\-Sequence:\0pseq
1391
1392 directs any \fIMH\fR command that accepts a `msg' or `msgs' argument to
1393 define the sequence \*(lqpseq\*(rq as those messages when it finishes.
1394 More than one sequence name may be placed in this entry,
1395 separated with spaces.
1396 The one disadvantage of this approach
1397 is that the \fIMH\fR progams have to update the sequence information for
1398 the folder each time they run
1399 (although most programs read this information,
1400 usually only \fIpick\fR and \fImark\fR have to write this information out).
1401 .UH "The Unseen Sequence"
1402 .pp
1403 Finally, some users like to distinguish between messages which have been
1404 previously seen by them.
1405 Both \fIinc\fR and \fIshow\fR honorthe profile entry
1406 \*(lqUnseen\-Sequence\*(rq to support this activity.
1407 Whenever \fIinc\fR places new messages in a folder,
1408 if the entry \*(lqUnseen\-Sequence\*(rq is defined in the \&.mh\(ruprofile,
1409 then when the command finishes,
1410 \fIinc\fR will add the new messages to the sequence(s) named in the value of
1411 this entry.
1412 Hence, a profile entry of
1413
1414 .ti +.5i
1415 Unseen\-Sequence:\0 unseen
1416
1417 directs \fIinc\fR to add new messages to the sequence \*(lqunseen\*(rq.
1418 Unlike the behavior of the \*(lqPrevious\-Sequence\*(rq entry in the profile
1419 however,
1420 the sequence(s) will \fBnot\fR be zero'd.
1421 .pp
1422 Similarly,
1423 whenever \fIshow\fR (or \fInext\fR or \fIprev\fR\0) displays a message,
1424 they remove those messages from any sequences named by the
1425 \*(lqUnseen\-Sequence\*(rq entry in the profile.
1426 .uh "COMPOSITION OF MAIL"
1427 .pp
1428 There are a number of interesting advanced facilities for the composition of
1429 outgoing mail.
1430
1431 .UH "The Draft Folder"
1432 .pp
1433 The \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands have two
1434 switches, `\-draftfolder\0+folder' and `\-draftmessage\0msg'.
1435 If `\-draftfolder\0+folder' is used,
1436 these commands are directed to construct a draft message in the indicated
1437 folder.
1438 (The \*(lqDraft\-Folder:\*(rq profile entry may be used to declare a
1439 default draft folder for use with
1440 \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR)
1441 If `\-draftmessage\0msg' is not used, it defaults to `new'
1442 (unless the user invokes \fIcomp\fR with `\-use',
1443 in which case the default is `cur').
1444 Hence, the user may have several message compositions in progress
1445 simultaneously.
1446 Now, all of the \fIMH\fR tools are available on each of the user's message
1447 drafts
1448 (e.g., \fIshow\fR, \fIscan\fR, \fIpick\fR, and so on).
1449 If the folder does not exist,
1450 the user is asked if it should be created (just like with \fIrefile\fR\0).
1451 Also,
1452 the last draft message the user was composing is known as `cur' in the
1453 draft folder.
1454 .pp
1455 Furthermore,
1456 the \fIsend\fR command has these switches as well.
1457 Hence, from the shell,
1458 the user can send off whatever drafts desired using the
1459 standard \fIMH\fR `msgs' convention with `\-draftmessage msgs'.
1460 If no `msgs' are given, it defaults to `cur'.
1461 .pp
1462 In addition,
1463 all five programs have a `\-nodraftfolder' switch,
1464 which undoes the last occurrence of `\-draftfolder\0folder'
1465 (useful if the latter occurs in the user's \fIMH\fR profile).
1466 .pp
1467 If the user does not give the `\-draftfolder\0+folder' switch,
1468 then all these commands act ``normally''.
1469 Note that the `\-draft' switch to \fIsend\fR and \fIshow\fR
1470 still refers to the file called `draft' in the user's \fIMH\fR
1471 directory.
1472 In the interests of economy of expression,
1473 when using \fIcomp\fR or \fIsend\fR,
1474 the user needn't prefix the draft `msg' or `msgs' with
1475 `\-draftmessage'.
1476 Both of these commands accept a `file' or `files' argument,
1477 and they will, if given `\-draftfolder\0+folder' treat these arguments
1478 as `msg' or `msgs'.\**
1479 .(f
1480 \** This may appear to be inconsistent, at first,
1481 but it saves a lot of typing.
1482 .)f
1483 Hence,
1484
1485 .ti +.5i
1486 send -draftf +drafts first
1487
1488 is the same as
1489
1490 .ti +.5i
1491 send -draftf +drafts -draftm first
1492
1493 .pp
1494 To make all this a bit more clear, here are some examples.
1495 Let's assume that the following entries are in the \fIMH\fR profile:
1496
1497 .in +.5i
1498 .nf
1499 Draft\-Folder: +drafts
1500 sendf: -draftfolder +drafts
1501 .fi
1502 .in -.5i
1503
1504 Furthermore,
1505 let's assume that the program \fIsendf\fR is a (symbolic) link in the user's 
1506 \fB$HOME/bin/\fR directory to \fIsend\fR.
1507 Then, any of the commands
1508
1509 .in +.5i
1510 .nf
1511 comp
1512 dist
1513 forw
1514 repl
1515 .fi
1516 .in -.5i
1517
1518 constructs the message draft in the `draft' folder using the `new'
1519 message number.
1520 Furthermore,
1521 they each define `cur' in this folder to be that message draft.
1522 If the user were to use the \fIquit\fR option at `What now?' level,
1523 then later on,
1524 if no other draft composition was done,
1525 the draft could be sent with simply
1526
1527 .ti +.5i
1528 sendf
1529
1530 Or,
1531 if more editing was required,
1532 the draft could be edited with
1533
1534 .ti +.5i
1535 comp -use
1536
1537 Instead,
1538 if other drafts had been composed in the meantime,
1539 so that this message draft was no longer known as `cur' in the `draft'
1540 folder,
1541 then the user could \fIscan\fR the folder to see which message draft in the
1542 folder should be used for editing or sending.
1543 Clever users could even employ a back-quoted \fIpick\fR to do the work:
1544
1545 .ti +.5i
1546 comp -use `pick +drafts -to bug-mh`
1547
1548 or
1549
1550 .ti +.5i
1551 sendf `pick +drafts -to bug-mh`
1552
1553 Note that in the \fIcomp\fR example,
1554 the output from \fIpick\fR must resolve to a single message draft
1555 (it makes no sense to talk about composing two or more drafts with one
1556 invocation of \fIcomp\fR\0).
1557 In contrast,
1558 in the \fIsend\fR example,
1559 as many message drafts as desired can appear,
1560 since \fIsend\fR doesn't mind sending more than one draft at a time.
1561 .pp
1562 Note that the argument `\-draftfolder\0+folder' is not
1563 included in the profile entry for \fIsend\fR,
1564 since when \fIcomp\fR, et. al., invoke \fIsend\fR directly,
1565 they supply \fIsend\fR with the UNIX pathname of the message draft,
1566 and \fBnot\fR a `draftmessage\0msg' argument.
1567 As far as \fIsend\fR is concerned,
1568 a \fIdraft folder\fR is not being used.
1569 .pp
1570 It is important to realize that \fIMH\fR treats the draft folder like a standard
1571 \fIMH\fR folder in nearly all respects.
1572 There are two exceptions:
1573 .u first ,
1574 under no circumstancs will the `\-draftfolder\0folder' switch cause the
1575 named folder to become the current folder.\**
1576 .(f
1577 \** Obviously,
1578 if the folder appeared in the context of a standard `+folder'
1579 argument to an \fIMH\fR program, as in
1580
1581 .ti +.5i
1582 scan +drafts
1583
1584 it might become the current folder, depending on the context changes of the
1585 \fIMH\fR program in question.
1586 .)f
1587 .u Second ,
1588 although conceptually \fIsend\fR deletes the `msgs' named in the draft
1589 folder,
1590 it does not call `delete-prog' to perform the deletion.
1591
1592 .UH "What Happens if the Draft Exists"
1593 .pp
1594 When the \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands are
1595 invoked and the draft you indicated already exists,
1596 these programs will prompt the user for a reponse directing the program's
1597 action.
1598 The prompt is
1599
1600 .ti +.5i
1601 Draft ``/usr/src/uci/mh/mhbox/draft'' exists (xx bytes).
1602 .ti +.5i
1603 Disposition?
1604
1605 The appropriate responses and their meanings are:
1606 .u replace :
1607 deletes the draft and starts afresh;
1608 .u list :
1609 lists the draft;
1610 .u refile :
1611 files the draft into a folder and starts afresh;
1612 and,
1613 .u quit :
1614 leaves the draft intact and exits.
1615 In addition, if you specified `\-draftfolder\0folder' to the command,
1616 then one other response will be accepted:
1617 .u new :
1618 finds a new draft,
1619 just as if `\-draftmessage\0new' had been given.
1620 Finally, the \fIcomp\fR command will accept one more response:
1621 .u use :
1622 re-uses the draft,
1623 just as if `\-use' had been given.
1624
1625 .UH "The Push Option at What now? Level"
1626 .pp
1627 The \fIpush\fR option to the \*(lqWhat now?\*(rq query
1628 in the \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands,
1629 directs the command to \fIsend\fR the draft
1630 in a special detached fashion,
1631 with all normal output discarded.
1632 If \fIpush\fR is used and the draft can not be sent,
1633 then \fIMH\fR will send the user a message,
1634 indicating the name of the draft file,
1635 and an explanation of the failure.
1636 .\" Although using \fIpush\fR calls \fIsend\fR\0(1),
1637 .\" the \fIsend\fR command will consult the profile entry for \fIpush\fR.
1638 .pp
1639 The user can also invoke \fIsend\fR from the shell with the `\-push'
1640 switch,
1641 which makes \fIsend\fR act like it had been \fIpush\fR\0'd by one of the
1642 composition commands.
1643 .\" composition commands.\**
1644 .\" .(f
1645 .\" \** Note that in this case,
1646 .\" \fIsend\fR consults the profile entry for whatever name it was invoked as,
1647 .\" such as \fIsendf\fR.
1648 .\" .)f
1649 .pp
1650 By using \fIpush\fR, the user can free the shell to do other things,
1651 because it appears to the shell that the \fIMH\fR command has finished.
1652 As a result the shell will immediately prompt for another command,
1653 despite the fact that the command is really still running.
1654 Note that if the user indicates that annotations are to be performed
1655 (with `\-annotate' to \fIdist\fR, \fIforw\fR, or \fIrepl\fR),
1656 the annotations will be performed after the message has been
1657 successfully sent.
1658 This action will appear to occur asynchronously.
1659 Obviously, if one of the messages that is to be annotated is
1660 removed before the draft has been successfully sent,
1661 then when \fIMH\fR tries to make the annotations,
1662 it won't be able to do so.
1663 In previous versions of \fIMH\fR,
1664 this resulted in an error message mysteriously appearing on the user's
1665 terminal.
1666 In \fImh.5\fR and later versions,
1667 in this special circumstance, no error will be generated.
1668 .pp
1669 If send is \fIpush\fR\0'd,
1670 then the `\-forward' switch is examined if a failure notice is generated.
1671 If given,
1672 then the draft is forwarded with the failure notice sent to the user.
1673 This allows rapid \fIburst\fR\0'ing of the failure notice to retrieve the
1674 unsent draft.
1675
1676 .UH "Options at What now? Level"
1677 .pp
1678 By default,
1679 the message composition programs call a program called \fIwhatnow\fR before
1680 the initial draft composition.
1681 The \fIMH\fR user can specify any program for this.
1682 Following is some information about the default \*(lqWhat now?\*(rq level.
1683 More detailed information can be found in the \fIwhatnow\fR\0(1) manual entry.
1684 .pp
1685 When using the \fIcomp\fR, \fIdist\fR, \fIforw\fR, and \fIrepl\fR commands at
1686 \*(lqWhat now?\*(rq level,
1687 the \fIedit\fR, \fIlist\fR, \fIheaders\fR, \fIrefile\fR,
1688 and (for the \fIdist\fR and \fIrepl\fR commands) the \fIdisplay\fR options
1689 will pass on any additional arguments given them to whatever program they
1690 invoke.
1691 .pp
1692 In \fImh.1\fR (the original RAND \fIMH\fR\0)
1693 and \fImh.2\fR (the first UCI version of \fIMH\fR\0),
1694 \fIMH\fR used a complicated heuristic to determine if the draft should be
1695 deleted or preserved after an unsuccessful edit.
1696 In \fImh.3\fR,
1697 \fIMH\fR was changed to preserve the draft always,
1698 since \fIcomp\fR, et. al.,
1699 could usually look at a draft, apply another set of heuristics,
1700 and decide if it was important or not.
1701 With the notion of a \fIdraft folder\fR, 
1702 in which one by default gets a `new' message draft,
1703 the edit deletion/preservation algorithm was re-implemented,
1704 to keep the draft folder from being cluttered with aborted edits.
1705 .pp
1706 Also,
1707 note that by default,
1708 if the draft cannot be successfully sent,
1709 these commands return to \*(lqWhat now?\*(rq level.
1710 But, when \fIpush\fR is used, this does not happen (obviously).
1711 Hence,
1712 if these commands were expected to annotate any messages,
1713 this will have to be done by hand, later on, with the \fIanno\fR command.
1714 .pp
1715 Finally, if the `\-delete' switch is not given to the \fIquit\fR option,
1716 then these commands will inform the user of the name of the unsent draft file.
1717
1718 .UH "Digests"
1719 .pp
1720 The \fIforw\fR command has the beginnings of a digestifying facility,
1721 with the `\-digest\ list', `\-issue\ number', and `\-volume\ number' switches.
1722
1723 If \fIforw\fR is given \*(lqlist\*(rq to the `\-digest' switch
1724 as the name of the discussion group,
1725 and the `\-issue\ number' switch is not given,
1726 then \fIforw\fR looks for an entry in the user's \fIMH\fR context called
1727 \*(lq\fIdigest\fR\-issue\-list\*(rq and increments its value to use as the
1728 issue number.
1729 Similarly,
1730 if the `\-volume\ number' switch is not given,
1731 then \fIforw\fR looks for \*(lq\fIdigest\fR\-volume\-list\*(rq
1732 (but does not increment its value) to use as the volume number.
1733
1734 Having calculated the name of the digest and the volume and issue numbers,
1735 \fIforw\fR will now process the components file using the same format string
1736 mechanism used by \fIrepl\fR.
1737 The current `%'\-escapes are:
1738
1739 .nf
1740 .ta \w'escape  'u +\w'integer  'u
1741 \fIescape\fR    \fItype\fR      \fIsubstitution\fR
1742 digest  string  digest name
1743 msg     integer issue number
1744 cur     integer volume number
1745 .re
1746 .fi
1747
1748 In addition, to capture the current date,
1749 any of the escapes valid for \fIdp\fR\0(8) are also valid for \fIforw\fR.
1750
1751 The default components file used by \fIforw\fR when in digest mode is:
1752
1753 .nf
1754 .in +.5i
1755 .ne 10
1756 .eo
1757 .so /opt/mh-6.8.5/lib/digestcomps
1758 .ec
1759 .in -.5i
1760 .fi
1761
1762 Hence, when the `\-digest' switch is present,
1763 the first step taken by \fIforw\fR is to expand the format strings in the
1764 component file.
1765 The next step is to compose the draft using
1766 the standard digest encapsulation algorithm
1767 (even putting an \*(lqEnd of list Digest\*(rq trailer in the draft).
1768 Once the draft is composed by \fIforw\fR,
1769 \fIforw\fR writes out the volume and issue profile entries for the digest,
1770 and then invokes the editor.
1771
1772 Naturally, when composing the draft,
1773 \fIforw\fR will honor the `\-filter\ filterfile' switch,
1774 which is given to \fImhl\fR to filter each message being forwarded prior to
1775 encapsulation in the draft.
1776 A good filter file to use, which is called \fImhl.digest\fR, is:
1777
1778 .nf
1779 .in +.5i
1780 .ne 10
1781 .eo
1782 .so /opt/mh-6.8.5/lib/mhl.digest
1783 .ec
1784 .in -.5i
1785 .fi
1786
1787 .uh "FOLDER HANDLING"
1788 .pp
1789 There are two interesting facilities for manipulating folders:
1790 relative folder addressing,
1791 which allows a user to shorten the typing of long folder names;
1792 and
1793 the folder\-stack,
1794 which permits a user to keep a stack of current folders.
1795
1796 .UH "Relative Folder Addressing"
1797 .pp
1798 By default, when `+folder' is given,
1799 and the folder name is not absolute
1800 (does not start with \fB/\fR, \fB\&./\fR, or \fB\&.\&./\fR),
1801 then the UNIX pathname of the folder is interpreted relative to the user's
1802 \fIMH\fR directory.
1803 Although this mechanism works fine for top\-level folders and their immediate
1804 sub\-folders,
1805 once the depth of the sub\-folder tree grows, it becomes rather unwieldly:
1806
1807 .ti +.5i
1808 scan\0+mh/mh.4/draft/flames
1809
1810 is a lot of typing.
1811 \fIMH\fR can't do anything if the current folder was \*(lq+inbox\*(rq,
1812 but if the current folder was, say, \*(lq+mh/mh.4/draft\*(rq,
1813 \fIMH\fR has a short\-hand notation to reference a sub\-folder of the
1814 current folder.
1815 Using the `@folder' notation,
1816 the \fIMH\fR user can direct any \fIMH\fR program which expects a `+folder'
1817 argument to look for the folder relative to the current folder instead of the
1818 user's \fIMH\fR directory.
1819 Hence, if the current folder \fIwas\fR \*(lq+mh/mh.4/draft\*(rq,
1820 then
1821
1822 .ti +.5i
1823 scan\0@flames
1824
1825 would do the trick handily.
1826 In addition, if the current folder \fIwas\fR \*(lq+mh/mh.4/draft\*(rq,
1827
1828 .ti +.5i
1829 scan\0@../pick
1830
1831 would scan the folder \*(lq+mh/mh.4/pick\*(rq,
1832 since, in the UNIX fashion,
1833 it references the folder \*(lqpick\*(rq which is a sub\-folder of
1834 the folder that is the parent of the current folder.
1835 Since most advanced \fIMH\fR users seem to exhibit a large degree of locality
1836 in referencing folders when they process mail,
1837 this convention should receive a wide range of uses.
1838
1839 .UH "The Folder\-Stack"
1840 .pp
1841 The \fIfolder\-stack\fR mechanism in \fIMH\fR gives the \fIMH\fR user a
1842 facility similar to the \fICShell\fR\0's directory\-stack.
1843 Simply put,
1844
1845 .ti +.5i
1846 folder\0\-push\0+foo
1847
1848 makes \*(lqfoo\*(rq the current folder,
1849 saving the folder that was previously the current folder on the
1850 \fIfolder\-stack\fR.
1851 As expected,
1852
1853 .ti +.5i
1854 folder\0\-pop
1855
1856 takes the top of the \fIfolder\-stack\fR and makes it the current folder.
1857 Each of these switches lists the \fIfolder\-stack\fR when they execute.
1858 It is simple to write a \fIpushf\fR command as a shell script.
1859 It's one line:
1860
1861 .ti +.5i
1862 exec\0folder\0\-push\0$@
1863
1864 Probably a better way is to link \fIfolder\fR to the $HOME/bin/ directory under
1865 the name of \fIpushf\fR and then add the entry
1866
1867 .ti +.5i
1868 pushf:\0\-push
1869
1870 to the \&.mh\(ruprofile.
1871 .pp
1872 The manual page for \fIfolder\fR discusses the analogy between the
1873 \fICShell\fR directory stack commands and the switches in \fIfolder\fR which
1874 manipulate the \fIfolder\-stack\fR.
1875 The \fIfolder\fR command uses the context entry `Folder\-Stack:' to keep
1876 track of the folders in the user's stack of folders.
1877 \"
1878 \"              On to the Appendices
1879 \"
1880 .fo ''-%-''
1881 .he ''''
1882 .(x
1883 .sp
1884 Appendix
1885 .)x _
1886 .de $c                          \" Major Heading printer
1887 .ce
1888 Appendix \\n+(ch
1889 .sp 2p
1890 .ce
1891 .b "\\s12\\$1\\s0"              \" 12 Point Bold Header
1892 .(x
1893 \ \ \ \\n(ch.\\ \\ \\$2
1894 .)x
1895 .sp 45p                         \" 45 points or about 1/2 inch
1896 ..
1897 .++ A
1898 .bp
1899 .$c "COMMAND SUMMARY" "Command Summary"
1900 .po -.50i
1901 .so mh-chart.me
1902 .po +.50i
1903 .if t \{
1904 .ll 32P
1905 .lt 32P
1906 \}
1907 .bp
1908 .$c "MESSAGE NAME BNF" "Message Name BNF"
1909
1910 .nf
1911 .in 1i
1912 .ta \w'user-defined-sequence 'u +\w':=  'u +\w'user-defined-sequence  'u
1913 msgs    :=      msgspec |
1914                 msgs msgspec
1915
1916 msgspec :=      msg     |
1917                 msg-range       |
1918                 msg-sequence    |
1919                 user-defined-sequence
1920
1921 msg     :=      msg-name        |
1922                 <number>
1923
1924 msg-name        :=      \*(lqfirst\*(rq |
1925                 \*(lqlast\*(rq  |
1926                 \*(lqcur\*(rq   |
1927                 \*(lq\&.\*(rq   |
1928                 \*(lqnext\*(rq  |
1929                 \*(lqprev\*(rq
1930
1931 msg-range       :=      msg\*(lq\-\*(rqmsg      |
1932                 \*(lqall\*(rq
1933
1934 msg-sequence    :=      msg\*(lq:\*(rqsigned-number
1935
1936 signed-number   :=      \*(lq+\*(rq<number>     |
1937                 \*(lq\-\*(rq<number>    |
1938                 <number>
1939
1940 user-defined-sequence   :=      <alpha> |
1941                 <alpha><alphanumeric>*
1942 .re
1943 .fi
1944 .sp
1945 .lp
1946 Where <number> is a decimal number greater than zero.
1947 .lp
1948 Msg-range specifies all of the messages in the given range
1949 and must not be empty.
1950 .lp
1951 Msg-sequence specifies up to <number> of messages, beginning
1952 with \*(lqmsg\*(rq (in the case of first, cur, next, or <number>),
1953 or ending with \*(lqmsg\*(rq (in the case of prev or last).
1954 +<number> forces \*(lqstarting with msg\*(rq, and \-<number> forces
1955 \*(lqending with number\*(rq.
1956 In all cases, \*(lqmsg\*(rq must exist.
1957 .lp
1958 User\-defined sequences are defined and manipulated with the \fIpick\fR
1959 and \fImark\fR commands.
1960 .in 0
1961 .bp
1962 .ce
1963 .b \\s12REFERENCES\\s0
1964 .(x
1965 .sp
1966 REFERENCES
1967 .)x
1968 .sp 3
1969 .in .4i
1970 .ti 0
1971 1.  Crocker, D. H., J. J. Vittal, K. T. Pogran, and D. A. Henderson, Jr.,
1972 \*(lqStandard for the Format of ARPA Network Text Messages,\*(rq
1973 \fIRFC733\fR,
1974 November 1977.
1975
1976 .ti 0
1977 2.  Thompson, K., and D. M. Ritchie, \*(lqThe UNIX Time-sharing System,\*(rq
1978 \fICommunications of the ACM\fR, Vol. 17, July 1974, pp. 365-375.
1979
1980 .ti 0
1981 3.  McCauley, E. J., and P. J. Drongowski, \*(lqKSOS\-The Design of a Secure
1982 Operating System,\*(rq \fIAFIPS Conference Proceedings\fR,
1983 National Computer Conference,
1984 Vol. 48, 1979, pp. 345-353.
1985
1986 .ti 0
1987 4.  Crocker, David H., \fIFramework and Functions of the \*(lqMS\*(rq Personal
1988 Message System\fR, The RAND Corporation, R-2134-ARPA, December 1977.
1989
1990 .ti 0
1991 5.  Thompson, K., and D. M. Ritchie, \fIUNIX Programmer's Manual\fR, 6th ed.,
1992 Western Electric Company, May 1975 (available only to UNIX licensees).
1993
1994 .ti 0
1995 6. Crocker, D. H.,
1996 \*(lqStandard for the Format of ARPA Internet Text Messages,\*(rq
1997 \fIRFC822\fR,
1998 August 1982.
1999 .de $c
2000 .ce
2001 .b "\\s12\\$1\\s0"   \" 12 Point Bold Header
2002 .(x y
2003 .sp
2004 \\$1
2005 .)x
2006 .sp 3
2007 ..
2008 .++ P
2009 .bp 1
2010 .fo ''''
2011 .he ''-%-''
2012 .+c "READ THIS"
2013 .pp
2014 Although the \fIMH\fR system was originally developed by the RAND Corporation,
2015 and is now in the public domain,
2016 the RAND Corporation assumes no responsibility for \fIMH\fR
2017 or this particular version of \fIMH\fR.
2018 .pp
2019 In addition,
2020 the Regents of the University of California issue the following
2021 \fBdisclaimer\fR in regard to the UCI version of \fIMH\fR:
2022 .sp 1
2023 .in +.5i
2024 \*(lqAlthough each program has been tested by its contributor,
2025 no warranty, express or implied,
2026 is made by the contributor or the University of California,
2027 as to the accuracy and functioning of the program
2028 and related program material,
2029 nor shall the fact of distribution constitute any such warranty,
2030 and no responsibility is assumed by the contributor
2031 or the University of California in connection herewith.\*(rq
2032 .in -.5i
2033 .pp
2034 This version of \fIMH\fR is in the public domain,
2035 and as such,
2036 there are no real restrictions on its use.
2037 The \fIMH\fR source code and documentation have no licensing restrictions
2038 whatsoever.
2039 As a courtesy,
2040 the authors ask only that you provide appropriate credit to the RAND
2041 Corporation and the University of California for having developed the software.
2042 .pp
2043 \fIMH\fR is a software package that is supported neither by the RAND
2044 Corporation nor the University of California.
2045 However,
2046 since we do use the software ourselves and plan to continue using
2047 (and improving) \fIMH\fR,
2048 bug reports and their associated fixes should be reported back to us so that
2049 we may include them in future releases.
2050 The current computer mailbox for \fIMH\fR is \fBBug\-MH@ICS.UCI.EDU\fR
2051 (in the ARPA Internet),
2052 and \fB...!ucbvax!ucivax!bug\-mh\fR (UUCP).
2053 Presently,
2054 there are two Internet discussion groups, \fBMH\-Users@ICS.UCI.EDU\fR
2055 and \fBMH\-Workers@ICS.UCI.EDU\fR.  \fBMH\-Workers\fP is for people
2056 discussing code changes to \fIMH\fP.  \fBMH-Users\fP is for general
2057 discussion about how to use \fIMH\fP.
2058 \fBMH\-Users\fR is bi-directionally 
2059 gatewayed into USENET as \fBcomp.mail.mh\fR.
2060 .+c "OBTAINING MH"
2061 .pp
2062 Since you probably already have \fIMH\fP,
2063 you may not need to read this unless you suspect you have an old version.
2064 On the Internet, you may retrieve the lastest release from one of:
2065
2066 .nf
2067 .in +1i
2068 ftp://ftp.ics.uci.edu/pub/mh/mh-6.8.tar.Z
2069 ftp://ftp.uu.uunet/networking/mail/mh/mh-6.8.tar.Z
2070 http://wuarchive.wustl.edu/packages/mail/mh/mh-6.8.tar.Z
2071 .fi
2072 .in -1i
2073
2074 .lp
2075 This is a tar image after being run through the compress program
2076 (approximately 2Mb).  There is also an \fIMH\fP World Wide Web
2077 Home Page at \*(lqhttp://www.ics.uci.edu/\~mh\*(rq
2078 which tells what the current release of \fIMH\fP
2079 is, and how to get updates.
2080 .pp
2081 You may also find MH on
2082 various other hosts; to make sure you get the latest version and
2083 don't waste your time re-fixing bugs, it's best to get it from
2084 either ftp.ics.uci.edu or a site which mirrors ftp.ics.uci.edu.
2085 .pp
2086 Alternatively, you can send $75 US to the address below.
2087 This covers the cost of a 6250 BPI 9-track magtape,
2088 handling, and shipping.  In addition, you'll get a
2089 laser-printed hard-copy of the entire MH documentation set.  Be
2090 sure to include your USPS address with your check.  Checks 
2091 must be drawn on U.S\&. funds and should be made payable to:
2092
2093 .ti +1i
2094 Regents of the University of California
2095
2096 The distribution address is:  
2097
2098 .nf
2099 .in +1i
2100 Attn: MH distribution
2101 Office of Academic Computing
2102 University of California, Irvine
2103 Irvine, CA  92717-2225
2104
2105 +1 714 824 5153
2106 .fi
2107 .in -1i
2108 .pp
2109 If you just want the hard-copies of the documentation, you
2110 still have to pay the $75.  The tar image has the documentation
2111 source (the manual is in roff format, but the rest are in TeX
2112 format).  Postscript formatted versions of the TeX papers are 
2113 available, as are crude tty-conversions of those papers.
2114 .+c FOREWORD
2115 .pp
2116 This document describes the RAND \fIMH\fR Message Handling System.
2117 Its primary purpose is to serve as a user's manual.
2118 It has been heavily based on a previous version of the manual,
2119 prepared by Bruce Borden, Stockton Gaines, and Norman Shapiro.
2120 .pp
2121 \fIMH\fR is a particularly novel system,
2122 and thus it is often more prone to change than other pieces of production
2123 software.
2124 As such, some specific points in this manual may not be correct in the
2125 future.
2126 In all cases, the on\-line sections of this manual,
2127 available through the UNIX\** \fIman\fR command,
2128 should present the most current information.
2129 .(f
2130 \** UNIX is a trademark of AT&T Bell Laboratories.
2131 .)f
2132 .pp
2133 When reading this document as a user's manual,
2134 certain sections are more interesting than others.
2135 The Preface and Summary are not particularly interesting to those
2136 interested in learning \fIMH\fR.
2137 The Introduction is slightly more interesting,
2138 as it touches upon the organization of the remainder of this document.
2139 The most useful sections are the Overview, Tutorial, and Detailed
2140 Description.
2141 The Overview should be read by all \fIMH\fR users, regardless of their
2142 expertise (beginning, novice, advanced, or hacker).
2143 The Tutorial should be read by all beginning and novice \fIMH\fR users,
2144 as it presents a nice description of the \fIMH\fR system.
2145 The Detailed Description should be read by the day\-to\-day user of \fIMH\fR,
2146 as it spells out all of the realities of the \fIMH\fR system.
2147 The Advanced Features section discusses some powerful \fIMH\fR capabilities for
2148 advanced users.
2149 Appendix A is particularly useful for novices,
2150 as it summarizes the invocation syntax of all the \fIMH\fR commands.
2151 .pp
2152 There are also several other documents which may be useful to you:
2153 \fIThe RAND MH Message Handling System: Tutorial\fR,
2154 which is a tutorial for \fIMH\fR;
2155 \fIThe RAND MH Message Handling System: The UCI BBoards Facility\fR,
2156 which describes the BBoards handling under \fIMH\fR;
2157 \fIMH.5: How to process 200 messages a day and still get some real work
2158 done\fR,
2159 which was presented at the 1985 Summer Usenix Conference and
2160 Exhibition in Portland, Oregon;
2161 \fIMH: A Multifarious User Agent\fR,
2162 which has been accepted for publication by Computer Networks;
2163 \fIMZnet: Mail Service for Personal Micro\-Computer Systems\fR,
2164 which was presented at the First International Symposium on Computer Message
2165 Systems in Nottingham, U.K.;
2166 and,
2167 \fIDesign of the TTI Prototype Trusted Mail Agent\fR,
2168 which describes a proprietary \*(lqtrusted\*(rq mail system built on \fIMH\fR.
2169 There are also documents, mostly specific to U.C.\0Irvine which you may find
2170 interesting:
2171 \fIMH for Beginners\fR, and \fIMH for MM Users\fR.
2172 All of these documents exist in the \fImh.6\fR distribution sent to your
2173 site.
2174 There's also a document,
2175 \fIChanges to the RAND MH Message Handling System: MH.6\fR,
2176 which describes user\-visible changes made to \fIMH\fR since the last major
2177 release.
2178 .pp
2179 This manual is very large, as it describes a large, powerful system in
2180 gruesome detail.
2181 The important thing to remember is:
2182 .sp 2
2183 .ce
2184 .b "\s+4DON'T PANIC\s0\**"
2185 .sp 2
2186 As explained in the tutorial, you really need to know only 5 commands to
2187 handle most of your mail.
2188 .(f
2189 \** Note the large, \fIfriendly\fR letters.
2190 .)f
2191 .pp
2192 Very advanced users may wish to consult 
2193 \fIThe RAND MH Message Handling System: Administrator's Guide\fR,
2194 which is also present in the \fImh.6\fR distribution sent to your site.
2195 .+c ACKNOWLEDGMENTS
2196 .pp
2197 The \fIMH\fR system described herein is based on the original RAND \fIMH\fR
2198 system.
2199 It has been extensively developed (perhaps too much so) by Marshall T. Rose and
2200 John L. Romine at the University of California, Irvine.
2201 Einar A. Stefferud, Jerry N. Sweet, and Terry P. Domae provided numerous
2202 suggestions to improve the UCI version of \fIMH\fR.
2203 Of course,
2204 a large number of people have helped \fIMH\fR along.
2205 The list of ``\fIMH\fR immortals'' is too long to list here.
2206 However, Van Jacobson deserves a special acknowledgement for his tireless
2207 work in improving the performance of \fIMH\fR.
2208 Some programs have been speeded-up by a factor of 10 or 20.
2209 All of users of \fIMH\fR, everywhere, owe a special thanks to Van.
2210 For this release, numerous \fIMH\-Workers\fP sent in fixes and other
2211 changes.  A handful of courageous \fIMH\-Workers\fP volunteered
2212 to beta\-test these changes; their help is particularly appreciated.
2213 .pp
2214 This manual is based on the original \fIMH\fR manual written at RAND by
2215 Bruce Borden, Stockton Gaines, and Norman Shapiro.
2216 .+c PREFACE
2217 .pp
2218 This report describes a system for dealing with messages transmitted on a
2219 computer.  Such messages might originate with other users of the same
2220 computer or might come from an outside source through a network to which the user's
2221 computer is connected.  Such computer-based message systems are
2222 becoming increasingly widely used, both within and outside the Department
2223 of Defense.
2224 .pp
2225 The message handling system \fIMH\fR was developed for two reasons.
2226 One was to investigate some
2227 research ideas concerning how a message system might take advantage of
2228 the architecture of the UNIX time-sharing operating system for
2229 Digital Equipment Corporation PDP-11 and VAX computers, and the special
2230 features of UNIX's command-level interface with the user (the
2231 \*(lqshell\*(rq).  The other reason was to provide a better and more
2232 adaptable base than that of conventional designs
2233 on which to build a command and control message system.
2234 The effort has succeeded in both
2235 regards, although this report mainly describes the message system itself
2236 and how it fits in with UNIX.
2237 .pp
2238 The present report should be of interest to three groups of readers.  First,
2239 it is a complete reference manual for the users of \fIMH\fR.
2240 Second, it should be
2241 of interest to those who have a general knowledge of computer-based
2242 message systems, both in civilian and military applications.  Finally,
2243 it should be of interest to those who build large subsystems that
2244 interface with users, since it illustrates a new approach to such
2245 interfaces.
2246 .pp
2247 The original \fIMH\fR system was developed by Bruce Borden,
2248 using an approach suggested by Stockton Gaines and Norman Shapiro.
2249 Valuable assistance was provided by Phyllis Kantar in the later
2250 stages of the system's implementation.
2251 Several colleagues
2252 contributed to the ideas included in this system, particularly
2253 Robert Anderson and David Crocker.
2254 In addition, valuable experience
2255 in message systems, and a valuable source of ideas, was available
2256 to us in the form of a previous message system for UNIX called
2257 MS, designed at RAND by David Crocker.
2258 .pp
2259 This report was originally prepared as part of the RAND project entitled
2260 \*(lqData Automation Research\*(rq, sponsored by Project AIR FORCE.
2261 .+c SUMMARY
2262 .pp
2263 Electronic communication of text messages is becoming
2264 commonplace.  Computer-based message systems\-software
2265 packages that provide tools for dealing with messages\-are used in many
2266 contexts.  In particular, message systems are becoming
2267 increasingly important in command and control and intelligence
2268 applications.
2269 .pp
2270 This report describes a message handling system called \fIMH\fR.
2271 This system provides the user
2272 with tools to compose, send, receive, store, retrieve, forward, and
2273 reply to messages.  \fIMH\fR has been built on the UNIX time-sharing system,
2274 a popular operating system developed for the DEC PDP-11 and VAX classes of
2275 computers.
2276 .pp
2277 A complete description of \fIMH\fR is given for users of
2278 the system.  For those who do not intend to use the system, this description
2279 gives a general idea of what a message system is like.  The system involves
2280 some new ideas about how large subsystems can be constructed.
2281 .pp
2282 The interesting and unusual features of \fIMH\fR include the
2283 following:  The user command interface to \fIMH\fR is the UNIX \*(lqshell\*(rq
2284 (the standard UNIX command interpreter).  Each separable
2285 component of message handling, such as message composition or
2286 message display, is a separate command.  Each program is driven from
2287 and updates a private user environment, which is stored as a file
2288 between program invocations.  This private environment also contains
2289 information to \*(lqcustom tailor\*(rq \fIMH\fR to the individual's tastes.
2290 \fIMH\fR stores each message as a separate file under UNIX, and it utilizes the
2291 tree-structured UNIX file system to organize groups of files within
2292 separate directories or \*(lqfolders\*(rq.  All of the UNIX facilities
2293 for dealing with files and directories, such as
2294 renaming, copying, deleting, cataloging, off-line printing, etc., are
2295 applicable to messages and directories of messages (folders).  Thus,
2296 important capabilities needed in a message system are available in \fIMH\fR
2297 without the need (often seen in other message systems) for code that
2298 duplicates the facilities of the supporting operating system.
2299 It also allows users familiar with the shell to use \fIMH\fR with minimal
2300 effort.
2301 .he ''''
2302 .fo ''''
2303 .bp
2304 .ce
2305 .b \\s12CONTENTS\\s0
2306 .sp 3
2307 .xp y
2308 .xp x
2309 .bp
2310 .\"     And now the COVER sheet
2311 .po +.325i
2312 .ll 32P
2313 .nf
2314  
2315 .sp 1.5in
2316 .ps 24
2317 .vs 32
2318 .ft B
2319 .ce 4
2320 THE RAND MH
2321 MESSAGE HANDLING
2322 SYSTEM:
2323 USER'S MANUAL
2324 .ft R
2325 .sp .8i
2326 .ps 20
2327 .vs 24
2328 .ce
2329 UCI Version
2330 .sp 0.7i
2331 .ce 2
2332 Marshall T. Rose
2333 John L. Romine
2334 .sp 0.5i
2335 .ce 2
2336 Based on the original manual by
2337 Borden, Gaines, and Shapiro
2338 .vs
2339 .sp 1i
2340 .ps 18
2341 .vs 22
2342 .ce 2
2343 \*(td
2344 \*(MH