Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / papers / mh4mm / mh4mm.tex
1 \documentstyle [12pt]{article}
2 \parindent=0pt
3 \parskip=7pt plus 2pt
4
5 \def\oneline#1{\par\bigskip\leftline{\tt\hskip.75in#1}}
6 \def\command#1{\par\bigskip\leftline{\tt\hskip.75in\% #1}}
7 \def\comarg#1#2{\par\bigskip\leftline{\tt\hskip.75in\% #1 {\it#2}}}
8 \def\tcom#1{\par\bigskip\leftline{\tt\hskip.75in@#1}}
9 \def\MH/{{\sf MH}}
10 \def\tops20/{{\sc Tops-20}}
11 \def\unix/{{\sc Unix}}
12 \def\MM/{{\sc mm}}
13 \newfont{\itt}{cmti10}
14 \sloppy
15 \begin{document}
16
17 \title{MH for MM Users}
18 \author{Mary Hegardt \and Tim Morgan}
19 \maketitle
20
21 \section{Introduction}
22
23 This document is another in a continuing series on use of the \MH/ mail
24 system at UCI.  It is intended for those users accustomed to the \MM/ ``user
25 agent'' (mail program) under \tops20/ and who are already familiar with
26 network mail, but who may not be experienced \unix/ users.  For an
27 introduction to \MH/, see ``MH For Beginners'' by Mary
28 Hegardt and Tim Morgan.  For complete, detailed information on the \MH/
29 system, see {\sl The Rand MH Message Handling System: User's Manual\/} by
30 Marshall~T. Rose and John~L. Romine. Both documents are available for
31 Xeroxing in suite CS408.
32
33 \subsection{UNIX Versus Tops-20}
34
35 The \unix/\footnote{\unix/ is a trademark of AT\&T Bell Laboratories}
36 paradigm is that each command, or program, should perform only one
37 function.  An extension of this idea is that the operating system
38 implements only those functions which are necessary, but it does so in
39 a very general way so that programs may still accomplish their functions.
40 This philosophy probably evolved because the original versions
41 of \unix/ ran on PDP-11 minicomputers which had only a small memory
42 space for each process.
43
44 Consequently, all commands in \unix/, with a very few exceptions, are
45 in actuality programs.  On \tops20/, in contrast, many of the most frequently
46 used commands are built into the user's shell, or {\em exec.}  Both the
47 Exec and {\it csh,} which is typically the user's command interface on
48 \unix/, will accept and parse command lines, attempting to invoke a command
49 as a program if it is not one of the built-in commands.  \unix/ and \tops20/
50 are surprisingly similar internally: the use of the shell, separate
51 processes for each command or program to execute, standard input and output
52 for each program, and many other ideas are common to both operating
53 systems.  Users should be familiar with the capabilities of the shell,
54 which is described in the document ``Introduction to the Csh.''
55
56 \subsection{The MH User Interface}
57
58 The \MH/ mail ``user agent'' is different from most other mail systems.
59 \MM/, for example, is a {\em monolithic\/} system because one program
60 implements all the mail-related functions.  The disadvantages of monolithic
61 systems are that (a)~they are large, so they tend to put more burden on the
62 computer system, and (b)~they allow for much less flexibility.  In contrast,
63 \MH/ implements each mail command as a separate program: there is no single
64 program called {\it mh.}  This approach facilitates interspersing mail
65 commands with other, perhaps unrelated, commands.
66
67 Another unique feature of \MH/ is that it takes advantage of the facilities
68 provided by the operating system.  Most mail agents, such as \MM/, maintain
69 a file containing the user's mail in a special, usually undocumented, format.
70 When a message is deleted, \MM/ must take care of compacting the mail file.
71 It must be able to distinguish the separate messages contained in the file.
72 \MM/ must also implement a simple text editor to allow the user to enter
73 and modify a message while it is being composed.
74 These functions are essentially those provided by the operating system when
75 separate files are stored within a directory.  Therefore, the approach
76 taken by \MH/ is that
77 each message is kept in a separate file.  This file simply contains the
78 message, with no other special formatting characters or requirements.
79 All the messages are stored within a normal \unix/ directory.  This approach
80 makes it easy to add new \MH/ commands, to edit messages using standard
81 text editors, etc.
82
83 All your \MH/ related files are stored in a directory within your home
84 directory.  Usually this directory is called {\tt Mail} or {\tt mhbox},
85 although you are free to name it as you choose.  Another file in your home
86 directory called \verb|.mh_profile| is equivalent to the {\tt MM.INIT} file
87 under \MM/.  It contains all the options which you prefer for the various
88 \MH/ commands.  It also contains the name of the \MH/ directory and the
89 name that you want on your outgoing mail in the {\tt From:} field (your
90 ``{\em signature\/}'').
91
92 \section{Getting Started}
93
94 \subsection{Incorporating Mail}
95
96 Another important difference between \MM/ and \MH/ is the concept of the
97 {\em maildrop\/} file.  Under \tops20/, the mail transport system delivers
98 new messages directly into the recipient's {\tt MAIL.TXT} file, where they may
99 then be processed with \MM/.  In contrast, the \unix/ mail transport system,
100 called {\it MMDF-II,} makes no assumptions about the user agent used by the
101 recipient.  Instead, it puts all new mail into a special file called the
102 {\em maildrop.}  This file is in the \verb|/usr/spool/mail| directory.
103 When you log in, if there is new mail for you in your
104 maildrop, you will be so notified by the message
105
106         \oneline{You have new ZOTnet mail -- type inc (or mail)}
107
108 When you are ready to process this new mail, you may type the command
109
110         \command{inc}
111
112 (``incorporate'') which will copy the new mail into separate files, one per
113 message, stored in your ``inbox'' folder.  A folder is a subdirectory
114 beneath your \MH/ directory which is used to store related messages.
115 Additional information on folders is given in Section~\ref{Folders},
116 page~\pageref{Folders}.  The
117 ``inbox'' is a distinguished folder because by default {\it inc\/} will
118 always copy new mail into that folder, removing it from the maildrop.
119
120 If this is the first time you have used {\it inc\/} or any other \MH/
121 command, the {\it mh-install\/} program  will inform you that it is
122 creating your {\tt Mail} directory. It will also create
123 the ``inbox'' folder directory, and \verb|.mh_profile|.  
124
125 \subsection{Message Numbers}\label{Scan}
126
127 As {\it inc\/} processes each message, it prints a ``scan'' listing showing
128 the message number, the date the message was sent,
129 the name of the sender, the subject, and sometimes the initial part of the
130 text of the message.  A ``scan'' listing is thus similar to the output of
131 the {\tt HEADERS} command in \MM/.  Each message within a folder is given a
132 number, starting with 1, by which it can be referenced.  {\it
133 Inc\/} will display the numbers assigned to each new message in its ``scan''
134 listing.
135
136 As in \MM/, there is a ``current message'' number which usually identifies the
137 message most recently manipulated by the user.  With most \MH/ commands,
138 this will be the default message if no messages are explicitly specified in
139 a command.  {\it Inc\/} makes the first new message the current message,
140 which is indicated by a ``{\tt+}'' character in the scan listing, just after
141 the message number.
142
143 Many \MH/ commands take a list of messages to process. A message designation
144 is either a single message number, two message numbers separated by a dash.
145 The dash format indicates a range of messages including the endpoints. A
146 message list consists of one or more message designations separated by
147 spaces. For example, messages 11 through 15 and message 17 may be indicated
148 by typing
149
150         \oneline{11-15 17}
151
152 as the argument to some command.  There are also several predefined names
153 for messages or lists of messages which may be used in place of message
154 numbers:
155
156 \bigskip
157 \begingroup\parskip=0pt
158 \def\titem[#1]{\par\hangafter=1\hangindent=.7in\noindent
159         \hbox to\hangindent{\it\hfil#1\qquad}\ignorespaces}
160
161 \titem[cur] The current message (the last one that was handled).  Equivalent
162   to ``.'' or ``{\tt CURRENT}'' in \MM/.
163 \titem[next] The next message 
164 \titem[prev] The previous message
165 \titem[first] The first message in the current folder.
166 \titem[last] The last message in the folder.  Equivalent to {\tt\%} or
167   {\tt*} in \MM/.
168 \titem[all] All messages ($\it first-last$).  Same as in \MM/.
169 \endgroup
170
171 It is also possible for you to define your own named {\em sequences\/} of
172 messages.  See the {\it pick\/} command description for more details.
173
174 \section{Processing Messages}
175
176 This section contains a list of the common \MM/ commands and their
177 equivalents in the in \MH/ mail system.  A short textual note describes how
178 the \MH/ commands differ from their \MM/ counterparts.
179
180 \subsection{Listing Messages}
181
182 As mentioned in Section~\ref{Scan},
183 the {\it scan\/} command may be used to summarize the
184 messages in a folder, similar to the {\tt HEADERS} command in \MM/.  Unlike
185 most \MH/ commands, however, {\it scan\/} defaults to {\em all\/} the
186 messages in the current folder unless you specify one or messages on the
187 command line to be scanned.  So simply typing
188
189         \command{scan}
190
191 is equivalent to typing {\tt HEADERS ALL} (or {\tt H A}) in \MM/.
192
193 \subsection{Reading Mail}
194
195 Unlike the {\tt READ} command in \MM/, in \MH/ there is no special
196 mail-reading mode (indicated in \MM/ by the {\tt R>} prompt).
197 The command to read messages in \MH/ is {\it show.} If no message list is
198 specified, then the current message is displayed.  The message is displayed
199 by your ``showproc'', as specified in the \verb|.mh_profile|, described
200 in Section~\ref{Tailoring}.
201 Normally, your ``showproc'' will be {\it more\/} or {\it mhless.}
202 Both of these programs will display your messages one screenful at a time.
203 You press the \fbox{space bar} on your terminal to see the next screenful,
204 or the \fbox{return} key to see the next line.
205
206 The command
207
208         \command{show next}
209
210 (which will display the first message following the current message in the
211 current folder) can be abbreviated as simply
212
213         \command{next}
214
215 Similarly, the command ``{\tt show prev}'' can be abbreviated as simply ``{\tt
216 prev}''.
217
218 To get a paper copy of a mail message, take the output from the {\it show\/}
219 command and pipe it into the {\it imprint\/} command.
220
221         \command{show 5 | imprint}
222
223 See the manual page for {\it imprint\/} for more information.
224
225
226 \subsection{Deleting Messages}
227
228 The equivalent of the {\tt DELETE} command in \MM/ is {\it rmm\/} in \MH/
229 (remove messages).  It acts on the current message unless messages are
230 specified on the command line. Unlike \MM/, the deleted messages will
231 no longer show up in a ``scan'' listing. But the messages are not 
232 completely removed; they are renamed to have a comma
233 prepended to the name of the file containing the message within its folder
234 directory.  Therefore, if you need to recover a message, it is possible to
235 go into the directory and rename the message back.  Be careful in doing this
236 not to overwrite a new message with the same message number!  It is a \unix/
237 convention that files whose names begin with a comma will be removed from
238 disk ({\em expunged\/}) early each morning. Therefore, your deleted
239 messages will be available for the rest of the day, unless you remove another
240 message subsequently which has the same message.  Then the previously deleted
241 message is gone.
242
243 \subsection{Replying to Mail}
244
245 The equivalent of the {\tt REPLY} command in \MM/ is {\it repl\/} in \MH/.
246 {\it Repl\/} may be given the number of the message to which you wish to
247 reply, or it will default to the current message.  When replying in \MM/,
248 you are prompted asking if you wish to reply to all the recipients of the
249 message to which you are replying, or only to its sender.  In \MH/, normally
250 the reply will be constructed to be sent to all the recipients.  You may
251 select which recipients receive copies of your reply by using the {\tt
252 -query} option on {\it repl,} or by putting this option in your
253 \verb|.mh_profile|, as described in Section~\ref{Tailoring}. If you
254 wish a reply to go to everyone but yourself, you can 
255 use \verb|repl -nocc me|.
256
257 \subsection{Sending Mail}
258
259 The equivalent of the {\tt SEND} \MM/ command is {\it comp\/} (``compose'')
260 in \MH/.  These two commands are fairly similar, except that the recipient of
261 the message cannot be specified on the {\it comp\/} command line.
262 The {\it comp\/} program invokes a simple editor called {\it prompter\/}
263 which will prompt you for the {\tt To:}, {\tt Cc:},
264 and {\tt Subject:} fields of the message.  Then a line of dashes is typed,
265 and you may enter the body of your message (its {\em text,} in \MM/ terms).
266 When you are finished, type \fbox{ctrl}--D (equivalent to typing \fbox{ESC} or
267 control-Z in \MM/).  Then you'll receive the prompt
268
269         \oneline{What now?}
270
271 which is similar to \MM/'s {\tt S>} prompt.  You may receive a list of the
272 options that you have at this point by typing ``{\tt?}'' followed by
273 \fbox{return}.  Here is a short list of the options and their meanings.
274 Notice that, unlike \MM/, there are very few commands to modify the message
275 (such as the {\tt TEXT}, {\tt TO}, {\tt CC}, etc., commands which may be
276 typed at the {\tt S>} prompt in \MM/).  In place of these commands, you use
277 the {\tt edit} command to invoke your favorite text editor on the message,
278 and you use it to make the equivalent changes.  You also use your editor
279 to include other files into the body of the message, rather than using
280 control-B, as in \MM/.  One additional use of the {\tt edit} command is
281 for spelling checking.  In \MM/, you may use the command {\tt SPELL} 
282 for this purpose.  
283 In \MH/, you type ``{\tt edit spell}''\footnote{ Actually, any
284 program named after the ``{\tt edit}'' command will be invoked with
285 whatever arguments you have given and a path to the file containing
286 the message you are editing.} instead.  This will
287 cause the spelling checker to be run, giving you a list of the possibly
288 misspelled words in your message.
289
290 \bigskip
291
292 \begingroup
293 \def\titem[#1]{\par\hangafter=1\hangindent=1.4in\noindent
294         \hbox to\hangindent{\hfil#1\qquad}\ignorespaces}
295
296 \titem[\tt edit \it editor\/] Edit the message using the specified
297                                 editor.  When you exit, you will be
298                                 back at \verb|What now?|.
299
300 \titem[\tt list] Shows the message you just typed
301
302 \titem[\tt whom -check] Verifies that the addresses you have
303                                 used are valid as far as our system
304                                 can tell
305
306 \titem[\tt send] Sends the message to the recipients
307
308 \titem[\tt push] Sends the message in the background
309
310 \titem[\tt quit] Quits without sending the message.
311                                 Saves the text of the message as
312                                 a ``draft''. Type \verb|comp -use| to
313                                 get back to that draft later.
314
315 \titem[\tt quit -delete] Quit, throwing away the draft
316 \endgroup
317
318 \bigskip
319
320 \subsection{Forwarding Mail}
321
322 The {\it forw\/} command is used in \MH/ to forward messages.  It will take
323 a list of messages on the command line to be forwarded, or it will default
324 to the current message if none are specified.  It will prompt you like {\it
325 comp\/} does for the {\tt To:}, {\tt Cc:}, and {\tt Subject:}\ fields.  Note
326 that, unlike \MM/'s {\tt FORWARD} command, {\it forw\/} will not construct a
327 subject line automatically.  Also as with {\it comp,} you will have the
328 opportunity to add additional text to the message(s) which you are
329 forwarding, ended with a control-D.  
330
331 \subsection{Resending Mail}
332
333 The equivalent of the {\tt RESEND} command in \MM/ is the {\it dist\/}
334 (``distribute'') command in \MH/.  {\it Dist\/} works very much like the
335 {\it forw\/} command, except that the prompts will be {\tt Resend-To:},
336 {\tt Resend-Cc:}, etc. After filling in the headers, a line of dashes
337 is typed giving the impression that additional text can be entered.
338 Nothing could be further from the truth; if you add any text at this
339 point the {\it dist\/} will fail.  Your only opportunity to add text
340 is in the {\tt Resend-Note:} field.
341
342 \section{Advanced Topics}
343
344 \subsection{Selecting Messages}
345
346 In \MM/, you may use several reserved command words to select messages
347 in place of an explicit list of message numbers.  For example, you can
348 type ``{\tt DELETE FROM SMITH}'' to remove all the messages from a user named
349 ``Smith''.  Rather than building such a capability into each \MH/ program
350 which can process message lists, a special program called {\it pick\/} is
351 used instead.  Just as there are predefined sequences of messages, such as
352 ``{\tt all}'', ``{\tt cur}'', etc., you may use {\it pick\/} to define your
353 own sequences.  {\it Pick\/} is capable of selecting messages from a folder
354 based on the {\tt To:}, {\tt From:}, {\tt Subject:}, {\tt Cc:}, or {\tt
355 Date:} fields, or by searching the body of the message.  The patterns to be
356 searched for may include full regular expressions (see the ``man'' page for
357 {\it ed(1)\/} for more information) or simple strings.
358
359 {\it Pick\/} may be used in one of two ways.  First, it may output the
360 sequence of message numbers which match the search parameters.  Using the
361 backquoting mechanism of the shell, these message numbers may then become
362 the arguments to other \MH/ programs.  The second way to use {\it pick\/} is
363 to have it define a new sequence name which will be the messages which were
364 selected.  Only this second method of using {\it pick\/} will be described
365 here; see {\it pick(l)\/} if you wish to use the first method.
366
367 In your \verb|.mh_profile|, add the line
368
369         \oneline{pick: -seq sel}
370
371 Then each time you use the {\it pick\/} command, it will define the
372 resulting sequence of messages to be called ``sel''.  Then to ``pick'' all
373 the messages in the current folder which are from ``Smith'', just type
374
375         \command{pick -from smith}
376
377 To see a summary of those messages, type
378
379         \command{scan sel}
380
381 Then to the remove the messages, type the command
382
383         \command{rmm sel}
384
385 You can {\it pick\/} messages according to any of the headers ({\tt -to
386 -from -subj -cc {\rm or} -date}) or just search all the messages for a given
387 word ({\tt -search}).
388
389 \subsection{Customizing Your Mail Environment}\label{Tailoring}
390
391 In \MM/, you use the {\tt PROFILE} command to tailor your mail environment.
392 This command writes a file called {\tt MM.INIT} in your home directory which
393 is then read by subsequent executions of \MM/.  In the \MH/ system, the file
394 \verb|.mh_profile| serves the same purpose.  It is edited with any normal
395 text editor, rather than using a special-purpose command to modify it.  The
396 format of the file is line oriented, one line per \MH/ program or \MH/
397 option to be set.  The only required line in the profile is the name of the
398 primary \MH/ mail directory, which is by default {\tt Mail}. This
399 information is specified by the line
400
401         \oneline{Path: Mail}
402
403 The textual name you would like to have on your outgoing mail is specified
404 by the {\tt Signature:} line.  For example,
405
406         \oneline{Signature: Mary Hegardt}
407
408 The BBoards which you like to read should also be listed in the
409 \verb|.mh_profile| (see Section~\ref{BBoards}, page~\pageref{BBoards}, for
410 additional information).  For example, if you read the ``system'' BBoard
411 (where all important announcements are posted), as well as ``whimsey''
412 and ``imagen-users'' BBoards, your \verb|.mh_profile| should contain the line
413
414         \oneline{bboards: system whimsey imagen-users}
415
416 Other options may be specified on a per-program basis.  The format for these
417 lines is the same.  First, the program name is given followed by a colon.
418 Then any flags which are to be the default options for that program are
419 given.  Here is a short list of the most common options which you may want
420 to set in your \verb|.mh_profile|:
421
422         \oneline{showproc: mhless}
423
424 The {\it showproc\/} is the program used to show messages to you.  By
425 default, it is the {\it more\/} command.  {\it Mhless\/} is the same as
426 {\it more\/} except that it omits the headers of the messages which you
427 indicate that you wish not to see.  Type
428
429         \command{man mhless}
430
431 for more information about this program.
432
433         \oneline{msh: -scan}
434
435 Selecting this option causes an automatic scan of new messages on BBoards to be
436 made when reading BBoards with {\it bbc,} similar to the scan listing
437 produced by {\it inc.}
438
439         \oneline{repl: -query}
440
441 causes {\it repl\/} to ask for each address in the message being replied to
442 if it should be included in the {\tt To:} or {\tt Cc:} fields of the reply
443 being composed.
444
445         \oneline{pick: -seq sel}
446
447 This line will cause messages ``picked'' by the {\it pick\/} command to be
448 put into a sequence named ``sel''.  This sequence name may then be used
449 just as the built-in sequences (``last'', ``first'', etc.).
450
451 \subsection{Aliases}
452
453 Using \MH/, you may specify your own private mail aliases.  This feature
454 allows you to store lists of addresses or long internet addresses of people
455 with whom you frequently correspond in one file, and then to address them
456 using short mnemonic names.  Typically, you will call your alias file ``{\tt
457 aliases}''; it must be stored in your \MH/ directory.  The format of this
458 file is simple. The alias is given, followed by a colon, followed by one or
459 more legal mail addresses separated by commas.  For example, you might for
460 some reason have an alias for all the users named ``Rose'' in the ICS
461 department:
462
463         \oneline{roses: prose, srose, mrose, drose}
464
465 In addition to your ``{\tt aliases}'' file, you will need to modify your
466 \verb|.mh_profile| in order to use aliases.  You should add the flag
467 ``{\tt -alias aliases}'' to the entries for the commands {\it ali, whom,
468 send,} and {\it push,} creating entries for these programs if they aren't
469 already in your \verb|.mh_profile|.
470 Now, messages addressed to ``{\tt roses}'' will be distributed to all
471 the people listed in the alias.
472
473 The {\it ali\/} command is used to show you what an alias expands to.
474 You just type
475
476         \comarg{ali}{alias}
477
478 and {\it ali\/} will respond with the expansion of the {\it alias.}  {\it
479 Ali\/} searches the system aliases file in addition to your private ones.
480
481 \subsection{Blind Lists}
482
483 There are two different types of so-called ``blind addressing'' of messages.
484 Users of \MM/ may already be familiar with the ``Blind Carbon Copy'', or
485 {\tt BCC:} field.  It allows you to add recipients to your message just
486 like those who are CC'd, but the normal recipients will not see that the
487 BCC recipients were copied on the message, their replies will not go to the
488 blind recipients, and the blind recipients cannot (easily) reply to the
489 message.
490
491 The second type of blind mailing is actually called a ``group address list'',
492 although it is commonly referred to as a ``blind list''.
493 The format of this type of address is
494
495         \oneline{{\it phrase\/}: {\it address\_list\/};}
496
497 where the ``{\it phrase\/}'' is any English phrase of one or more words,
498 and the {\it address\_list\/} consists of one or more addresses separated by
499 commas.  The recipients of a message addressed in this fashion will
500 see simply
501
502         \oneline{{\it phrase\/}: ;}
503
504 so when they reply to the message, their reply will come only to the sender
505 (or the {\tt Reply-To:} field, if one was specified), rather than going to
506 all the recipients of the original list. For example, to use a group
507 address list for the ``{\tt roses}'' alias you would type:
508
509         \oneline{To: People Named Rose: roses;}
510
511 This type of group address is very
512 useful for making up lists of related people, such as all the people working
513 on a particular research project.
514
515 \subsection{Folders}\label{Folders}
516
517 As mentioned previously, folders are directories within your \MH/ directory
518 used to store related messages.  There is no equivalent of the folder
519 concept in the \MM/ system. Usually, you will use only the folder ``inbox'',
520 so you won't have to worry about folders.  However, if you process a large
521 volume of mail, then folders become invaluable in managing the messages
522 which you wish to keep for future reference.
523
524 Just as there is a ``current message,'' \MH/ maintains a ``current folder,''
525 which will normally be ``inbox''.  You can change folders either by
526 specifying the folder on the command line of \MH/ programs which take a
527 list of messages as an argument, or by using the {\tt folder} command:
528
529         \command{folder +{\it folder\_name}}
530
531 In general, the folder name is indicated by a ``{\tt+}'' sign followed
532 immediately by the folder name, all preceeding any list of messages. For
533 example, you may read the most recent message in a folder called
534 ``job\_offers'' using the command
535
536         \command{show +job\_offers last}
537
538 This command will have the side-effect of setting the current folder to be
539 ``job\_offers''. You may move messages from the current folder into the
540 ``job\_offers'' folder using the command
541
542         \comarg{refile +job\_offers}{messages}
543
544 where, as usual, the {\it messages\/} list will default to the current
545 message in the current folder if none are specified.  Note that, in contrast
546 with the {\it show\/} command and most other \MH/ commands, the {\it
547 messages\/} are {\em not\/} considered to be in the folder ``job\_offers''.
548 You may obtain a summary of all your folders by typing the command
549
550         \command{folders}
551
552 When you remove messages from a folder using the {\it rmm\/} command,
553 the deleted messages will show up as a ``hole'' in the message numbering.
554 The command
555
556         \command{folder -pack}
557
558 will cause all the messages within one folder to be renumbered starting
559 with~1. Similarly, the command
560
561         \command{folders -pack}
562
563 will do the same thing for all your folders.
564
565 To remove an empty folder, use the command
566
567         \command{rmf +{\it folder}}
568
569 \subsection{Reading BBoards}\label{BBoards}
570
571 Two special-purpose programs are utilized in reading BBoards.  The first is
572 {\it bbc,} which is used to check a list of BBoards for new messages.
573 The list of messages may be given on the command line, or if not, it will be
574 taken from the {\tt BBoards:} list in your \verb|.mh_profile|.  You may
575 obtain a list of all the available BBoards by typing the command
576
577         \command{bbc -topics}
578
579 For each BBoard with unseen messages, {\it bbc\/} will invoke the \MH/
580 shell, {\it msh,} whose prompt is
581
582         \oneline{(msh)}
583
584 The {\it msh\/} program allows you to read BBoard mail as if it were normal
585 messages in one of your folders.  Almost all the \MH/ commands will work
586 just as the normally do.  Typing the command ``{\tt quit}'' to {\it msh\/}
587 causes it to stop reading the current BBoard and go on to the next one
588 containing unseen messages, or to exit if there are no more such BBoards.
589 Typing control-D causes {\it msh\/} to exit unconditionally.  The command
590 {\tt mark} followed by a message number causes {\it msh\/} to act as if you
591 have seen that message and all previous ones.
592
593 \subsection{Checking for Mail}
594
595 Under \unix/, there are about a dozen different ways to check for new mail.
596 The easiest way to do it is to set the {\it csh\/} variable named ``mail''
597 to tell {\it csh\/} to check for new mail for you periodically.  To do this,
598 add the line
599
600         \oneline{set mail=(60 /usr/spool/mail/\$USER)}
601
602 to your {\tt .login} file in your home directory.  This command says to
603 check for mail if {\it csh\/} is about to prompt you with a {\tt\%} sign,
604 and if it has been at least 60 seconds since it last checked for mail.
605 The advantage of this method of mail notification, besides simplicity, is
606 that you will never be interrupted by a mail notification.  You will only be
607 notified of new mail when you are between commands, when the shell is about to
608 prompt you.
609
610 If you desire asynchronous mail notification, which will print to your
611 terminal regardless of what you are currently doing, you may make use of a
612 ``Receive Mail Hook'' called ``rcvtty''.  To do this, create a file in your
613 home directory called ``{\tt .maildelivery}''.  In this file, put the line
614
615         \oneline{* - pipe R /usr/uci/lib/mh/rcvtty}
616
617 Then each time new mail arrives, you will receive a one-line ``scan''
618 listing of the mail if your terminal is world-writable. For more information
619 on ``maildelivery'' files, type:
620
621         \command{man 5 maildelivery}
622
623
624 \subsection{Saving Drafts}
625
626 Normally when you use {\it comp,} it creates the message being composed in a
627 file called ``{\tt draft}'' in your \MH/ directory. If you use the ``{\tt
628 quit}'' option at the ``{\tt What now?}'' prompt, this file will remain
629 there.  You may later use the command
630
631         \command{comp -use}
632
633 to resume composing the message.
634
635 If you begin composing a new message and there is already a ``draft'' file,
636 you will be asked for the disposition of this file.  Typing {\tt?}
637 \fbox{return} will give you a list of the options at this point.  Normally
638 you will either {\tt replace} (delete) the old draft and begin
639 a new one or {\tt use} the old one.
640
641 The {\tt -file} switch to {\it comp\/} may be used to specify the name of a
642 draft other than ``{\tt draft}''.  For example, one might type
643
644         \command{comp -file mary}
645
646 to begin composing a message maintained in the draft file ``{\tt mary}''.
647 Typing
648
649         \command{comp -file mary -use}
650
651 would cause {\it comp\/} to resume composing this same draft after a
652 ``{\tt quit}'' command to the ``{\tt What now?}'' prompt.
653
654 Very advanced users of \MH/ maintain multiple draft files in a {\it draft
655 folder.}  This is a normal folder which holds all your drafts, rather than
656 having just one draft in your \MH/ directory named ``{\tt draft}''.  If you
657 feel that you need to use draft folders, you should consult the {\sl MH
658 User's Manual\/} for additional information.
659
660 \end{document}