📄 mh4mm.tex
字号:
\documentstyle [12pt]{article}\parindent=0pt\parskip=7pt plus 2pt\def\oneline#1{\par\bigskip\leftline{\tt\hskip.75in#1}}\def\command#1{\par\bigskip\leftline{\tt\hskip.75in\% #1}}\def\comarg#1#2{\par\bigskip\leftline{\tt\hskip.75in\% #1 {\it#2}}}\def\tcom#1{\par\bigskip\leftline{\tt\hskip.75in@#1}}\def\MH/{{\sf MH}}\def\tops20/{{\sc Tops-20}}\def\unix/{{\sc Unix}}\def\MM/{{\sc mm}}\newfont{\itt}{cmti10}\sloppy\begin{document}\title{MH for MM Users}\author{Mary Hegardt \and Tim Morgan}\maketitle\section{Introduction}This document is another in a continuing series on use of the \MH/ mailsystem at UCI. It is intended for those users accustomed to the \MM/ ``useragent'' (mail program) under \tops20/ and who are already familiar withnetwork mail, but who may not be experienced \unix/ users. For anintroduction to \MH/, see ``MH For Beginners'' by MaryHegardt and Tim Morgan. For complete, detailed information on the \MH/system, see {\sl The Rand MH Message Handling System: User's Manual\/} byMarshall~T. Rose and John~L. Romine. Both documents are available forXeroxing in suite CS408.\subsection{UNIX Versus Tops-20}The \unix/\footnote{\unix/ is a trademark of AT\&T Bell Laboratories}paradigm is that each command, or program, should perform only onefunction. An extension of this idea is that the operating systemimplements only those functions which are necessary, but it does so ina very general way so that programs may still accomplish their functions.This philosophy probably evolved because the original versionsof \unix/ ran on PDP-11 minicomputers which had only a small memoryspace for each process.Consequently, all commands in \unix/, with a very few exceptions, arein actuality programs. On \tops20/, in contrast, many of the most frequentlyused commands are built into the user's shell, or {\em exec.} Both theExec and {\it csh,} which is typically the user's command interface on\unix/, will accept and parse command lines, attempting to invoke a commandas a program if it is not one of the built-in commands. \unix/ and \tops20/are surprisingly similar internally: the use of the shell, separateprocesses for each command or program to execute, standard input and outputfor each program, and many other ideas are common to both operatingsystems. Users should be familiar with the capabilities of the shell,which is described in the document ``Introduction to the Csh.''\subsection{The MH User Interface}The \MH/ mail ``user agent'' is different from most other mail systems.\MM/, for example, is a {\em monolithic\/} system because one programimplements all the mail-related functions. The disadvantages of monolithicsystems are that (a)~they are large, so they tend to put more burden on thecomputer system, and (b)~they allow for much less flexibility. In contrast,\MH/ implements each mail command as a separate program: there is no singleprogram called {\it mh.} This approach facilitates interspersing mailcommands with other, perhaps unrelated, commands.Another unique feature of \MH/ is that it takes advantage of the facilitiesprovided by the operating system. Most mail agents, such as \MM/, maintaina file containing the user's mail in a special, usually undocumented, format.When a message is deleted, \MM/ must take care of compacting the mail file.It must be able to distinguish the separate messages contained in the file.\MM/ must also implement a simple text editor to allow the user to enterand modify a message while it is being composed.These functions are essentially those provided by the operating system whenseparate files are stored within a directory. Therefore, the approachtaken by \MH/ is thateach message is kept in a separate file. This file simply contains themessage, with no other special formatting characters or requirements.All the messages are stored within a normal \unix/ directory. This approachmakes it easy to add new \MH/ commands, to edit messages using standardtext editors, etc.All your \MH/ related files are stored in a directory within your homedirectory. Usually this directory is called {\tt Mail} or {\tt mhbox},although you are free to name it as you choose. Another file in your homedirectory called \verb|.mh_profile| is equivalent to the {\tt MM.INIT} fileunder \MM/. It contains all the options which you prefer for the various\MH/ commands. It also contains the name of the \MH/ directory and thename that you want on your outgoing mail in the {\tt From:} field (your``{\em signature\/}'').\section{Getting Started}\subsection{Incorporating Mail}Another important difference between \MM/ and \MH/ is the concept of the{\em maildrop\/} file. Under \tops20/, the mail transport system deliversnew messages directly into the recipient's {\tt MAIL.TXT} file, where they maythen be processed with \MM/. In contrast, the \unix/ mail transport system,called {\it MMDF-II,} makes no assumptions about the user agent used by therecipient. Instead, it puts all new mail into a special file called the{\em maildrop.} This file is in the \verb|/usr/spool/mail| directory.When you log in, if there is new mail for you in yourmaildrop, you will be so notified by the message \oneline{You have new ZOTnet mail -- type inc (or mail)}When you are ready to process this new mail, you may type the command \command{inc}(``incorporate'') which will copy the new mail into separate files, one permessage, stored in your ``inbox'' folder. A folder is a subdirectorybeneath your \MH/ directory which is used to store related messages.Additional information on folders is given in Section~\ref{Folders},page~\pageref{Folders}. The``inbox'' is a distinguished folder because by default {\it inc\/} willalways copy new mail into that folder, removing it from the maildrop.If this is the first time you have used {\it inc\/} or any other \MH/command, the {\it mh-install\/} program will inform you that it iscreating your {\tt Mail} directory. It will also createthe ``inbox'' folder directory, and \verb|.mh_profile|. \subsection{Message Numbers}\label{Scan}As {\it inc\/} processes each message, it prints a ``scan'' listing showingthe message number, the date the message was sent,the name of the sender, the subject, and sometimes the initial part of thetext of the message. A ``scan'' listing is thus similar to the output ofthe {\tt HEADERS} command in \MM/. Each message within a folder is given anumber, starting with 1, by which it can be referenced. {\itInc\/} will display the numbers assigned to each new message in its ``scan''listing.As in \MM/, there is a ``current message'' number which usually identifies themessage most recently manipulated by the user. With most \MH/ commands,this will be the default message if no messages are explicitly specified ina command. {\it Inc\/} makes the first new message the current message,which is indicated by a ``{\tt+}'' character in the scan listing, just afterthe message number.Many \MH/ commands take a list of messages to process. A message designationis either a single message number, two message numbers separated by a dash.The dash format indicates a range of messages including the endpoints. Amessage list consists of one or more message designations separated byspaces. For example, messages 11 through 15 and message 17 may be indicatedby typing \oneline{11-15 17}as the argument to some command. There are also several predefined namesfor messages or lists of messages which may be used in place of messagenumbers:\bigskip\begingroup\parskip=0pt\def\titem[#1]{\par\hangafter=1\hangindent=.7in\noindent \hbox to\hangindent{\it\hfil#1\qquad}\ignorespaces}\titem[cur] The current message (the last one that was handled). Equivalent to ``.'' or ``{\tt CURRENT}'' in \MM/.\titem[next] The next message \titem[prev] The previous message\titem[first] The first message in the current folder.\titem[last] The last message in the folder. Equivalent to {\tt\%} or {\tt*} in \MM/.\titem[all] All messages ($\it first-last$). Same as in \MM/.\endgroupIt is also possible for you to define your own named {\em sequences\/} ofmessages. See the {\it pick\/} command description for more details.\section{Processing Messages}This section contains a list of the common \MM/ commands and theirequivalents in the in \MH/ mail system. A short textual note describes howthe \MH/ commands differ from their \MM/ counterparts.\subsection{Listing Messages}As mentioned in Section~\ref{Scan},the {\it scan\/} command may be used to summarize themessages in a folder, similar to the {\tt HEADERS} command in \MM/. Unlikemost \MH/ commands, however, {\it scan\/} defaults to {\em all\/} themessages in the current folder unless you specify one or messages on thecommand line to be scanned. So simply typing \command{scan}is equivalent to typing {\tt HEADERS ALL} (or {\tt H A}) in \MM/.\subsection{Reading Mail}Unlike the {\tt READ} command in \MM/, in \MH/ there is no specialmail-reading mode (indicated in \MM/ by the {\tt R>} prompt).The command to read messages in \MH/ is {\it show.} If no message list isspecified, then the current message is displayed. The message is displayedby your ``showproc'', as specified in the \verb|.mh_profile|, describedin Section~\ref{Tailoring}.Normally, your ``showproc'' will be {\it more\/} or {\it mhless.}Both of these programs will display your messages one screenful at a time.You press the \fbox{space bar} on your terminal to see the next screenful,or the \fbox{return} key to see the next line.The command \command{show next}(which will display the first message following the current message in thecurrent folder) can be abbreviated as simply \command{next}Similarly, the command ``{\tt show prev}'' can be abbreviated as simply ``{\ttprev}''.To get a paper copy of a mail message, take the output from the {\it show\/}command and pipe it into the {\it imprint\/} command. \command{show 5 | imprint}See the manual page for {\it imprint\/} for more information.\subsection{Deleting Messages}The equivalent of the {\tt DELETE} command in \MM/ is {\it rmm\/} in \MH/(remove messages). It acts on the current message unless messages arespecified on the command line. Unlike \MM/, the deleted messages willno longer show up in a ``scan'' listing. But the messages are not completely removed; they are renamed to have a commaprepended to the name of the file containing the message within its folderdirectory. Therefore, if you need to recover a message, it is possible togo into the directory and rename the message back. Be careful in doing thisnot to overwrite a new message with the same message number! It is a \unix/convention that files whose names begin with a comma will be removed fromdisk ({\em expunged\/}) early each morning. Therefore, your deletedmessages will be available for the rest of the day, unless you remove anothermessage subsequently which has the same message. Then the previously deletedmessage is gone.\subsection{Replying to Mail}The equivalent of the {\tt REPLY} command in \MM/ is {\it repl\/} in \MH/.{\it Repl\/} may be given the number of the message to which you wish toreply, or it will default to the current message. When replying in \MM/,you are prompted asking if you wish to reply to all the recipients of themessage to which you are replying, or only to its sender. In \MH/, normallythe reply will be constructed to be sent to all the recipients. You mayselect which recipients receive copies of your reply by using the {\tt-query} option on {\it repl,} or by putting this option in your\verb|.mh_profile|, as described in Section~\ref{Tailoring}. If youwish a reply to go to everyone but yourself, you can use \verb|repl -nocc me|.\subsection{Sending Mail}The equivalent of the {\tt SEND} \MM/ command is {\it comp\/} (``compose'')in \MH/. These two commands are fairly similar, except that the recipient ofthe message cannot be specified on the {\it comp\/} command line.The {\it comp\/} program invokes a simple editor called {\it prompter\/}which will prompt you for the {\tt To:}, {\tt Cc:},and {\tt Subject:} fields of the message. Then a line of dashes is typed,and you may enter the body of your message (its {\em text,} in \MM/ terms).When you are finished, type \fbox{ctrl}--D (equivalent to typing \fbox{ESC} orcontrol-Z in \MM/). Then you'll receive the prompt \oneline{What now?}which is similar to \MM/'s {\tt S>} prompt. You may receive a list of theoptions that you have at this point by typing ``{\tt?}'' followed by\fbox{return}. Here is a short list of the options and their meanings.Notice that, unlike \MM/, there are very few commands to modify the message(such as the {\tt TEXT}, {\tt TO}, {\tt CC}, etc., commands which may betyped at the {\tt S>} prompt in \MM/). In place of these commands, you usethe {\tt edit} command to invoke your favorite text editor on the message,and you use it to make the equivalent changes. You also use your editorto include other files into the body of the message, rather than usingcontrol-B, as in \MM/. One additional use of the {\tt edit} command isfor spelling checking. In \MM/, you may use the command {\tt SPELL} for this purpose. In \MH/, you type ``{\tt edit spell}''\footnote{ Actually, anyprogram named after the ``{\tt edit}'' command will be invoked withwhatever arguments you have given and a path to the file containingthe message you are editing.} instead. This willcause the spelling checker to be run, giving you a list of the possiblymisspelled words in your message.\bigskip\begingroup\def\titem[#1]{\par\hangafter=1\hangindent=1.4in\noindent \hbox to\hangindent{\hfil#1\qquad}\ignorespaces}\titem[\tt edit \it editor\/] Edit the message using the specified editor. When you exit, you will be back at \verb|What now?|.\titem[\tt list] Shows the message you just typed\titem[\tt whom -check] Verifies that the addresses you have used are valid as far as our system can tell\titem[\tt send] Sends the message to the recipients\titem[\tt push] Sends the message in the background\titem[\tt quit] Quits without sending the message. Saves the text of the message as a ``draft''. Type \verb|comp -use| to get back to that draft later.\titem[\tt quit -delete] Quit, throwing away the draft\endgroup\bigskip\subsection{Forwarding Mail}The {\it forw\/} command is used in \MH/ to forward messages. It will takea list of messages on the command line to be forwarded, or it will defaultto the current message if none are specified. It will prompt you like {\itcomp\/} does for the {\tt To:}, {\tt Cc:}, and {\tt Subject:}\ fields. Notethat, unlike \MM/'s {\tt FORWARD} command, {\it forw\/} will not construct asubject line automatically. Also as with {\it comp,} you will have theopportunity to add additional text to the message(s) which you areforwarding, ended with a control-D. \subsection{Resending Mail}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -