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