home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / riscbsd / 1_1_contri / usd / 08_mh / mh_me < prev    next >
Encoding:
Text File  |  1986-04-24  |  73.5 KB  |  2,288 lines

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