_d_i_s_c_a_r_d _t_h_i_s _p_a_g_e The RAND _M_H Message Handling System: User's Manual UCI Version December 14, 1992 6.6 #1[UCI] _1. _I_N_T_R_O_D_U_C_T_I_O_N Although people can travel cross-country in hours and can reach others by telephone in seconds, communications still depend heavily upon paper, most of which is distributed through the mails. There are several major reasons for this continued dependence on written documents. First, a written document may be proofread and corrected prior to its distribution, giving the author complete control over his words. Thus, a written document is better than a telephone conversation in this respect. Second, a carefully written document is far less likely to be misinterpreted or poorly translated than a phone conversation. Third, a signature offers reasonable verification of authorship, which cannot be provided with media such as telegrams. However, the need for fast____, accurate, and reproducible document distribution is obvious. One solution in widespread use is the telefax. Another that is rapidly gaining popularity is electronic mail. Elec- tronic mail is similar to telefax in that the data to be sent are digi- tized, transmitted via phone lines, and turned back into a document at the receiver. The advantage of electronic mail is in its compression factor. Whereas a telefax must scan a page in very fine lines and send all of the black and white information, electronic mail assigns charac- ters fixed codes which can be transmitted as a few bits of information. Telefax presently has the advantage of being able to transmit an arbi- trary page, including pictures, but electronic mail is beginning to deal with this problem. Electronic mail also integrates well with current directions in office automation, allowing documents prepared with sophisticated equipment at one site to be quickly transferred and printed at another site. Currently, most electronic mail is intraorganizational, with mail transfer remaining within one computer. As computer networking becomes more common, however, it is becoming more feasible to communicate with anyone whose computer can be linked to your own via a network. The pioneering efforts on general-purpose electronic mail were by organizations using the DoD ARPAnet[1]. The capability to send messages between computers existed before the ARPAnet was developed, but it was used only in limited ways. With the advent of the ARPAnet, tools began to be developed which made it convenient for individuals or organiza- tions to distribute messages over broad geographic areas, using diverse computer facilities. The interest and activity in message systems has now reached such proportions that steps have been taken within the DoD to coordinate and unify the development of military message systems. The use of electronic mail is expected to increase dramatically in the next few years. The utility of such systems in the command and control and intelligence environments is clear, and applications in these areas -2- will probably lead the way. As the costs for sending and handling elec- tronic messages continue their rapid decrease, such uses can be expected to spread rapidly into other areas and, of course, will not be limited to the DoD. A message system provides tools that help users (individuals or organizations) deal with messages in various ways. Messages must be composed, sent, received, stored, retrieved, forwarded, and replied to. Today's best interactive computer systems provide a variety of word- processing and information handling capabilities. The message handling facilities should be well integrated with the rest of the system, so as to be a graceful extension of overall system capability. The message system described in this report, _M_H, provides most of the features that can be found in other message systems and also incor- porates some new ones. It has been built on the UNIX time-sharing sys- tem[2], a popular operating system for the DEC PDP-11[1] and VAX-11 classes of computers. A "secure" operating system similar to UNIX is currently being developed[3], and that system will also run _M_H. This report provides a complete description of _M_H and thus may serve as a user's manual, although parts of the report will be of interest to non-users as well. Sections 2 and 3, the Overview and Tutorial, present the key ideas of _M_H and will give those not familiar with message systems an idea of what such systems are like. _M_H consists of a set of commands which use some special files and conventions. The final section is divided into three parts. The first part covers the information a user needs to know in addition to the com- mands. Then, each of the _M_H commands is described in detail. Finally, other obscure details are revealed. A summary of the commands is given in Appendix A, and the syntax of message sequences is given in Appendix B. A novel approach has been taken in the design of _M_H. Instead of creating a large subsystem that appears as a single command to the user (such as MS[4]), _M_H is a collection of separate commands which are run as separate programs. The file and directory system of UNIX are used directly. Messages are stored as individual files (datasets), and col- lections of them are grouped into directories. In contrast, most other message systems store messages in a complicated data structure within a monolithic file. With the _M_H approach, UNIX commands can be interleaved with commands invoking the functions of the message handler. Con- versely, existing UNIX commands can be used in connection with messages. For example, all the usual UNIX editing, text-formatting, and printing facilities can be applied directly to individual messages. MH, there- fore, consists of a relatively small amount of new code; it makes exten- sive use of other UNIX software to provide the capabilities found in [1] PDP and VAX are trademarks of Digital Equipment Corporation. -3- other message systems. _2. _O_V_E_R_V_I_E_W There are three main aspects of _M_H : the way messages are stored (the message database), the user's profile (which directs how certain actions of the message handler take place), and the commands for dealing with messages. Under _M_H, each message is stored as a separate file. A user can take any action with a message that he could with an ordinary file in UNIX. A UNIX directory in which messages are stored is called a folder. Each folder contains some standard entries to support the message- handling functions. The messages in a folder have numerical names. These folders (directories) are entries in a particular directory path, described in the user profile, through which _M_H can find message fold- ers. Using the UNIX "link" facility, it is possible for one copy of a message to be "filed" in more than one folder, providing a message index facility. Also, using the UNIX tree-structured file system, it is pos- sible to have a folder within a folder, nested arbitrarily deep, and have the full power of the _M_H commands available. Each user of _M_H has a user profile, a file in his $HOME (initial login) directory called ._m_h__p_r_o_f_i_l_e. This profile contains several pieces of information used by the _M_H commands: a path name to the direc- tory that contains the message folders and parameters that tailor _M_H commands to the individual user's requirements. There is also another file, called the user context, which contains information concerning which folder the user last referenced (the "current" folder). It also contains most of the necessary state information concerning how the user is dealing with his messages, enabling _M_H to be implemented as a set of individual UNIX commands, in contrast to the usual approach of a monol- ithic subsystem. In _M_H, incoming mail is appended to the end of a file in a system spooling area for the user. This area is called the mail drop direc- tory, and the file is called the user's mail drop. Normally when the user logins in, s/he is informed of new mail (or the _M_H program _m_s_g_c_h_k may be run). The user adds the new messages to his/her collection of _M_H messages by invoking the command _i_n_c. The _i_n_c (incorporate) command adds the new messages to a folder called "inbox", assigning them names which are consecutive integers starting with the next highest integer available in inbox. _i_n_c also produces a _s_c_a_n summary of the messages thus incorporated. A folder can be compacted into a single file, for easy storage, by using the _p_a_c_k_f command. Also, messages within a folder can be sorted by date and time with the _s_o_r_t_m command. There are four commands for examining the messages in a folder: _s_h_o_w, _p_r_e_v, _n_e_x_t, and _s_c_a_n. The _s_h_o_w command displays a message in a -4- -5- folder, _p_r_e_v displays the message preceding the current message, and _n_e_x_t displays the message following the current message. _M_H lets the user choose the program that displays individual messages. A special program, _m_h_l, can be used to display messages according to the user's preferences. The _s_c_a_n command summarizes the messages in a folder, nor- mally producing one line per message, showing who the message is from, the date, the subject, etc. The user may move a message from one folder to another with the command _r_e_f_i_l_e. Messages may be removed from a folder by means of the command _r_m_m. In addition, a user may query what the current folder is and may specify that a new folder become the current folder, through the command _f_o_l_d_e_r. All folders may be summarized with the _f_o_l_d_e_r_s command. A message folder (or subfolder) may be removed by means of the command _r_m_f. A set of messages based on content may be selected by use of the command _p_i_c_k. This command searches through messages in a folder and selects those that match a given set of criteria. These messages are then bound to a "sequence" name for use with other _M_H commands. The _m_a_r_k command manipulates these sequences. There are five commands enabling the user to create new messages and send them: _c_o_m_p, _d_i_s_t, _f_o_r_w, _r_e_p_l, and _s_e_n_d. The _c_o_m_p command pro- vides the facility for the user to compose a new message; _d_i_s_t redistri- butes mail to additional addressees; _f_o_r_w enables the user to forward messages; and _r_e_p_l facilitates the generation of a reply to an incoming message. The last three commands may optionally annotate the original message. Messages may be arbitrarily annotated with the _a_n_n_o command. Once a draft has been constructed by one of the four above composition programs, a user-specifiable program is run to query the user as to the disposition of the draft prior to sending. _M_H provides the simple _w_h_a_t_- _n_o_w program to start users off. If a message is not sent directly by one of these commands, it may be sent at a later time using the command _s_e_n_d. _M_H allows the use of any UNIX editor when composing a message. For rapid entry, a special editor, _p_r_o_m_p_t_e_r, is provided. For programs, a special mail-sending program, _m_h_m_a_i_l, is provided. _M_H supports a personal aliasing facility which gives users the capability to considerably shorten address typein and use meaningful names for addresses. The _a_l_i program can be used to query _M_H as to the expansion of a list of aliases. After composing a message, but prior to sending, the _w_h_o_m command can be used to determine exactly who a message would go to. _M_H provides a natural interface for telling the user's shell the names of _M_H messages and folders. The _m_h_p_a_t_h program achieves this capability. Finally, _M_H supports the UCI BBoards facility. _b_b_c can be used to query the status of a group of BBoards, while _m_s_h can be used to read them. The _b_u_r_s_t command can be used to "shred" digests of messages into -6- individual messages. All of the elements summarized above are described in more detail in the following sections. Many of the normal facilities of UNIX pro- vide additional capabilities for dealing with messages in various ways. For example, it is possible to print messages on the line-printer without requiring any additional code within _M_H . Using standard UNIX facilities, any terminal output can be redirected to a file for repeated or future viewing. In general, the flexibility and capabilities of the UNIX interface with the user are preserved as a result of the integra- tion of _M_H into the UNIX structure. _3. _T_U_T_O_R_I_A_L This tutorial provides a brief introduction to the _M_H commands. It should be sufficient to allow the user to read his mail, do some simple manipulations of it, and create and send messages. A message has two major pieces: the header and the body. The body consists of the text of the message (whatever you care to type in). It follows the header and is separated from it by an empty line. (When you compose a message, the form that appears on your terminal shows a line of dashes after the header. This is for convenience and is replaced by an empty line when the message is sent.) The header is composed of several components, including the subject of the message and the person to whom it is addressed. Each component starts with a name and a colon; components must not start with a blank. The text of the component may take more than one line, but each continuation line must start with a blank. Messages typically have "To:", "cc:", and "Subject:" components. When composing a message, you should include the "To:" and "Subject:" components; the "cc:" (for people you want to send copies to) is not necessary. The basic _M_H commands are _i_n_c, _s_c_a_n, _s_h_o_w, _n_e_x_t, _p_r_e_v, _r_m_m, _c_o_m_p, and _r_e_p_l. These are described below. _i_n_c When you get the message "You have mail", type the command _i_n_c. You will get a "scan listing" such as: 7+ 7/13 Cas revival of measurement work 8 10/ 9 Norm NBS people and publications 9 11/26 To:norm question < _x will copy the message to file x. _s_h_o_w | _l_p_r will print the message, using the _l_p_r command. _n_e_x_t will show the message that follows the current message. _p_r_e_v will show the message previous to the current message. _r_m_m will remove the current message. _r_m_m _3 will remove message 3. _c_o_m_p The _c_o_m_p command puts you in the editor to write or edit a message. Fill in or delete the "To:", "cc:", and "Subject:" fields, as appropri- ate, and type the body of the message. Then exit normally from the edi- tor. You will be asked "What now?". Type a carriage return to see the options. Typing send will cause the message to be sent; typing quit will cause an exit from _c_o_m_p, with the message draft saved. If you quit without sending the message, it will be saved in a file called /Mail/draft (where is your $HOME directory). You can resume editing the message later with "comp -use"; or you can send the message later, using the _s_e_n_d command. _c_o_m_p -_e_d_i_t_o_r _p_r_o_m_p_t_e_r This command uses a different editor and is useful for preparing "quick and dirty" messages. It prompts you for each component of the header. Type the information for that component, or type a carriage return to omit the component. After that, type the body of the message. Backspacing is the only form of editing allowed with this editor. When the body is complete, type a carriage return followed by (usually ). This completes the initial preparation of the message; from then on, use the same procedures as with _c_o_m_p (above). _r_e_p_l _r_e_p_l n This command makes up an initial message form with a header that is appropriate for replying to an existing message. The message being -9- answered is the current message if no message number is mentioned, or n if a number is specified. After the header is completed, you can finish the message as in _c_o_m_p (above). This is enough information to get you going using _M_H. There are more commands, and the commands described here have more features. Sub- sequent sections explain _M_H in complete detail. The system is quite powerful if you want to use its sophisticated features, but the forego- ing commands suffice for sending and receiving messages. There are numerous additional capabilities you may wish to explore. For example, the _p_i_c_k command will select a subset of messages based on specified criteria such as sender and/or subject. Groups of messages may be designated, as described in Sec. IV, under Message Naming. The file ._m_h__p_r_o_f_i_l_e can be used to tailor your use of the message system to your needs and preferences, as described in Sec. IV, under The User Pro- file. In general, you may learn additional features of the system selectively, according to your requirements, by studying the relevant sections of this manual. There is no need to learn all the details of the system at once. _4. _D_E_T_A_I_L_E_D _D_E_S_C_R_I_P_T_I_O_N This section describes the _M_H system in detail, including the com- ponents of the user profile, the conventions for message naming, and some of the other _M_H conventions. Readers who are generally familiar with computer systems will be able to follow the principal ideas, although some details may be meaningful only to those familiar with UNIX. _T_H_E _U_S_E_R _P_R_O_F_I_L_E The first time an _M_H command is issued by a new user, the system prompts for a "Path" and creates an _M_H "profile". Each _M_H user has a profile which contains tailoring information for each individual program. Other profile entries control the _M_H path (where folders and special files are kept), folder and message protec- tions, editor selection, and default arguments for each _M_H program. Each user of _M_H also has a context file which contains current state information for the _M_H package (the location of the context file is kept in the user's _M_H directory, or may be named in the user profile). When a folder becomes the current folder, it is recorded in the user's con- text. (Other state information is kept in the context file, see the manual entry for _m_h-_p_r_o_f_i_l_e (5) for more details.) In general, the term "profile entry" refer to entries in either the profile or context file. Users of _M_H needn't worry about the distinction, _M_H handles these things automatically. The _M_H profile is stored in the file ._m_h__p_r_o_f_i_l_e in the user's $HOME directory[1]. It has the format of a message without any body. That is, each profile entry is on one line, with a keyword followed by a colon (:) followed by text particular to the keyword. => _T_h_i_s _f_i_l_e _m_u_s_t _n_o_t _h_a_v_e _b_l_a_n_k _l_i_n_e_s. The keywords may have any combination of upper and lower case. (See the information of _m_h-_m_a_i_l later on in this manual for a description of mes- sage formats.) For the average _M_H user, the only profile entry of importance is "Path". Path specifies a directory in which _M_H folders and certain files such as "draft" are found. The argument to this keyword must be a legal UNIX path that names an existing directory. If this path is not absolute (i.e., does not begin with a / ), it will be presumed to start [1] By defining the envariable $MH, you can specify an alternate pro- file to be used by _M_H commands. -10- -11- from the user's $HOME directory. All folder and message references within _M_H will relate to this path unless full path names are used. Message protection defaults to 644, and folder protection to 711. These may be changed by profile entries "Msg-Protect" and "Folder- Protect", respectively. The argument to these keywords is an octal number which is used as the UNIX file mode[2]. When an _M_H program starts running, it looks through the user's pro- file for an entry with a keyword matching the program's name. For exam- ple, when _c_o_m_p is run, it looks for a "comp" profile entry. If one is found, the text of the profile entry is used as the default switch set- ting until all defaults are overridden by explicit switches passed to the program as arguments. Thus the profile entry "comp: -form standard.list" would direct _c_o_m_p to use the file "standard.list" as the message skeleton. If an explicit form switch is given to the _c_o_m_p command, it will override the switch obtained from the profile. In UNIX, a program may exist under several names, either by linking or aliasing. The actual invocation name is used by an _M_H program when scanning for its profile defaults[3]. Thus, each _M_H program may have several names by which it can be invoked, and each name may have a dif- ferent set of default switches. For example, if _c_o_m_p is invoked by the name _i_c_o_m_p, the profile entry "icomp" will control the default switches for this invocation of the _c_o_m_p program. This provides a powerful definitional facility for commonly used switch settings. The default editor for editing within _c_o_m_p, _r_e_p_l, _f_o_r_w, and _d_i_s_t, is usually _p_r_o_m_p_t_e_r, but might be something else at your site, such as /_u_s_r/_u_c_b/_e_x or /_b_i_n/_e. A different editor may be used by specifying the profile entry "Editor: ". The argument to "Editor" is the name of an executable program or shell command file which can be found via the user's $PATH defined search path, excluding the current directory. The "Editor:" profile specification may in turn be overridden by a `-editor ' profile switch associated with _c_o_m_p, _r_e_p_l, _f_o_r_w, or _d_i_s_t. Finally, an explicit editor switch specified with any of these four commands will have ultimate precedence. During message composition, more than one editor may be used. For example, one editor (such as _p_r_o_m_p_t_e_r ) may be used initially, and a [2] See _c_h_m_o_d (1) in the _U_N_I_X _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l [5]. [3] Unfortunately, the shell does not preserve aliasing information when calling a program, hence if a program is invoked by an alias dif- ferent than its name, the program will examine the profile entry for it's name, not the alias that the user invoked it as. The correct solu- tion is to create a (soft) link in your $_H_O_M_E/_b_i_n directory to the _M_H program of your choice. By giving this link a different name, you can use an alternate set of defaults for the command. -12- second editor may be invoked later to revise the message being composed (see the discussion of _c_o_m_p in Section 5 for details). A profile entry "-next: " specifies the name of the editor to be used after a particular editor. Thus "comp: -e prompter" causes the initial text to be collected by _p_r_o_m_p_t_e_r, and the profile entry "prompter-next: ed" names ed as the editor to be invoked for the next round of editing. Some of the _M_H commands, such as _s_h_o_w, can be used on message fold- ers owned by others, if those folders are readable. However, you cannot write in someone else's folder. All the _M_H command actions not requir- ing write permission may be used with a "read-only" folder. Table 1 lists examples of some of the currently defined profile entries, typical arguments, and the programs that reference the entries. -13- Table 1 PROFILE COMPONENTS ______________________________________________________ _M_H Programs that Keyword and Argument use Component______________________________________________________ Path: Mail All Current-Folder: inbox Most Editor: /usr/ucb/ex _c_o_m_p, _d_i_s_t, _f_o_r_w, _r_e_p_l Inbox: inbox _i_n_c, _r_m_f Msg-Protect: 644 _i_n_c Folder-Protect: 711 _i_n_c, _p_i_c_k, _r_e_f_i_l_e : default switches All prompter-next: ed _c_o_m_p, _d_i_s_t, _f_o_r_w, _r_e_p_l ______________________________________________________ Path should______ be present. Current-Folder is maintained automatically by many _M_H commands (see the Context sections of the individual commands in Sec. IV). All other entries are optional, defaulting to the values described above. _M_E_S_S_A_G_E _N_A_M_I_N_G Messages may be referred to explicitly or implicitly when using _M_H commands. A formal syntax of message names is given in Appendix B, but the following description should be sufficient for most _M_H users. Some details of message naming that apply only to certain commands are included in the description of those commands. Most of the _M_H commands accept arguments specifying one or more folders, and one or more messages to operate on. The use of the word "msg" as an argument to a command means that exactly one message name may be specified. A message name may be a number, such as 1, 33, or 234, or it may be one of the "reserved" message names: first, last, prev, next, and cur. (As a shorthand, a period (.) is equivalent to cur.) The meanings of these names are straightforward: "first" is the first message in the folder; "last" is the last message in the folder; "prev" is the message numerically previous to the current message; "next" is the message numerically following the current message; "cur" (or ".") is the current message in the folder. In addition, _M_H supports user-defined-sequences; see the description of the _m_a_r_k command for more information. The default in commands that take a "msg" argument is always "cur". The word "msgs" indicates that several messages may be specified. Such a specification consists of several message designations separated by spaces. A message designation is either a message name or a message -14- range. A message range is a specification of the form name1-name2 or name1:n, where name1 and name2 are message names and n is an integer. The first form designates all the messages from name1 to name2 inclusive; this must be a non-empty range. The second form specifies up to n messages, starting with name1 if name1 is a number, or first, cur, or next, and ending with name1 if name1 is last or prev. This interpre- tation of n is overridden if n is preceded by a plus sign or a minus sign; +n always means up to n messages starting with name1, and -n always means up to n messages ending with name1. Repeated specifica- tions of the same message have the same effect as a single specification of the message. Examples of specifications are: 1 5 7-11 22 first 6 8 next first-10 last:5 The message name "all" is a shorthand for "first-last", indicating all of the messages in the folder. In commands that accept "msgs" arguments, the default is either cur or all, depending on which makes more sense. In all of the _M_H commands, a plus sign preceding an argument indi- cates a folder name. Thus, "+inbox" is the name of the user's standard inbox. If an explicit folder argument is given to an _M_H command, it will become the current folder (that is, the "Current-Folder:" entry in the user's profile will be changed to this folder). In the case of the _r_e_f_i_l_e command, which can have multiple output folders, a new source folder (other than the default current folder) is specified by `-src +folder'. _O_T_H_E_R _M_H _C_O_N_V_E_N_T_I_O_N_S One very powerful feature of _M_H is that the _M_H commands may be issued from any current directory, and the proper path to the appropri- ate folder(s) will be taken from the user's profile. If the _M_H path is not appropriate for a specific folder or file, the automatic prepending of the _M_H path can be avoided by beginning a folder or file name with /, or with ./ or ../ component. Thus any specific absolute path may be specified along with any path relative to the current working directory. Arguments to the various programs may be given in any order, with the exception of a few switches whose arguments must follow immediately, such as `-src +folder' for _r_e_f_i_l_e. Whenever an _M_H command prompts the user, the valid options will be listed in response to a . (The first of the listed options is the default if end-of-file is encountered, such as from a command file.) -15- A valid response is any _u_n_i_q_u_e abbreviation of one of the listed options. Standard UNIX documentation conventions are used in this report to describe _M_H command syntax. Arguments enclosed in brackets ([ ]) are optional; exactly one of the arguments enclosed within braces ({ }) must be specified, and all other arguments are required. The use of ellipsis dots (...) indicates zero or more repetitions of the previous item. For example, "+folder ..." would indicate that one or more "+folder" argu- ments is required and "[+folder ...]" indicates that 0 or more "+folder" arguments may be given. _M_H departs from UNIX standards by using switches that consist of more than one character, e.g. `-header'. To minimize typing, only a unique abbreviation of a switch need be typed; thus, for `-header', `-hea' is probably sufficient, depending on the other switches the com- mand accepts. Each _M_H program accepts the switch `-help' (which must be spelled out fully) and produces a syntax description and a list of switches. In the list of switches, parentheses indicate required char- acters. For example, all `-help' switches will appear as "-(help)", indicating that no abbreviation is accepted. Furthermore, the `-help' switch tells the version of the _M_H program you invoked. Many _M_H switches have both on and off forms, such as `-format' and `-noformat'. In many of the descriptions which follow, only one form is defined; the other form, often used to nullify profile switch settings, is assumed to be the opposite. -16- _M_H _C_O_M_M_A_N_D_S The _M_H package comprises several programs: ali (1) - list mail aliases anno (1) - annotate messages bbc (1) - check on BBoards bboards (1) - the UCI BBoards facility burst (1) - explode digests into messages comp (1) - compose a message dist (1) - redistribute a message to additional addresses folder (1) - set/list current folder/message folders (1) - list all folders forw (1) - forward messages inc (1) - incorporate new mail mark (1) - mark messages mhl (1) - produce formatted listings of MH messages mhmail (1) - send or read mail mhook (1) - MH receive-mail hooks mhparam (1) - print MH profile components mhpath (1) - print full pathnames of MH messages and folders msgchk (1) - check for messages msh (1) - MH shell (and BBoard reader) next (1) - show the next message packf (1) - compress a folder into a single file pick (1) - select messages by content prev (1) - show the previous message prompter (1) - prompting editor front end rcvstore (1) - incorporate new mail asynchronously refile (1) - file messages in other folders repl (1) - reply to a message rmf (1) - remove folder rmm (1) - remove messages scan (1) - produce a one line per message scan listing send (1) - send a message show (1) - show (list) messages slocal (1) - special local mail delivery sortm (1) - sort messages vmh (1) - visual front-end to MH whatnow (1) - prompting front-end for send whom (1) - report to whom a message would go These programs are described below. The form of the descriptions conforms to the standard form for the description of UNIX commands. ALI(1) -17- ALI(1) _N_A_M_E ali - list mail aliases _S_Y_N_O_P_S_I_S ali [-alias aliasfile] [-list] [-nolist] [-normalize] [-nonormalize] [-user] [-nouser] aliases ... [-help] _D_E_S_C_R_I_P_T_I_O_N _A_l_i searches the named mail alias files for each of the given _a_l_i_a_s_e_s. It creates a list of addresses for those _a_l_i_a_s_e_s, and writes that list on standard output. If the `-list' option is specified, each address appears on a separate line; otherwise, the addresses are separated by commas and printed on as few lines as possible. The `-user' option directs _a_l_i to perform its processing in an inverted fashion: instead of listing the addresses that each given alias expands to, _a_l_i will list the aliases that expand to each given address. If the `-normalize' switch is given, _a_l_i will try to track down the official hostname of the address. The files specified by the profile entry "Aliasfile:" and any addi- tional alias files given by the `-alias aliasfile' switch will be read. Each _a_l_i_a_s is processed as described in _m_h-_a_l_i_a_s (5). _F_i_l_e_s $HOME/.mh_profile The user profile /etc/passwd List of users /etc/group List of groups _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Aliasfile: For a default alias file _S_e_e _A_l_s_o mh-alias(5) _D_e_f_a_u_l_t_s `-alias /usr/bs/mh-6.8/lib/MailAliases' `-nolist' `-nonormalize' `-nouser' _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version ALI(1) -18- ALI(1) _B_u_g_s The `-user' option with `-nonormalize' is not entirely accurate, as it does not replace local nicknames for hosts with their official site names. [mh.6] MH.6.8 UCI version ANNO(1) -19- ANNO(1) _N_A_M_E anno - annotate messages _S_Y_N_O_P_S_I_S anno [+folder] [msgs] [-component field] [-inplace] [-noinplace] [-date] [-nodate] [-text body] [-help] _D_E_S_C_R_I_P_T_I_O_N _A_n_n_o annotates the specified messages in the named folder using the field and body. Annotation is optionally performed by _d_i_s_t, _f_o_r_w, and _r_e_p_l, to keep track of your distribution of, forwarding of, and replies to a message. By using _a_n_n_o, you can perform arbitrary annotations of your own. Each message selected will be annotated with the lines field: date field: body The `-nodate' switch inhibits the date annotation, leaving only the body annotation. The `-inplace' switch causes annotation to be done in place in order to preserve links to the annotated message. The field specified should be a valid 822-style message field name, which means that it should consist of alphanumerics (or dashes) only. The body specified is arbitrary text. If a `-component field' is not specified when _a_n_n_o is invoked, _a_n_n_o will prompt the user for the name of field for the annotation. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder _S_e_e _A_l_s_o dist (1), forw (1), repl (1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to cur `-noinplace' `-date' [mh.6] MH.6.8 UCI version ANNO(1) -20- ANNO(1) _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The first message annotated will become the current message. [mh.6] MH.6.8 UCI version BBC(1) -21- BBC(1) _N_A_M_E bbc - check on BBoards _S_Y_N_O_P_S_I_S bbc [bboards ...] [-topics] [-check] [-read] [-quiet] [-verbose] [-archive] [-noarchive] [-protocol] [-noprotocol] [-mshproc program] [switches for _m_s_h_p_r_o_c] [-rcfile rcfile] [-norcfile] [-file BBoardsfile] [-user BBoardsuser] [-host host] [-help] _D_E_S_C_R_I_P_T_I_O_N _b_b_c is a BBoard reading/checking program that interfaces to the BBoard channel. The _b_b_c program has three action switches which direct its opera- tion: The `-read' switch invokes the _m_s_h program on the named _B_B_o_a_r_d_s. If you also specify the `-archive' switch, then _b_b_c will invoke the _m_s_h program on the archives of the named _B_B_o_a_r_d_s. If no _B_B_o_a_r_d_s are given on the command line, and you specified `-archive', _b_b_c will not read your `bboards' profile entry, but will read the archives of the "system" _B_B_o_a_r_d instead. The `-check' switch types out status information for the named _B_B_o_a_r_d_s. _b_b_c can print one of several messages depending on the status of both the BBoard and the user's reading habits. As with each of these messages, the number given is the item number of the last item placed in the BBoard. This number (which is marked in the messages as the "BBoard-Id") is ever increasing. Hence, when _b_b_c says "n items", it really means that the highest BBoard-Id is "n". There may, or may not actually be "n" items in the BBoard. Some common messages are: BBoard -- n items unseen This message tells how many items the user has not yet seen. When invoked with the `-quiet' switch, this is the only informative line that _b_b_c will possibly print out. BBoard -- empty The BBoard is empty. BBoard -- n items (none seen) The BBoard has items in it, but the user hasn't seen any. BBoard -- n items (all seen) The BBoard is non-empty, and the user has seen everything in it. BBoard -- n items seen out of m The BBoard has at most m-n items that the user has not [mh.6] MH.6.8 UCI version BBC(1) -22- BBC(1) seen. The `-topics' switch directs _b_b_c to print three items about the named _B_B_o_a_r_d_s: it's official name, the number of items present, and the date and time of the last update. If no _B_B_o_a_r_d_s are named, then all BBoards are listed. If the `-verbose' switch is given, more information is output. The `-quiet' switch specifies that _b_b_c should be silent if no _B_B_o_a_r_d_s are found with new information. The `-verbose' switch specifies that _b_b_c is to consider you to be interested in _B_B_o_a_r_d_s that you've already seen everything in. To override the default _m_s_h_p_r_o_c and the profile entry, use the `-mshproc program' switch. Any arguments not understood by _b_b_c are passed to this program. The `-protocol' switch tells _b_b_c that your _m_s_h_p_r_o_c knows about the special _b_b_c protocol for reporting back information. _m_s_h (1), the default _m_s_h_p_r_o_c, knows all about this. The `-file BBoardsfile' switch tells _b_b_c to use a non-standard _B_B_o_a_r_d_s file when performing its calculations. Similarly, the `-user BBoardsuser' switch tells _b_b_c to use a non-standard user- name. Both of these switches are useful for debugging a new _B_B_o_a_r_d_s or _P_O_P file. If the local host is configured as an NNTP BBoards client, or if the `-host host' switch is given, then _b_b_c will query the NNTP ser- vice host as to the status of the BBoards. For NNTP BBoards clients, the `-user user' and the `-rpop' switches are ignored. The ._b_b_r_c file in the user's $HOME directory is used to keep track of what messages have been read. The `-rcfile rcfile' switch over- rides the use of ._b_b_r_c for this purpose. If the value given to the switch is not absolute, (i.e., does not begin with a / ), it will be presumed to start from the current working directory. If this switch is not given (or the `-norcfile' switch is given), then _b_b_c consults the envariable $MHBBRC, and honors it similarly. _F_i_l_e_s $HOME/.mh_profile The user profile $HOME/.bbrc BBoard "current" message information _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory bboards: To specify interesting BBoards mshproc: Program to read a given BBoard _S_e_e _A_l_s_o bbl(1), bboards(1), msh(1) [mh.6] MH.6.8 UCI version BBC(1) -23- BBC(1) _D_e_f_a_u_l_t_s `-read' `-noarchive' `-protocol' `bboards' defaults to "system" `-file /usr/bs/mh-6.8/bboards/BBoards' `-user bboards' _C_o_n_t_e_x_t None _B_u_g_s The `-user' switch takes effect only if followed by the `-file' switch. [mh.6] MH.6.8 UCI version BBOARDS(1) -24- BBOARDS(1) _N_A_M_E bboards - the UCI BBoards facility _S_Y_N_O_P_S_I_S bbc [-check] [-read] bboards ... [-help] _D_E_S_C_R_I_P_T_I_O_N The home directory of _b_b_o_a_r_d_s is where the BBoard system is kept. This documentation describes some of the nuances of the BBoard sys- tem. BBoards, BBoard-IDs A BBoard is just a file containing a group of messages relat- ing to the same topic. These files live in the ~bboards home directory. Each message in a BBoard file has in its header the line "BBoard-Id: n", where "n" is an ascending decimal number. This id-number is unique for each message in a BBoards file. It should NOT be confused with the message number of a message, which can change as messages are removed from the BBoard. BBoard Handling To read BBoards, use the _b_b_c and _m_s_h programs. The _m_s_h com- mand is a monolithic program which contains all the func- tionality of _M_H in a single program. The `-check' switch to _b_b_c lets you check on the status of BBoards, and the `-read' switch tells _b_b_c to invoke _m_s_h to read those BBoards. Creating a BBoard Both public, and private BBoards are supported. Contact the mail address _P_o_s_t_M_a_s_t_e_r if you'd like to have a BBoard created. BBoard addresses Each BBoard has associated with it 4 addresses, these are (for the ficticious BBoard called ``hacks''): hacks : The Internet wide distribution list. dist-hacks : The local BBoard. hacks-request : The people responsible for the BBoard at the Internet level. local-hacks-request : The people responsible for the BBoard locally. _F_i_l_e_s $HOME/.mh_profile The user profile $HOME/.bbrc BBoard information [mh.6] MH.6.8 UCI version BBOARDS(1) -25- BBOARDS(1) _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory bboards: To specify interesting BBoards mshproc: Program to read a given BBoard _S_e_e _A_l_s_o bbc(1), bbl(1), bbleader(1), msh(1) _D_e_f_a_u_l_t_s The default bboard is "system" _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version BURST(1) -26- BURST(1) _N_A_M_E burst - explode digests into messages _S_Y_N_O_P_S_I_S burst [+folder] [msgs] [-inplace] [-noinplace] [-quiet] [-noquiet] [-verbose] [-noverbose] [-help] _D_E_S_C_R_I_P_T_I_O_N _B_u_r_s_t considers the specified messages in the named folder to be Internet digests, and explodes them in that folder. If `-inplace' is given, each digest is replaced by the "table of contents" for the digest (the original digest is removed). _B_u_r_s_t then renumbers all of the messages following the digest in the folder to make room for each of the messages contained within the digest. These messages are placed immediately after the digest. If `-noinplace' is given, each digest is preserved, no table of contents is produced, and the messages contained within the digest are placed at the end of the folder. Other messages are not tam- pered with in any way. The `-quiet' switch directs _b_u_r_s_t to be silent about reporting mes- sages that are not in digest format. The `-verbose' switch directs _b_u_r_s_t to tell the user the general actions that it is taking to explode the digest. It turns out that _b_u_r_s_t works equally well on forwarded messages and blind-carbon-copies as on Internet digests, provided that the former two were generated by _f_o_r_w or _s_e_n_d. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Msg-Protect: To set mode when creating a new message _S_e_e _A_l_s_o _P_r_o_p_o_s_e_d _S_t_a_n_d_a_r_d _f_o_r _M_e_s_s_a_g_e _E_n_c_a_p_s_u_l_a_t_i_o_n (aka RFC-934), inc(1), msh(1), pack(1) [mh.6] MH.6.8 UCI version BURST(1) -27- BURST(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to cur `-noinplace' `-noquiet' `-noverbose' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. If `-in- place' is given, then the first message burst becomes the current message. This leaves the context ready for a _s_h_o_w of the table of contents of the digest, and a _n_e_x_t to see the first message of the digest. If `-noinplace' is given, then the first message extracted from the first digest burst becomes the current message. This leaves the context in a similar, but not identical, state to the context achieved when using `-inplace'. _B_u_g_s The _b_u_r_s_t program enforces a limit on the number of messages which may be _b_u_r_s_t from a single message. This number is on the order of 1000 messages. There is usually no limit on the number of messages which may reside in the folder after the _b_u_r_s_ting. Although _b_u_r_s_t uses a sophisticated algorithm to determine where one encapsulated message ends and another begins, not all digesti- fying programs use an encapsulation algorithm. In degenerate cases, this usually results in _b_u_r_s_t finding an encapsulation boun- dary prematurely and splitting a single encapsulated message into two or more messages. These erroneous digestifying programs should be fixed. Furthermore, any text which appears after the last encapsulated message is not placed in a seperate message by _b_u_r_s_t. In the case of digestified messages, this text is usally an "End of digest" string. As a result of this possibly un-friendly behavior on the part of _b_u_r_s_t, note that when the `-inplace' option is used, this trailing information is lost. In practice, this is not a problem since correspondents usually place remarks in text prior to the first encapsulated message, and this information is not lost. [mh.6] MH.6.8 UCI version COMP(1) -28- COMP(1) _N_A_M_E comp - compose a message _S_Y_N_O_P_S_I_S comp [+folder] [msg] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-file file] [-form formfile] [-use] [-nouse] [-whatnowproc program] [-nowhatnowproc] [-help] _D_E_S_C_R_I_P_T_I_O_N _C_o_m_p is used to create a new message to be mailed. It copies a message form to the draft being composed and then invokes an editor on the draft (unless `-noedit' is given, in which case the initial edit is suppressed). The default message form contains the following elements: To: cc: Subject: -------- If the file named "components" exists in the user's MH directory, it will be used instead of this form. The file specified by `-form formfile' will be used if given. You may also start _c_o_m_p using the contents of an existing message as the form. If you sup- ply either a `+folder' or `msg' argument, that message will be used as the form. You may not supply both a `-form formfile' and a `+folder' or `msg' argument. The line of dashes or a blank line must be left between the header and the body of the message for the message to be identified properly when it is sent (see _s_e_n_d (1)). The switch `-use' directs _c_o_m_p to continue editing an already started message. That is, if a _c_o_m_p (or _d_i_s_t, _r_e_p_l, or _f_o_r_w ) is terminated without sending the draft, the draft can be edited again via "comp -use". If the draft already exists, _c_o_m_p will ask you as to the disposi- tion of the draft. A reply of quit will abort _c_o_m_p, leaving the draft intact; replace will replace the existing draft with the appropriate form; list will display the draft; use will use the draft for further composition; and refile +folder will file the draft in the given folder, and give you a new draft with the appropriate form. (The `+folder' argument to refile is required.) The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. The `-file file' switch says to use the named file as the message draft. [mh.6] MH.6.8 UCI version COMP(1) -29- COMP(1) The `-editor editor' switch indicates the editor to use for the initial edit. Upon exiting from the editor, _c_o_m_p will invoke the _w_h_a_t_n_o_w program. See _w_h_a_t_n_o_w (1) for a discussion of available options. The invocation of this program can be inhibited by using the `-nowhatnowproc' switch. (In truth of fact, it is the _w_h_a_t_n_o_w program which starts the initial edit. Hence, `-nowhatnowproc' will prevent any edit from occurring.) _F_i_l_e_s /usr/bs/mh-6.8/lib/components The message skeleton or /components Rather than the standard skeleton $HOME/.mh_profile The user profile /draft The draft file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Draft-Folder: To find the default draft-folder Editor: To override the default editor Msg-Protect: To set mode when creating a new message (draft) fileproc: Program to refile the message whatnowproc: Program to ask the "What now?" questions _S_e_e _A_l_s_o dist(1), forw(1), repl(1), send(1), whatnow(1), mh-profile(5) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msg' defaults to the current message `-nodraftfolder' `-nouse' _C_o_n_t_e_x_t None _B_u_g_s If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _c_o_m_p uses a built-in _w_h_a_t_n_o_w, it does not actually run the _w_h_a_t_n_o_w program. Hence, if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w since _c_o_m_p won't run it. [mh.6] MH.6.8 UCI version DIST(1) -30- DIST(1) _N_A_M_E dist - redistribute a message to additional addresses _S_Y_N_O_P_S_I_S dist [+folder] [msg] [-annotate] [-noannotate] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-form formfile] [-inplace] [-noinplace] [-whatnowproc program] [-nowhatnowproc] [-help] _D_E_S_C_R_I_P_T_I_O_N _D_i_s_t is similar to _f_o_r_w. It prepares the specified message for redistribution to addresses that (presumably) are not on the origi- nal address list. The default message form contains the following elements: Resent-To: Resent-cc: If the file named "distcomps" exists in the user's MH directory, it will be used instead of this form. In either case, the file speci- fied by `-form formfile' will be used if given. The form used will be prepended to the message being resent. If the draft already exists, _d_i_s_t will ask you as to the disposi- tion of the draft. A reply of quit will abort _d_i_s_t, leaving the draft intact; replace will replace the existing draft with a blank skeleton; and list will display the draft. Only those addresses in "Resent-To:", "Resent-cc:", and "Resent-Bcc:" will be sent. Also, a "Resent-Fcc: folder" will be honored (see _s_e_n_d (1)). Note that with _d_i_s_t, the draft should con- tain only "Resent-xxx:" fields and no body. The headers and the body of the original message are copied to the draft when the mes- sage is sent. Use care in constructing the headers for the redis- tribution. If the `-annotate' switch is given, the message being distributed will be annotated with the lines: Resent: date Resent: addrs where each address list contains as many lines as required. This annotation will be done only if the message is sent directly from _d_i_s_t. If the message is not sent immediately from _d_i_s_t, "comp -use" may be used to re-edit and send the constructed message, but the annotations won't take place. The '-inplace' switch causes annotation to be done in place in order to preserve links to the annotated message. [mh.6] MH.6.8 UCI version DIST(1) -31- DIST(1) See _c_o_m_p (1) for a description of the `-editor' and `-noedit' switches. Note that while in the editor, the message being resent is available through a link named "@" (assuming the default _w_h_a_t_- _n_o_w_p_r_o_c ). In addition, the actual pathname of the message is stored in the envariable $editalt, and the pathname of the folder containing the message is stored in the envariable $mhfolder. The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. Upon exiting from the editor, _d_i_s_t will invoke the _w_h_a_t_n_o_w program. See _w_h_a_t_n_o_w (1) for a discussion of available options. The invoca- tion of this program can be inhibited by using the `-nowhatnowproc' switch. (In truth of fact, it is the _w_h_a_t_n_o_w program which starts the initial edit. Hence, `-nowhatnowproc' will prevent any edit from occurring.) _F_i_l_e_s /usr/bs/mh-6.8/lib/distcomps The message skeleton or /distcomps Rather than the standard skeleton $HOME/.mh_profile The user profile /draft The draft file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Draft-Folder: To find the default draft-folder Editor: To override the default editor fileproc: Program to refile the message whatnowproc: Program to ask the "What now?" questions _S_e_e _A_l_s_o comp(1), forw(1), repl(1), send(1), whatnow(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msg' defaults to cur `-noannotate' `-nodraftfolder' `-noinplace' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The mes- sage distributed will become the current message. [mh.6] MH.6.8 UCI version DIST(1) -32- DIST(1) _H_i_s_t_o_r_y _D_i_s_t originally used headers of the form "Distribute-xxx:" instead of "Resent-xxx:". In order to conform with the ARPA Internet stan- dard, RFC-822, the "Resent-xxx:" form is now used. _D_i_s_t will recognize "Distribute-xxx:" type headers and automatically convert them to "Resent-xxx:". _B_u_g_s _D_i_s_t does not _r_i_g_o_r_o_u_s_l_y check the message being distributed for adherence to the transport standard, but _p_o_s_t called by _s_e_n_d does. The _p_o_s_t program will balk (and rightly so) at poorly formatted messages, and _d_i_s_t won't correct things for you. If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _d_i_s_t uses a built-in _w_h_a_t_n_o_w, it does not actually run the _w_h_a_t_n_o_w program. Hence, if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w since _d_i_s_t won't run it. If your current working directory is not writable, the link named "@" is not available. [mh.6] MH.6.8 UCI version FOLDER(1) -33- FOLDER(1) _N_A_M_E folder, folders - set/list current folder/message _S_Y_N_O_P_S_I_S folder [+folder] [msg] [-all] [-print] [-fast] [-nofast] [-header] [-noheader] [-recurse] [-norecurse] [-total] [-nototal] [-list] [-nolist] [-push] [-pop] [-pack] [-nopack] [-verbose] [-noverbose] [-help] folders _D_E_S_C_R_I_P_T_I_O_N Since the _M_H environment is the shell, it is easy to lose track of the current folder from day to day. When _f_o_l_d_e_r is given the `-print' switch (the default), _f_o_l_d_e_r will list the current folder, the number of messages in it, the range of the messages (low-high), and the current message within the folder, and will flag extra files if they exist. An example of this summary is: inbox+ has 16 messages ( 3- 22); cur= 5. If a `+folder' and/or `msg' are specified, they will become the current folder and/or message. If the specified (or default) folder doesn't exist, the user will be queried as to whether the folder should be created. When standard input is not a tty, the folder is created without any query. (This is the easy way to create an empty folder for use later.) By comparison, when a `+folder' argument is given, this corresponds to a "cd" operation in the _s_h_e_l_l; when no `+folder' argument is given, this corresponds roughly to a "pwd" operation in the _s_h_e_l_l. _M_u_l_t_i_p_l_e _F_o_l_d_e_r_s Specifying `-all' will produce a summary line for each top-level folder in the user's MH directory, sorted alphabetically. (If _f_o_l_d_e_r is invoked by a name ending with "s" (e.g., _f_o_l_d_e_r_s ), `-all' is assumed). Specifying `-recurse' with `-all' will also produce a line for all sub-folders. These folders are all preceded by the read-only folders, which occur as "atr-cur-" entries in the user's _M_H context. For example, [mh.6] MH.6.8 UCI version FOLDER(1) -34- FOLDER(1) Folder # of messages ( range ) cur msg (other files) /fsd/rs/m/tacc has 35 messages ( 1- 35); cur= 23. /rnd/phyl/Mail/EP has 82 messages ( 1-108); cur= 82. ff has no messages. inbox+ has 16 messages ( 3- 22); cur= 5. mh has 76 messages ( 1- 76); cur= 70. notes has 2 messages ( 1- 2); cur= 1. ucom has 124 messages ( 1-124); cur= 6; (others). TOTAL= 339 messages in 7 folders The "+" after inbox indicates that it is the current folder. The "(others)" indicates that the folder `ucom' has files which aren't messages. These files may either be sub-folders, or files that don't belong under the MH file naming scheme. The header is output if either a `-all' or a `-header' switch is specified; it is suppressed by `-noheader'. A `-total' switch will produce only the summary line. If `-fast' is given, only the folder name (or names in the case of `-all') will be listed. (This is faster because the folders need not be read.) If a `+folder' is given along with the `-all' switch, _f_o_l_d_e_r will, in addition to setting the current folder, list the top-level fold- ers for the current folder (with `-norecurse') or list all sub- folders under the current folder recursively (with `-recurse'). In this case, if a `msg' is also supplied, it will become the current message of `+folder'. The `-recurse' switch lists each folder recursively, so use of this option effectively defeats the speed enhancement of the `-fast' option, since each folder must be searched for subfolders. Nevertheless, the combination of these options is useful. _C_o_m_p_a_c_t_i_n_g _a _F_o_l_d_e_r The `-pack' switch will compress the message names in the desig- nated folders, removing holes in message numbering. The `-verbose' switch directs _f_o_l_d_e_r to tell the user the general actions that it is taking to compress the folder. _T_h_e _F_o_l_d_e_r _S_t_a_c_k The `-push' switch directs _f_o_l_d_e_r to push the current folder onto the _f_o_l_d_e_r-_s_t_a_c_k, and make the `+folder' argument the current folder. If `+folder' is not given, the current folder and the top of the _f_o_l_d_e_r-_s_t_a_c_k are exchanged. This corresponds to the "pushd" operation in the _C_S_h_e_l_l. [mh.6] MH.6.8 UCI version FOLDER(1) -35- FOLDER(1) The `-pop' switch directs _f_o_l_d_e_r to discard the top of the _f_o_l_d_e_r-_s_t_a_c_k, after setting the current folder to that value. No `+folder' argument is allowed. This corresponds to the "popd" operation in the _C_S_h_e_l_l. The `-push' switch and the `-pop' switch are mutually exclusive: the last occurrence of either one overrides any previous occurrence of the other. Both of these switches also set `-list' by default. The `-list' switch directs _f_o_l_d_e_r to list the contents of the _f_o_l_d_e_r-_s_t_a_c_k. No `+folder' argument is allowed. After a success- ful `-push' or `-pop', the `-list' action is taken, unless a `-nol- ist' switch follows them on the command line. This corresponds to the "dirs" operation in the _C_S_h_e_l_l. The `-push', `-pop', and `-list' switches turn off `-print'. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Folder-Protect: To set mode when creating a new folder Folder-Stack: To determine the folder stack _S_e_e _A_l_s_o refile(1), mhpath(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msg' defaults to none `-nofast' `-noheader' `-nototal' `-nopack' `-norecurse' `-noverbose' `-print' is the default if no `-list', `-push', or `-pop' is specified `-list' is the default if `-push', or `-pop' is specified _C_o_n_t_e_x_t If `+folder' and/or `msg' are given, they will become the current folder and/or message. [mh.6] MH.6.8 UCI version FOLDER(1) -36- FOLDER(1) _H_i_s_t_o_r_y In previous versions of _M_H, the `-fast' switch prevented context changes from occurring for the current folder. This is no longer the case: if `+folder' is given, then _f_o_l_d_e_r will always change the current folder to that. _B_u_g_s `-all' forces `-header'. [mh.6] MH.6.8 UCI version FORW(1) -37- FORW(1) _N_A_M_E forw - forward messages _S_Y_N_O_P_S_I_S forw [+folder] [msgs] [-annotate] [-noannotate] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-filter filterfile] [-form formfile] [-format] [-noformat] [-inplace] [-noinplace] [-mime] [-nomime] [-whatnowproc program] [-nowhatnowproc] [-help] forw [+folder] [msgs] [-digest list] [-issue number] [-volume number] [other switches for _f_o_r_w] [-help] _D_E_S_C_R_I_P_T_I_O_N _F_o_r_w may be used to prepare a message containing other messages. It constructs the new message from the components file or `-form formfile' (see _c_o_m_p ), with a body composed of the message(s) to be forwarded. An editor is invoked as in _c_o_m_p, and after editing is complete, the user is prompted before the message is sent. The default message form contains the following elements: To: cc: Subject: -------- If the file named "forwcomps" exists in the user's MH directory, it will be used instead of this form. In either case, the file speci- fied by `-form formfile' will be used if given. If the draft already exists, _f_o_r_w will ask you as to the disposi- tion of the draft. A reply of quit will abort _f_o_r_w, leaving the draft intact; replace will replace the existing draft with a blank skeleton; and list will display the draft. If the `-annotate' switch is given, each message being forwarded will be annotated with the lines Forwarded: date Forwarded: addrs where each address list contains as many lines as required. This annotation will be done only if the message is sent directly from _f_o_r_w. If the message is not sent immediately from _f_o_r_w, "comp -use" may be used to re-edit and send the constructed mes- sage, but the annotations won't take place. The '-inplace' switch causes annotation to be done in place in order to preserve links to the annotated message. [mh.6] MH.6.8 UCI version FORW(1) -38- FORW(1) See _c_o_m_p (1) for a description of the `-editor' and `-noedit' switches. Although _f_o_r_w uses the `-form formfile' switch to direct it how to construct the beginning of the draft, the `-filter filterfile', `-format', and `-noformat' switches direct _f_o_r_w as to how each for- warded message should be formatted in the body of the draft. If `-noformat' is specified, then each forwarded message is output exactly as it appears. If `-format' or `-filter filterfile' is specified, then each forwarded message is filtered (re-formatted) prior to being output to the body of the draft. The filter file for _f_o_r_w should be a standard form file for _m_h_l, as _f_o_r_w will invoke _m_h_l to format the forwarded messages. The default message filter (what you get with `-format') is: width=80,overflowtext=,overflowoffset=10 leftadjust,compress,compwidth=9 Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>" From: To: cc: Subject: : body:nocomponent,overflowoffset=0,noleftadjust,nocompress If the file named "mhl.forward" exists in the user's MH directory, it will be used instead of this form. In either case, the file specified by `-filter filterfile' will be used if given. To sum- marize: `-noformat' will reproduce each forwarded message exactly, `-format' will use _m_h_l and a default filterfile, "mhl.forward", to format each forwarded message, and `-filter filterfile' will use the named filterfile to format each forwarded message with _m_h_l. Each forwarded message is separated with an encapsulation delimiter and dashes in the first column of the forwarded messages will be prepended with `- ' so that when received, the message is suitable for bursting by _b_u_r_s_t (1). This follows the Internet RFC-934 guidelines. For users of _p_r_o_m_p_t_e_r (1), by specifying prompter's `-prepend' switch in the .mh_profile file, any commentary text is entered before the forwarded messages. (A major win!) To use the MIME rules for encapsulation, specify the `-mime' switch. This directs _f_o_r_w to generate an _m_h_n composition file. Note that MH will not invoke _m_h_n automatically, unless you add this line to your .mh_profile file: automhnproc: mhn Otherwise, you must specifically give the command [mh.6] MH.6.8 UCI version FORW(1) -39- FORW(1) What now? edit mhn prior to sending the draft. To automate this somewhat, create a link to _p_r_o_m_p_t_e_r called _r_a_p_i_d and put these lines in your .mh_profile file: forw: -editor rapid -mime rapid: -rapid rapid-next: mhn Then, you can simply do: _f_o_r_w _m_s_g_s To: _m_a_i_l_b_o_x cc: Subject: _w_h_a_t_e_v_e_r --------Enter initial text _b_l_a_h, _b_l_a_h, _b_l_a_h. -------- What now? _e_d_i_t What now? _s_e_n_d The _e_d_i_t command invokes _m_h_n automatically. The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. Upon exiting from the editor, _f_o_r_w will invoke the _w_h_a_t_n_o_w program. See _w_h_a_t_n_o_w (1) for a discussion of available options. The invoca- tion of this program can be inhibited by using the `-nowhatnowproc' switch. (In truth of fact, it is the _w_h_a_t_n_o_w program which starts the initial edit. Hence, `-nowhatnowproc' will prevent any edit from occurring.) The `-digest list', `-issue number', and `-volume number' switches implement a digest facility for _M_H. Specifying these switches enables and/or overloads the following escapes: _T_y_p_e _E_s_c_a_p_e _R_e_t_u_r_n_s _D_e_s_c_r_i_p_t_i_o_n _c_o_m_p_o_n_e_n_t _d_i_g_e_s_t string Argument to `-digest' _f_u_n_c_t_i_o_n _c_u_r integer Argument to `-volume' _f_u_n_c_t_i_o_n _m_s_g integer Argument to `-issue' Consult the Advanced Features section of the _M_H User's Manual for more information on making digests. [mh.6] MH.6.8 UCI version FORW(1) -40- FORW(1) _F_i_l_e_s /usr/bs/mh-6.8/lib/forwcomps The message skeleton or /forwcomps Rather than the standard skeleton /usr/bs/mh-6.8/lib/digestcomps The message skeleton if `-digest' is given or /digestcomps Rather than the standard skeleton /usr/bs/mh-6.8/lib/mhl.forward The message filter or /mhl.forward Rather than the standard filter $HOME/.mh_profile The user profile /draft The draft file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Draft-Folder: To find the default draft-folder Editor: To override the default editor Msg-Protect: To set mode when creating a new message (draft) fileproc: Program to refile the message mhlproc: Program to filter messages being forwarded whatnowproc: Program to ask the "What now?" questions _S_e_e _A_l_s_o _P_r_o_p_o_s_e_d _S_t_a_n_d_a_r_d _f_o_r _M_e_s_s_a_g_e _E_n_c_a_p_s_u_l_a_t_i_o_n (aka RFC-934), comp(1), dist(1), repl(1), send(1), whatnow(1), mh-format(5) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to cur `-noannotate' `-nodraftfolder' `-noformat' `-noinplace' `-nomime' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The first message forwarded will become the current message. [mh.6] MH.6.8 UCI version FORW(1) -41- FORW(1) _B_u_g_s If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _f_o_r_w uses a built-in _w_h_a_t_n_o_w, it does not actually run the _w_h_a_t_n_o_w program. Hence, if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w since _f_o_r_w won't run it. When _f_o_r_w is told to annotate the messages it forwards, it doesn't actually annotate them until the draft is successfully sent. If from the _w_h_a_t_n_o_w_p_r_o_c, you _p_u_s_h instead of _s_e_n_d, it's possible to confuse _f_o_r_w by re-ordering the file (e.g., by using `folder -pack') before the message is successfully sent. _D_i_s_t and _r_e_p_l don't have this problem. To avoid prepending the leading dash characters in forwarded mes- sages, there is a `-nodashmunging' option. See the "Hidden Features" section of the _M_H _A_d_m_i_n_i_s_t_r_a_t_o_r'_s _G_u_i_d_e for more details. [mh.6] MH.6.8 UCI version INC(1) -42- INC(1) _N_A_M_E inc - incorporate new mail _S_Y_N_O_P_S_I_S inc [+folder] [-audit audit-file] [-noaudit] [-changecur] [-nochangecur] [-form formatfile] [-format string] [-file name] [-silent] [-nosilent] [-truncate] [-notruncate] [-width columns] [-host host] [-user user] [-apop] [-noapop] [-rpop] [-norpop] [-pack file] [-nopack] [-help] _D_E_S_C_R_I_P_T_I_O_N _I_n_c incorporates mail from the user's incoming mail drop into an _M_H folder. If `+folder' isn't specified, a folder in the user's _M_H directory will be used, either that specified by the "Inbox:" entry in the user's profile, or the folder named "inbox". The new mes- sages being incorporated are assigned numbers starting with the next highest number in the folder. If the specified (or default) folder doesn't exist, the user will be queried prior to its crea- tion. As the messages are processed, a _s_c_a_n listing of the new mail is produced. If the user's profile contains a "Msg-Protect: nnn" entry, it will be used as the protection on the newly created messages, otherwise the _M_H default of 0644 will be used. During all operations on mes- sages, this initially assigned protection will be preserved for each message, so _c_h_m_o_d(1) may be used to set a protection on an individual message, and its protection will be preserved thereafter. If the switch `-audit audit-file' is specified (usually as a default switch in the profile), then _i_n_c will append a header line and a line per message to the end of the specified audit-file with the format: <> date This is useful for keeping track of volume and source of incoming mail. Eventually, _r_e_p_l, _f_o_r_w, _c_o_m_p, and _d_i_s_t may also produce audits to this (or another) file, perhaps with "Message-Id:" infor- mation to keep an exact correspondence history. "Audit-file" will be in the user's MH directory unless a full path is specified. _I_n_c will incorporate even improperly formatted messages into the user's MH folder, inserting a blank line prior to the offending component and printing a comment identifying the bad message. In all cases, the user's mail drop will be zeroed, unless the `-notruncate' switch is given. [mh.6] MH.6.8 UCI version INC(1) -43- INC(1) If the profile entry "Unseen-Sequence" is present and non-empty, then _i_n_c will add each of the newly incorporated messages to each sequence named by the profile entry. This is similar to the "Previous-Sequence" profile entry supported by all _M_H commands which take `msgs' or `msg' arguments. Note that _i_n_c will not zero each sequence prior to adding messages. The interpretation of the `-form formatfile', `-format string', and `-width columns' switches is the same as in _s_c_a_n (1). By using the `-file name' switch, one can direct _i_n_c to incorporate messages from a file other than the user's maildrop. Note that the name file will NOT be zeroed, unless the `-truncate' switch is given. If the envariable $MAILDROP is set, then _i_n_c uses it as the loca- tion of the user's maildrop instead of the default (the `- file name' switch still overrides this, however). If this envari- able is not set, then _i_n_c will consult the profile entry "MailDrop" for this information. If the value found is not absolute, then it is interpreted relative to the user's _M_H directory. If the value is not found, then _i_n_c will look in the standard system location for the user's maildrop. The `-silent' switch directs _i_n_c to be quiet and not ask any ques- tions at all. This is useful for putting _i_n_c in the background and going on to other things. If the local host is configured as a POP client, or if the `-host host' switch is given, then _i_n_c will query the POP service host as to the status of mail waiting. If the `-user user' switch is not given, then the current username is used. Normally, _i_n_c will prompt for a password to use. However, if the `-apop' switch is given, _i_n_c will generate authentication credentials to provide for origin authentication and replay protection, but which do not involve sending a password in the clear over the network. Other- wise, if the `-rpop' switch is given, then _i_n_c will try to use a "trusted" connection (ala the BSD r-commands). If _i_n_c uses POP, then the `-pack file' switch is considered. If given, then _i_n_c simply uses the POP to _p_a_c_k_f (1) the user's mail- drop from the POP service host to the named file. This switch is provided for those users who prefer to use _m_s_h to read their mail- drops. _F_i_l_e_s $HOME/.mh_profile The user profile /usr/bs/mh-6.8/lib/mtstailor tailor file /usr/spool/mail/$USER Location of mail drop [mh.6] MH.6.8 UCI version INC(1) -44- INC(1) _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Alternate-Mailboxes: To determine the user's mailboxes Inbox: To determine the inbox, default "inbox" Folder-Protect: To set mode when creating a new folder Msg-Protect: To set mode when creating a new message and audit-file Unseen-Sequence: To name sequences denoting unseen messages _S_e_e _A_l_s_o _P_o_s_t _O_f_f_i_c_e _P_r_o_t_o_c_o_l - _v_e_r_s_i_o_n _3 (aka RFC-1081), mhmail(1), scan(1), mh-mail(5), post(8) _D_e_f_a_u_l_t_s `+folder' defaulted by "Inbox" above `-noaudit' `-changecur' `-format' defaulted as described above `-nosilent' `-truncate' if `-file name' not given, `-notruncate' otherwise `-width' defaulted to the width of the terminal `-nopack' `-rpop' _C_o_n_t_e_x_t The folder into which messages are being incorporated will become the current folder. The first message incorporated will become the current message, unless the `-nochangecur' option is specified. This leaves the context ready for a _s_h_o_w of the first new message. _B_u_g_s The argument to the `-format' switch must be interpreted as a sin- gle token by the shell that invokes _i_n_c. Therefore, one must usu- ally place the argument to this switch inside double-quotes. [mh.6] MH.6.8 UCI version MARK(1) -45- MARK(1) _N_A_M_E mark - mark messages _S_Y_N_O_P_S_I_S mark [+folder] [msgs] [-sequence name ...] [-add] [-delete] [-list] [-public] [-nopublic] [-zero] [-nozero] [-help] _D_E_S_C_R_I_P_T_I_O_N The _m_a_r_k command manipulates message sequences by adding or delet- ing message numbers from folder-specific message sequences, or by listing those sequences and messages. A message sequence is a key- word, just like one of the "reserved" message names, such as "first" or "next". Unlike the "reserved" message names, which have a fixed semantics on a per-folder basis, the semantics of a message sequence may be defined, modified, and removed by the user. Mes- sage sequences are folder-specific, e.g., the sequence name "seen" in the context of folder "+inbox" need not have any relation what- soever to the sequence of the same name in a folder of a different name. Three action switches direct the operation of _m_a_r_k. These switches are mutually exclusive: the last occurrence of any of them over- rides any previous occurrence of the other two. The `-add' switch tells _m_a_r_k to add messages to sequences or to create a new sequence. For each sequence named via the `-sequence name' argument (which must occur at least once) the mes- sages named via `msgs' (which defaults to "cur" if no `msgs' are given), are added to the sequence. The messages to be added need not be absent from the sequence. If the `-zero' switch is speci- fied, the sequence will be emptied prior to adding the messages. Hence, `-add -zero' means that each sequence should be initialized to the indicated messages, while `-add -nozero' means that each sequence should be appended to by the indicated messages. The `-delete' switch tells _m_a_r_k to delete messages from sequences, and is the dual of `-add'. For each of the named sequences, the named messages are removed from the sequence. These messages need not be already present in the sequence. If the `-zero' switch is specified, then all messages in the folder are appended to the sequence prior to removing the messages. Hence, `-delete -zero' means that each sequence should contain all messages except those indicated, while `-delete -nozero' means that only the indicated messages should be removed from each sequence. As expected, the command `mark -sequence seen -delete all' deletes the sequence "seen" from the current folder. When creating (or modifying) a sequence, the `-public' switch indi- cates that the sequence should be made readable for other _M_H users. In contrast, the `-nopublic' switch indicates that the sequence should be private to the user's _M_H environment. [mh.6] MH.6.8 UCI version MARK(1) -46- MARK(1) The `-list' switch tells _m_a_r_k to list both the sequences defined for the folder and the messages associated with those sequences. _M_a_r_k will list the name of each sequence given by `-sequence name' and the messages associated with that sequence. If `-sequence' isn't used, all sequences will be listed, with private sequences being so indicated. The `-zero' switch does not affect the opera- tion of `-list'. The current restrictions on sequences are: The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanumeric char- acters, and can not be one of the "reserved" message names (e.g., "first", "cur", and so forth). Only a certain number of sequences may be defined for a given folder. This number is usually limited to 26 (10 on small sys- tems). Message ranges with user-defined sequence names are restricted to the form "name:n" or "name:-n", and refer to the first or last `n' messages of the sequence `name', respectively. Constructs of the form "name1-name2" are forbidden. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder _S_e_e _A_l_s_o pick (1), mh-sequence (5) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `-add' if `-sequence' is specified, `-list' otherwise `msgs' defaults to cur (or all if `-list' is specified) `-nopublic' if the folder is read-only, `-public' otherwise `-nozero' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. _H_e_l_p_f_u_l _H_i_n_t_s Use "pick sequence -list" to enumerate the messages in a sequence (such as for use by a shell script). [mh.6] MH.6.8 UCI version MARK(1) -47- MARK(1) _N_A_M_E mhl - produce formatted listings of MH messages _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/mhl [-bell] [-nobell] [-clear] [-noclear] [-folder +folder] [-form formfile] [-length lines] [-width columns] [-moreproc program] [-nomoreproc] [files ...] [-help] _D_E_S_C_R_I_P_T_I_O_N _M_h_l is a formatted message listing program. It can be used as a replacement for _m_o_r_e (1) (the default _s_h_o_w_p_r_o_c ). As with _m_o_r_e, each of the messages specified as arguments (or the standard input) will be output. If more than one message file is specified, the user will be prompted prior to each one, and a or will begin the output, with clearing the screen (if appropriate), and (usually CTRL-D) suppressing the screen clear. An (usually CTRL-C) will abort the current mes- sage output, prompting for the next message (if there is one), and a (usually CTRL-\) will terminate the program (without core dump). The `-bell' option tells _m_h_l to ring the terminal's bell at the end of each page, while the `-clear' option tells _m_h_l to clear the scree at the end of each page (or output a formfeed after each mes- sage). Both of these switches (and their inverse counterparts) take effect only if the profile entry _m_o_r_e_p_r_o_c is defined but empty, and _m_h_l is outputting to a terminal. If the _m_o_r_e_p_r_o_c entry is defined and non-empty, and _m_h_l is outputting to a terminal, then _m_h_l will cause the _m_o_r_e_p_r_o_c to be placed between the terminal and _m_h_l and the switches are ignored. Furthermore, if the `-clear' switch is used and _m_h_l'_s output is directed to a terminal, then _m_h_l will consult the $TERM and $TERMCAP envariables to determine the user's terminal type in order to find out how to clear the screen. If the `-clear' switch is used and _m_h_l'_s output is not directed to a terminal (e.g., a pipe or a file), then _m_h_l will send a formfeed after each message. To override the default _m_o_r_e_p_r_o_c and the profile entry, use the `-moreproc program' switch. Note that _m_h_l will never start a _m_o_r_e_p_r_o_c if invoked on a hardcopy terminal. The `-length length' and `-width width' switches set the screen length and width, respectively. These default to the values indi- cated by $TERMCAP, if appropriate, otherwise they default to 40 and 80, respectively. The default format file used by _m_h_l is called _m_h_l._f_o_r_m_a_t (which is first searched for in the user's _M_H directory, and then sought in the /_u_s_r/_b_s/_m_h-_6._8/_l_i_b directory), this can be changed by using the `-form formatfile' switch. [mh.6] MH.6.8 UCI version MHL(1) -48- MHL(1) Finally, the `-folder +folder' switch sets the _M_H folder name, which is used for the "messagename:" field described below. The envariable $mhfolder is consulted for the default value, which _s_h_o_w, _n_e_x_t, and _p_r_e_v initialize appropriately. _M_h_l operates in two phases: 1) read and parse the format file, and 2) process each message (file). During phase 1, an internal description of the format is produced as a structured list. In phase 2, this list is walked for each message, outputting message information under the format constraints from the format file. The "mhl.format" form file contains information controlling screen clearing, screen size, wrap-around control, transparent text, com- ponent ordering, and component formatting. Also, a list of com- ponents to ignore may be specified, and a couple of "special" com- ponents are defined to provide added functionality. Message output will be in the order specified by the order in the format file. Each line of mhl.format has one of the formats: ;comment :cleartext variable[,variable...] component:[variable,...] A line beginning with a `;' is a comment, and is ignored. A line beginning with a `:' is clear text, and is output exactly as is. A line containing only a `:' produces a blank line in the output. A line beginning with "component:" defines the format for the speci- fied component, and finally, remaining lines define the global environment. For example, the line: width=80,length=40,clearscreen,overflowtext="***",overflowoffset=5 defines the screen size to be 80 columns by 40 rows, specifies that the screen should be cleared prior to each page, that the overflow indentation is 5, and that overflow text should be flagged with "***". Following are all of the current variables and their arguments. If they follow a component, they apply only to that component, other- wise, their affect is global. Since the whole format is parsed before any output processing, the last global switch setting for a variable applies to the whole message if that variable is used in a global context (i.e., bell, clearscreen, width, length). _v_a_r_i_a_b_l_e _t_y_p_e _s_e_m_a_n_t_i_c_s width integer screen width or component width length integer screen length or component length offset integer positions to indent "component: " [mh.6] MH.6.8 UCI version MHL(1) -49- MHL(1) overflowtext string text to use at the beginning of an overflow line overflowoffset integer positions to indent overflow lines compwidth integer positions to indent component text after the first line is output uppercase flag output text of this component in all upper case nouppercase flag don't uppercase clearscreen flag/G clear the screen prior to each page noclearscreen flag/G don't clearscreen bell flag/G ring the bell at the end of each page nobell flag/G don't bell component string/L name to use instead of "component" for this component nocomponent flag don't output "component: " for this component center flag center component on line (works for one-line components only) nocenter flag don't center leftadjust flag strip off leading whitespace on each line of text noleftadjust flag don't leftadjust compress flag change newlines in text to spaces nocompress flag don't compress split flag don't combine multiple fields into a single field nosplit flag combine multiple fields into a single field newline flag print newline at end of components (default) nonewline flag don't print newline at end of components formatfield string format string for this component (see below) addrfield flag field contains addresses datefield flag field contains dates To specify the value of integer-valued and string-valued variables, follow their name with an equals-sign and the value. Integer-valued variables are given decimal values, while string-valued variables are given arbitrary text bracketed by double-quotes. If a value is suffixed by "/G" or "/L", then its value is useful in a global-only or local-only context (respec- tively). A line of the form: ignores=component,... specifies a list of components which are never output. The component "MessageName" (case-insensitive) will output the actual message name (file name) preceded by the folder name if one is specified or found in the environment. The format is identical to that produced by the `-header' option to _s_h_o_w. The component "Extras" will output all of the components of the [mh.6] MH.6.8 UCI version MHL(1) -50- MHL(1) message which were not matched by explicit components, or included in the ignore list. If this component is not specified, an ignore list is not needed since all non-specified components will be ignored. If "nocomponent" is NOT specified, then the component name will be output as it appears in the format file. The default format is: : -- using template mhl.format -- overflowtext="***",overflowoffset=5 leftadjust,compwidth=9 ignores=msgid,message-id,received Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>" To: cc: : From: Subject: : extras:nocomponent : body:nocomponent,overflowtext=,overflowoffset=0,noleftadjust The variable "formatfield" specifies a format string (see _m_h-_f_o_r_m_a_t (5)). The flag variables "addrfield" and "datefield" (which are mutually exclusive), tell _m_h_l to interpret the escapes in the format string as either addresses or dates, respectively. By default, _m_h_l does not apply any formatting string to fields con- taining address or dates (see _m_h-_m_a_i_l (5) for a list of these fields). Note that this results in faster operation since _m_h_l must parse both addresses and dates in order to apply a format string to them. If desired, _m_h_l can be given a default format string for either address or date fields (but not both). To do this, on a global line specify: either the flag addrfield or datefield, along with the apropriate formatfield variable string. _F_i_l_e_s /usr/bs/mh-6.8/lib/mhl.format The message template or /mhl.format Rather than the standard template $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s moreproc: Program to use as interactive front-end _S_e_e _A_l_s_o show(1), ap(8), dp(8) [mh.6] MH.6.8 UCI version MHL(1) -51- MHL(1) _D_e_f_a_u_l_t_s `-bell' `-noclear' `-length 40' `-width 80' _C_o_n_t_e_x_t None _B_u_g_s There should be some way to pass `bell' and `clear' information to the front-end. On hosts where _M_H was configured with the BERK option, address parsing is not enabled. The "nonewline" option interacts badly with "compress" and "split". [mh.6] MH.6.8 UCI version MHMAIL(1) -52- MHMAIL(1) _N_A_M_E mhmail - send or read mail _S_Y_N_O_P_S_I_S mhmail [ addrs ... [-body text] [-cc addrs ...] [-from addr] [-subject subject]] [-help] _D_E_S_C_R_I_P_T_I_O_N _M_H_m_a_i_l is intended as a replacement for the standard Bell mail pro- gram (_b_e_l_l_m_a_i_l (1)), compatible with _M_H. When invoked without arguments, it simply invokes _i_n_c (1) to incorporate new messages from the user's maildrop. When one or more users is specified, a message is read from the standard input and spooled to a temporary file. _M_H_m_a_i_l then invokes _p_o_s_t (8) with the name of the temporary file as its argument to deliver the message to the specified user. The `-subject subject' switch can be used to specify the "Subject:" field of the message. The `-body text' switch can be used to specify the text of the message; if it is specified, then the stan- dard input is not read. Normally, addresses appearing as arguments are put in the "To:" field. If the `-cc' switch is used, all addresses following it are placed in the "cc:" field. By using `-from addr', you can specify the "From:" header of the draft. Naturally, _p_o_s_t will fill-in the "Sender:" header correctly. This program is intended for the use of programs such as _a_t (1), which expect to send mail automatically to various users. Nor- mally, real people (as opposed to the "unreal" ones) will prefer to use _c_o_m_p (1) and _s_e_n_d (1) to send messages. _F_i_l_e_s /usr/bs/mh-6.8/bin/inc Program to incorporate a maildrop into a folder /usr/bs/mh-6.8/lib/post Program to deliver a message /tmp/mhmail* Temporary copy of message _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None _S_e_e _A_l_s_o inc(1), post(8) _D_e_f_a_u_l_t_s None [mh.6] MH.6.8 UCI version MHMAIL(1) -53- MHMAIL(1) _C_o_n_t_e_x_t If _i_n_c is invoked, then _i_n_c's context changes occur. [mh.6] MH.6.8 UCI version MHN(1) -54- MHN(1) _N_A_M_E mhn - multi-media MH _S_Y_N_O_P_S_I_S mhn [+folder] [msgs] [-part number]... [-type content]... [-list [-headers] [-noheaders] [-realsize] [-norealsize]] [-nolist] [-show [-serialonly] [-noserialonly]] [-form formfile]] [-noshow] [-store [-auto] [-noauto]] [-nostore] [-verbose] [-noverbose] [-rfc934mode] [-norfc934mode] [-ebcdicsafe] [-noebcdicsafe] [-help] _D_E_S_C_R_I_P_T_I_O_N The _m_h_n command manipulates multi-media messages as specified in RFC 1341. Three action switches direct the operation of _m_h_n, namely `-list', `-show', and `-store'. Any of these switches may be used con- currently. Normally these action switches will operate on the con- tent of each of the named messages. However, by using the `-part' and `-type' switches, the scope of the operation can be focused on particular subparts (of a multipart content) and/or particular con- tent types. A part specification consists of a series of numbers separated by dots. For example, in a multipart content containing three parts, these would be named as 1, 2, and 3, respectively. If part 2 was also a multipart content containing two parts, these would be named as 2.1 and 2.2, respectively. Note that the `-part' switch is effective for only messages containing a multipart content. If a message has some other kind of content, or if the part is itself another multipart content, the `-part' switch will not prevent the content from being acted upon. A content specification consists of a content type and a subtype. The initial list of "standard" content types and subtypes can be [mh.6] MH.6.8 UCI version MHN(1) -55- MHN(1) found in RFC 1341. A list of commonly used contents is briefly reproduced here: Type Subtypes ---- -------- text plain, richtext multipart mixed, alternative, digest, parallel message rfc822, partial, external-body application octet-stream, oda, postscript image jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd audio basic video mpeg Subtypes are mandatory. To specify a content, regardless of its subtype, just use the name of the content, e.g., "audio". To specify a specific subtype, separate the two with a slash, e.g., "audio/basic". Note that regardless of the values given to the `-type' switch, a multipart content is always acted upon. Further note that if the `-type' switch is used, and it is desirable to act on a message/external-body content, then the `-type' switch must be used twice: once for message/external-body and once for the content externally referenced. _L_i_s_t_i_n_g _t_h_e _C_o_n_t_e_n_t_s The `-list' switch tells _m_h_n to list the table of contents associ- ated with the named messages. The `-headers' switch indicates that a one-line banner should be displayed above the listing. The `-realsize' switch tells _m_h_n to evaluate the "native" (decoded) format of each content prior to listing. This provides an accurate count at the expense of a small delay. _S_h_o_w_i_n_g _t_h_e _C_o_n_t_e_n_t_s The `-show' switch tells _m_h_n to display the contents of the named messages. The headers of the message are displayed with the _m_h_l_p_r_o_c, using format file _m_h_l._h_e_a_d_e_r_s. (The choice of format file can be overridden by the `-form formfile' switch.) _m_h_n will look for information in the user's profile to determine how the different contents should be displayed. This is accom- plished by consulting a display string, and executing it under [mh.6] MH.6.8 UCI version MHN(1) -56- MHN(1) /bin/sh, with the standard input set to the content. The display string may contain these escapes: %a additional arguments %e exclusive execution %f filename containing content %F %e, %f, and stdin is terminal not content %l display listing prior to displaying content %p %l, and ask for confirmation %s subtype For those display strings containing the e- or F-escape, _m_h_n will execute at most one of these at any given time. Although the F- escape expands to be the filename containing the content, the e- escape has no expansion as far as the shell is concerned. When the p-escape prompts for confirmation, typing INTR (usually control-C) will tell _m_h_n not to display that content. Further, when _m_h_n is display a content, typing QUIT (usually control-\) will tell _m_h_n to wrap things up immediately. First, _m_h_n will look for an entry of the form: mhn-show-/ to determine the command to use to display the content. If this isn't found, _m_h_n will look for an entry of the form: mhn-show- to determine the display command. If this isn't found, _m_h_n has two default values: mhn-show-text/plain: %pmoreproc '%F' mhn-show-message/rfc822: %pshow -file '%F' If neither apply, _m_h_n will check to see if the message has a application/octet-stream content with parameter "type=tar". If so, _m_h_n will use an appropriate command. If not, _m_h_n will complain. Example entries might be: mhn-show-audio/basic: raw2audio 2>/dev/null | play mhn-show-image: xv '%f' mhn-show-application/PostScript: lpr -Pps Note that when using the f- or F-escape, it's a good idea to use single-quotes around the escape. This prevents misinterpretation by the shell of any funny characters that might be present in the filename. Because the text content might be in a non-ASCII character set, [mh.6] MH.6.8 UCI version MHN(1) -57- MHN(1) when _m_h_n encounters a "charset" parameter for this content, it checks to see whether the environment variable $MM_CHARSET is set and whether the value of this environment variable is equal to the value of the charset parameter. If not, then _m_h_n will look for an entry of the form: mhn-charset- which should contain a command creating an environment to render the character set. This command string should containing a single "%s", which will be filled-in with the command to display the con- tent. An example entry might be: mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*- 120-*-*-c-*-iso8859-*' -e %s Note that many pagination programs strip off the high-order bit. However, newer releases of the _l_e_s_s program have modest support for single-octet character sets. The source to _l_e_s_s version 177, which has such support, is found in the MH source tree under miscellany/less-177. In order to view messages sent in the ISO 8859/1 character set using _l_e_s_s, put these lines in your .login file: setenv LESSCHARSET latin1 setenv LESS "-f" The first line tells _l_e_s_s to use 8859/1 definition for determing whether a character is "normal", "control", or "binary". The second line tells _l_e_s_s not to warn you if it encounters a file that has non-ASCII characters. Then, simply set the moreproc profile entry to _l_e_s_s, and it will get called automatically. (To handle other single-octet character sets, look at the _l_e_s_s (1) manual entry for information about the LESSCHARDEF environment variable.) Finally, _m_h_n will process each message serially -- it won't start showing the next message until all the commands executed to display the current message have terminated. In the case of a multipart content, the content contains advice indicating if the parts should be displayed serially or in parallel. Because this may cause con- fusion, particularly on uni-window displays, the `-serialonly' switch can be given to tell _m_h_n to never display parts in parallel. _S_t_o_r_i_n_g _t_h_e _C_o_n_t_e_n_t_s The `-store' switch tells _m_h_n to store the contents of the named messages in "native" (decoded) format. Two things must be deter- mined: the directory to store the content, and the filenames. Files are written in the directory given by the mhn-storage profile [mh.6] MH.6.8 UCI version MHN(1) -58- MHN(1) entry, e.g., mhn-storage: /tmp If this entry isn't present, the current working directory is used. _m_h_n will look for information in the user's profile to determine how the different contents should be stored. This is achieved through the use of a formatting string, which may contain these escapes: %m message number %P .part %p part %s subtype If the content isn't part of a multipart content, the p-escapes are ignored. Note that if the formatting string starts with a "+" character, then these escapes are ignored, and the content is stored in the named folder. (A formatting string consisting solely of a "+" character indicates the current folder.) Further, a for- matting string consisting solely of a "-" character indicates the standard-output. First, _m_h_n will look for an entry of the form: mhn-store-/ to determine the formatting string. If this isn't found, _m_h_n will look for an entry of the form: mhn-store- to determine the formatting string. If this isn't found, _m_h_n will check to see if the content is application/octet-stream with param- eter "type=tar". If so, _m_h_n will choose an appropriate filename. If the content is not application/octet-stream, then _m_h_n will check to see if the content is a message. If so, _m_h_n will use the value "+". If not, _m_h_n will use the value "%m%P.%s". Note that if the formatting string starts with a '/', then content will be stored in the full path given (rather than using the value of mhn-storage or the current working directory.) Similarly, if the formatting string starts with a '|', then _m_h_n will execute a com- mand which should ultimately store the content. Note that before executing the command, _m_h_n will change to the appropriate direc- tory. Also note that if the formatting string starts with a '|', then _m_h_n will also honor the a-escape when processing the format- ting string. [mh.6] MH.6.8 UCI version MHN(1) -59- MHN(1) Example entries might be: mhn-store-text: %m%P.txt mhn-store-audio/basic: | raw2audio -e ulaw -s 8000 -c 1 > %m%P.au mhn-store-application/PostScript: %m%P.ps Further, note that when asked to store a content containing a par- tial message, _m_h_n will try to locate all of the portions and com- bine them accordingly. Thus, if someone's sent you a message in several parts, you might put them all in their own folder and do: mhn all -store This will store exactly one message, containing the sum of the parts. Note that if _m_h_n can not locate each part, it will not store anything. Finally, if the `-auto' switch is given and the content contains information indicating the filename the content should be stored as (and if the filename doesn't begin with a '/'), then the filename from the content will be used instead. _E_x_t_e_r_n_a_l _A_c_c_e_s_s For contents of type message/external-body, _m_h_n supports these access-types: afs anon-ftp ftp local-file mail-server If your system supports a SOCKETs interface to TCP/IP, then _m_h_n will use a built-in FTP client. Otherwise, _m_h_n will look for the mhn-access-ftp profile entry, e.g., mhn-access-ftp: myftp.sh to determine the pathname of a program to perform the FTP [mh.6] MH.6.8 UCI version MHN(1) -60- MHN(1) retrieval. This program is invoked with these arguments: domain name of FTP-site username password remote directory remote filename local filename "ascii" or "binary" The program should terminate with a zero-valued exit-status if the retrieval is success. _T_h_e _C_o_n_t_e_n_t _C_a_c_h_e When _m_h_n encounters an external content containing a "Content-ID:" field, and if the content allows caching, then _m_h_n looks for the profile entry mhn-cache to determine if the content should be read from/written to a cache. Any content written to the cache will, by default, be world-readable. (To prevent this, use a directory name with the desired read and execute permissions.) The mhn-cache pro- file entry names the directory used for caching, e.g., mhn-cache: /tmp might be used if you didn't care that the cache got wiped after each reboot of the system. _C_o_m_p_o_s_i_n_g _t_h_e _C_o_n_t_e_n_t_s The _m_h_n program can also be used as a simple editor to aid in com- posing multi-media messages. When invoked by a _w_h_a_t_n_o_w program, _m_h_n will expect the body of the draft to be formatted as an "_m_h_n composition file." [mh.6] MH.6.8 UCI version MHN(1) -61- MHN(1) The syntax of this is straight-forward: body ::= 1*(content | EOL) content ::= directive | plaintext directive ::= "#" type "/" subtype 0*(";" attribute "=" value) [ "(" comment ")" ] [ "[" description "]" ] [ filename ] EOL | "#@" type "/" subtype 0*(";" attribute "=" value) [ "(" comment ")" ] [ "[" description "]" ] external-parameters EOL | "#forw" [ "[" description "]" ] [ "+"folder ] [ 0*msg ] EOL | "#begin" [ "[" description "]" ] [ "alternative" | "parallel" ] EOL 1*body "#end" EOL plaintext ::= [ "Content-Description:" description EOL EOL ] 1*line [ "#" EOL ] | "#<" type "/" subtype 0*(";" attribute "=" value) [ "(" comment ")" ] [ "[" description "]" ] EOL 1*line [ "#" EOL ] line ::= "##" text EOL -- interpreted as "#"text EOL | text EOL Basically, the body contains one or more contents. A content con- sists of either a directive, indicated with a "#" as the first [mh.6] MH.6.8 UCI version MHN(1) -62- MHN(1) character of a line; or, plaintext (one or more lines of text). The continuation character, "\", may be used to enter a single directive on more than one line, e.g., #@application/octet-stream; \ type=tar; \ conversions=x-compress There are four kinds of directives: "type" directives, which name the type and subtype of the content; "external-type" directives, which also name the type and subtype of the content; the "forw" directive, which is used to forward a digest of messages; and, the "begin" directive, which is used to create a multipart content. For the type directives, the user may optionally specify the name of a file containing the contents in "native" (decoded) format. (If the filename starts with the "|" character, then this gives a command whose output is captured accordingly.) If a filename is not given, _m_h_n will look for information in the user's profile to determine how the different contents should be composed. This is accomplished by consulting a composition string, and executing it under /bin/sh, with the standard output set to the content. The composition string may contain these escapes: %a additional arguments %f filename containing content %F %f, and stdout is not re-directed %s subtype First, _m_h_n will look for an entry of the form: mhn-compose-/ to determine the command to use to compose the content. If this isn't found, _m_h_n will look for an entry of the form: mhn-compose- to determine the composition command. If this isn't found, _m_h_n will complain. An example entry might be: mhn-compose-audio/basic: record | raw2audio -F Because commands like these will vary, depending on the display environment used for login, composition strings for different con- tents should probably be put in the file specified by the $MHN environment variable, instead of directly in your user profile. The external-type directives are used to provide a reference to a content, rather than enclosing the contents itself. Hence, instead [mh.6] MH.6.8 UCI version MHN(1) -63- MHN(1) of providing a filename as with the type directives, external- parameters are supplied. These look like regular parameters, so they must be separated accordingly, e.g., #@application/octet-stream; \ type=tar; \ conversions=x-compress [] \ access-type=anon-ftp; \ name="mh-mime.tar.Z"; \ directory="mrose/mh-mime"; \ site="ftp.ics.uci.edu" By specifying "[]", an empty description string is given, and the start of the external-parameters is identified. These parameters are of the form: access-type= usually _a_n_o_n-_f_t_p or _m_a_i_l-_s_e_r_v_e_r name= filename directory= directoryname (optional) site= hostname mode= usually _a_s_c_i_i or _i_m_a_g_e (optional) server= mailbox body= command to send for retrieval For the forw directive, the user may optionally specify the name of the folder and which messages are to be forwarded. if a folder is not given, it defaults to the current folder. Similarly, if a mes- sage is not given, it defaults to the current message. Hence, the forw directive is similar to the _f_o_r_w (1) command, except that the former uses the MIME rules for encapsulation rather than those specified in RFC 934. Usage of the `-rfc934mode' switch indicates whether _m_h_n should attempt to utilize the encapsulation rules in such a way as to appear that RFC 934 is being used. If given, then RFC 934-compliant user-agents should be able to burst the message on reception -- providing that the messages being encapsulated do not contain encapsulated messages themselves. The drawback of this approach is that the encapsulations are generated by placing an extra newline at the end of the body of each message. For the begin directive, the user must specify at least one content between the begin and end pairs. For all of these directives, the user may include a brief descrip- tion of the content between the "[" character and the "]" charac- [mh.6] MH.6.8 UCI version MHN(1) -64- MHN(1) ter. Putting this all together, here is a brief example of what a user's components file might look like: To: cc: Subject: -------- #audio/basic [Flint phone] \ |raw2audio -F < /home/mrose/lib/multi-media/flint.au #image/gif [MTR's photo] \ /home/mrose/lib/multi-media/mrose.gif For a later example, we'll call this components file _m_h_n_c_o_m_p_s. As noted earlier, in addition to directives, plaintext can be present. Plaintext is gathered, until a directive is found or the draft is exhausted, and this is made to form a text content. If the plaintext must contain a "#" at the beginning of a line, simply double it, e.g., ##when sent, this line will start with only one # If you want to end the plaintext prior to a directive, e.g., to have two plaintext contents adjacent, simply insert a line contain- ing a single "#" character, e.g., this is the first content # and this is the second Finally, if the plaintext starts with a line of the form: Content-Description: text then this will be used to describe the plaintext content. NOTE WELL: you must follow this line with a blank line before starting your text. By default, plaintext is captured as a text/plain content. You can override this by starting the plaintext with "#<" followed by a content-type specification, e.g., # -------- What now? edit (this invokes _m_h_n) What now? send You have to remember to type the additional edit command, but it should be fairly obvious from the interaction. Finally, you should consider adding this line to your profile: lproc: show This way, if you decide to list after invoking _m_h_n as your editor, the command What now? list will work as you expect. _S_e_n_d_i_n_g _F_i_l_e_s _v_i_a _M_a_i_l When you want to send a bunch of files to someone, you can run the _v_i_a_m_a_i_l shell script, which is similar the tarmail command: /usr/bs/mh-6.8/lib/viamail mailpath "subject" files ... _v_i_a_m_a_i_l will archive the directories/files you name with _t_a_r (1), and then mail the compressed archive to the `mailpath' with the given `subject'. The archive will be automatically split up into as many messages as necessary in order to get past most mailers. Sometimes you want _v_i_a_m_a_i_l to pause after posting a partial mes- sage. This is usually the case when you are running _s_e_n_d_m_a_i_l and expect to generate a lot of partial messages. If the first [mh.6] MH.6.8 UCI version MHN(1) -67- MHN(1) argument given to _v_i_a_m_a_i_l starts with a dash, then it is inter- preted as the number of seconds to pause in between postings, e.g., /usr/bs/mh-6.8/lib/viamail -300 mailpath "subject" files ... will pause 5 minutes in between each posting. When these messages are received, invoke _m_h_n once, with the list of messages, and the `-store' command. The _m_h_n program will then store exactly one message containing the archive. You can then use `-show' to find out what's inside; possibly followed by `-store' to write the archive to a file where you can subsequently uncompress and untar it, e.g., % mhn -list all msg part type/subtype size description 1 message/partial 47K part 1 of 4 2 message/partial 47K part 2 of 4 3 message/partial 47K part 3 of 4 4 message/partial 18K part 4 of 4 % mhn -store all % mhn -list -verbose last msg part type/subtype size description 5 application/octet-stream 118K (extract with uncompress | tar xvpf -) type=tar conversions=x-compress % mhn -show last msg part type/subtype size description 5 application/octet-stream 118K -- headers of message, followed by _t_a_r listing appears here % mhn -store last % uncompress < 5.tar.Z | tar xvpf - Alternately, by using the `-auto' switch, _m_h_n will automatically do [mh.6] MH.6.8 UCI version MHN(1) -68- MHN(1) the extraction for you, e.g., % mhn -list all msg part type/subtype size description 1 message/partial 47K part 1 of 4 2 message/partial 47K part 2 of 4 3 message/partial 47K part 3 of 4 4 message/partial 18K part 4 of 4 % mhn -store all % mhn -list -verbose last msg part type/subtype size description 5 application/octet-stream 118K (extract with uncompress | tar xvpf -) type=tar conversions=x-compress % mhn -show last msg part type/subtype size description 5 application/octet-stream 118K -- headers of message, followed by _t_a_r listing appears here % mhn -store -auto last -- _t_a_r listing appears here as files are extracted As the second _t_a_r listing is generated, the files are extracted. A prudent user will never put `-auto' in the .mh_profile file. The correct procedure is to first use `-show', to find out what will be extracted. Then _m_h_n can be invoked with `-store' and `-auto' to perform the extraction. _U_s_e_r _E_n_v_i_r_o_n_m_e_n_t Because the display environment in which _m_h_n operates may vary for a user, _m_h_n will look for the environment variable $MHN. If present, this specifies the name of an additional user profile which should be read. Hence, when a user logs in on a particular display device, this environment variable should be set to refer to a file containing definitions useful for the display device. Nor- mally, only entries of the form mhn-show-/ mhn-show- need be present. Finally, _m_h_n will attempt to consult one other additional user profile, e.g., /usr/bs/mh-6.8/lib/mhn_defaults which is created automatically during MH installation. [mh.6] MH.6.8 UCI version MHN(1) -69- MHN(1) _F_i_l_e_s $HOME/.mh_profile The user profile $MHN Additional profile entries /usr/bs/mh-6.8/lib/mhn_defaults System-default profile entries /usr/bs/mh-6.8/lib/mhl.headers The headers template _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder mhlproc: Default program to display message headers mhn-access-ftp: Program to retrieve contents via FTP mhn-cache Directory to store cached external contents mhn-charset-Template for environment to render character sets mhn-compose-* Template for composing contents mhn-show-* Template for displaying contents mhn-storage Directory to store contents mhn-store-* Template for storing contents moreproc: Default program to display text/plain content _S_e_e _A_l_s_o mhl(1) _M_I_M_E: _M_e_c_h_a_n_i_s_m_s _f_o_r _S_p_e_c_i_f_y_i_n_g _a_n_d _D_e_s_c_r_i_b_i_n_g _t_h_e _F_o_r_m_a_t _o_f _I_n_t_e_r- _n_e_t _M_e_s_s_a_g_e _B_o_d_i_e_s (RFC 1341), _P_r_o_p_o_s_e_d _S_t_a_n_d_a_r_d _f_o_r _M_e_s_s_a_g_e _E_n_c_a_p_s_u_l_a_t_i_o_n (RFC 934). _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `-noauto' `-noebcdicsafe' `-form mhl.headers' `-headers' `-realsize' `-rfc934mode' `-noserialonly' `-show' `-noverbose' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The last message selected will become the current message. _B_u_g_s Partial messages contained within a multipart content are not reassembled with the `-store' switch. [mh.6] MH.6.8 UCI version MHOOK(1) -70- MHOOK(1) _N_A_M_E mhook, rcvdist, rcvpack, rcvtty - MH receive-mail hooks _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/rcvdist [-form formfile] [switches for _p_o_s_t_p_r_o_c] address ... [-help] /usr/bs/mh-6.8/lib/rcvpack file [-help] /usr/bs/mh-6.8/lib/rcvtty [command] [-form formatfile] [-format string] [-bell] [-nobell] [-newline] [-nonewline] [-biff] [-help] _D_E_S_C_R_I_P_T_I_O_N A receive-mail hook is a program that is run whenever you receive a mail message. You do NOT invoke the hook yourself, rather the hook is invoked on your behalf by your system's Message Transport Agent. See _s_l_o_c_a_l (1) for details on how to activate receive-mail hooks on your system. Four programs are currently available as part of _M_H, _r_c_v_d_i_s_t (redistribute incoming messages to additional recipients), _r_c_v_p_a_c_k (save incoming messages in a _p_a_c_k_f'd file), and _r_c_v_t_t_y (notify user of incoming messages). The fourth program, _r_c_v_s_t_o_r_e (1) is described separately. They all reside in the /_u_s_r/_b_s/_m_h-_6._8/_l_i_b/ directory. The _r_c_v_d_i_s_t program will resend a copy of the message to all of the addresses listed on its command line. It uses the format string facility described in _m_h-_f_o_r_m_a_t (5). The _r_c_v_p_a_c_k program will append a copy of the message to the file listed on its command line. Its use is obsoleted by the "file" action of _s_l_o_c_a_l. The _r_c_v_t_t_y program executes the named file with the message as its standard input, and writes the resulting output on your terminal. If no file is specified, or is bogus, etc., then _r_c_v_t_t_y will instead write a one-line scan listing. Either the `-form formatfile' or `-format string' option may be used to over- ride the default output format (see _m_h-_f_o_r_m_a_t (5)). A newline is output before the message output, and the terminal bell is rung after the output. The `-nonewline' and `-nobell' options will inhibit these functions. In addition to the standard _m_h-_f_o_r_m_a_t (5) escapes, _r_c_v_t_t_y also recognizes the following additional _c_o_m_p_o_n_e_n_t escapes: [mh.6] MH.6.8 UCI version MHOOK(1) -71- MHOOK(1) _E_s_c_a_p_e _R_e_t_u_r_n_s _D_e_s_c_r_i_p_t_i_o_n body string the (compressed) first part of the body dtimenow date the current date folder string the name of the current folder Normally, _r_c_v_t_t_y obeys write permission as granted by _m_e_s_g (1). With the `-biff' option, _r_c_v_t_t_y will obey the notification status set by _b_i_f_f (1) instead. If the terminal access daemon (TTYD) is available on your system, then _r_c_v_t_t_y will give its output to the daemon for output instead of writing on the user's terminal. _F_i_l_e_s /usr/bs/mh-6.8/lib/mtstailor tailor file $HOME/.maildelivery The file controlling local delivery /usr/bs/mh-6.8/lib/maildelivery Rather than the standard file _S_e_e _A_l_s_o rcvstore (1), mh-format(5), slocal(1) _B_u_g_s Only two return codes are meaningful, others should be. [mh.6] MH.6.8 UCI version MHPARAM(1) -72- MHPARAM(1) _N_A_M_E mhparam - print MH profile components _S_Y_N_O_P_S_I_S mhparam [components] [-all] [-component] [-nocomponent] [-help] _D_E_S_C_R_I_P_T_I_O_N _M_h_p_a_r_a_m writes the value of the specified profile component to the standard output separated by newlines. If the profile component is not present, the default value (or nothing if there is no default) is printed. If more than one component is specified in the `components' list, the component value is preceded by the component name. If `-com- ponent' is specified, the component name is displayed even when only one component is specified. If `-nocomponent' is specified, the component name is not displayed even when more than one com- ponent is specified. If `-all' is specified, all components if the MH profile are displayed and other arguments are ignored. Examples: % mhparam path Mail % mhparam mhlproc /usr/bs/mh-6.8/lib/mhl % mhparam -component path Path: Mail % mhparam AliasFile rmmproc AliasFile: aliases rmmproc: rmmproc % mhparam -nocomponent AliasFile rmmproc aliases rmmproc _M_h_p_a_r_a_m is also useful in back-quoted operations: % fgrep cornell.edu `mhpath +`/`mhparam aliasfile` _F_i_l_e_s $HOME/.mh_profile The user profile [mh.6] MH.6.8 UCI version MHPARAM(1) -73- MHPARAM(1) _S_e_e _A_l_s_o mh-profile(5) _D_e_f_a_u_l_t_s `-nocomponent' if only one component is specified `-component' if more than one component is specified `components' defaults to none _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version MHPATH(1) -74- MHPATH(1) _N_A_M_E mhpath - print full pathnames of MH messages and folders _S_Y_N_O_P_S_I_S mhpath [+folder] [msgs] [-help] _D_E_S_C_R_I_P_T_I_O_N _M_h_p_a_t_h expands and sorts the message list `msgs' and writes the full pathnames of the messages to the standard output separated by newlines. If no `msgs' are specified, _m_h_p_a_t_h outputs the folder pathname instead. If the only argument is `+', your MH _P_a_t_h is output; this can be useful is shell scripts. Contrasted with other MH commands, a message argument to _m_h_p_a_t_h may often be intended for _w_r_i_t_i_n_g. Because of this: 1) the name "new" has been added to _m_h_p_a_t_h's list of reserved mes- sage names (the others are "first", "last", "prev", "next", "cur", and "all"). The new message is equivalent to the message after the last message in a folder (and equivalent to 1 in a folder without messages). The "new" message may not be used as part of a message range. 2) Within a message list, the following designations may refer to messages that do not exist: a single numeric message name, the sin- gle message name "cur", and (obviously) the single message name "new". All other message designations must refer to at least one existing message. 3) An empty folder is not in itself an error. Message numbers greater than the highest existing message in a folder as part of a range designation are replaced with the next free message number. Examples: The current folder foo contains messages 3 5 6. Cur is 4. % mhpath /r/phyl/Mail/foo % mhpath all /r/phyl/Mail/foo/3 /r/phyl/Mail/foo/5 /r/phyl/Mail/foo/6 % mhpath 2001 /r/phyl/Mail/foo/7 % mhpath 1-2001 /r/phyl/Mail/foo/3 [mh.6] MH.6.8 UCI version MHPATH(1) -75- MHPATH(1) /r/phyl/Mail/foo/5 /r/phyl/Mail/foo/6 % mhpath new /r/phyl/Mail/foo/7 % mhpath last new /r/phyl/Mail/foo/6 /r/phyl/Mail/foo/7 % mhpath last-new bad message list "last-new". % mhpath cur /r/phyl/Mail/foo/4 % mhpath 1-2 no messages in range "1-2". % mhpath first:2 /r/phyl/Mail/foo/3 /r/phyl/Mail/foo/5 % mhpath 1 2 /r/phyl/Mail/foo/1 /r/phyl/Mail/foo/2 _M_H_p_a_t_h is also useful in back-quoted operations: % cd `mhpath +inbox` % echo `mhpath +` /r/phyl/Mail _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder _S_e_e _A_l_s_o folder(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to none [mh.6] MH.6.8 UCI version MHPATH(1) -76- MHPATH(1) _C_o_n_t_e_x_t None _B_u_g_s Like all MH commands, _m_h_p_a_t_h expands and sorts [msgs]. So don't expect mv `mhpath 501 500` to move 501 to 500. Quite the reverse. But mv `mhpath 501` `mhpath 500` will do the trick. Out of range message 0 is treated far more severely than large out of range message numbers. [mh.6] MH.6.8 UCI version MSGCHK(1) -77- MSGCHK(1) _N_A_M_E msgchk - check for messages _S_Y_N_O_P_S_I_S msgchk [-date] [-nodate] [-notify all/mail/nomail] [-nonotify all/mail/nomail] [-host host] [-user user] [-apop] [-noapop] [-rpop] [-norpop] [users ...] [-help] _D_E_S_C_R_I_P_T_I_O_N The _m_s_g_c_h_k program checks all known mail drops for mail waiting for you. For those drops which have mail for you, _m_s_g_c_h_k will indicate if it believes that you have seen the mail in question before. The `-notify type' switch indicates under what circumstances _m_s_g_c_h_k should produce a message. The default is `-notify all' which says that _m_s_g_c_h_k should always report the status of the users maildrop. Other values for `type' include `mail' which says that _m_s_g_c_h_k should report the status of waiting mail; and, `nomail' which says that _m_s_g_c_h_k should report the status of empty maildrops. The `-nonotify type' switch has the inverted sense, so `-nonotify all' directs _m_s_g_c_h_k to never report the status of maildrops. This is useful if the user wishes to check _m_s_g_c_h_k's exit status. A non-zero exit status indicates that mail was not waiting for at least one of the indicated users. If _m_s_g_c_h_k produces output, then the `-date' switch directs _m_s_g_c_h_k to print out the last date mail was read, if this can be deter- mined. If the local host is configured as a POP client, or if the `-host host' switch is given, _m_s_g_c_h_k will query the POP service host as to the status of mail waiting. If the `-user user' switch is not given, then the current username is used. Normally, _m_s_g_c_h_k will prompt for a password to use. However, if the `-apop' switch is given, _m_s_g_c_h_k will generate authentication credentials to pro- vide for origin authentication and replay protection, but which do not involve sending a password in the clear over the network. Oth- erwise, if the `-rpop' switch is given, then _m_s_g_c_h_k will try to use a "trusted" connection (ala the BSD r-commands). _F_i_l_e_s $HOME/.mh_profile The user profile /usr/bs/mh-6.8/lib/mtstailor tailor file /usr/spool/mail/$USER Location of mail drop _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None [mh.6] MH.6.8 UCI version MSGCHK(1) -78- MSGCHK(1) _S_e_e _A_l_s_o _P_o_s_t _O_f_f_i_c_e _P_r_o_t_o_c_o_l - _v_e_r_s_i_o_n _3 (aka RFC-1081), inc(1) _D_e_f_a_u_l_t_s `user' defaults to the current user `-date' `-notify all' `-rpop' _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version MSH(1) -79- MSH(1) _N_A_M_E msh - MH shell (and BBoard reader) _S_Y_N_O_P_S_I_S msh [-prompt string] [-scan] [-noscan] [-topcur] [-notopcur] [file] [-help] _D_E_S_C_R_I_P_T_I_O_N _m_s_h is an interactive program that implements a subset of the nor- mal _M_H commands operating on a single file in _p_a_c_k_f'd format. That is, _m_s_h is used to read a file that contains a number of messages, as opposed to the standard _M_H style of reading a number of files, each file being a separate message in a folder. _m_s_h's chief advan- tage is that the normal _M_H style does not allow a file to have more than one message in it. Hence, _m_s_h is ideal for reading _B_B_o_a_r_d_s, as these files are delivered by the transport system in this for- mat. In addition, _m_s_h can be used on other files, such as message archives which have been _p_a_c_ked (see _p_a_c_k_f (1)). Finally, _m_s_h is an excellent _M_H tutor. As the only commands available to the user are _M_H commands, this allows _M_H beginners to concentrate on how commands to _M_H are formed and (more or less) what they mean. When invoked, _m_s_h reads the named file, and enters a command loop. The user may type most of the normal _M_H commands. The syntax and semantics of these commands typed to _m_s_h are identical to their _M_H counterparts. In cases where the nature of _m_s_h would be incon- sistent (e.g., specifying a `+folder' with some commands), _m_s_h will duly inform the user. The commands that _m_s_h currently supports (in some slightly modified or restricted forms) are: ali burst comp dist folder forw inc mark mhmail mhn msgchk next packf pick prev refile repl rmm scan send show [mh.6] MH.6.8 UCI version MSH(1) -80- MSH(1) sortm whatnow whom In addition, _m_s_h has a "help" command which gives a brief overview. To terminate _m_s_h, type CTRL-D, or use the "quit" command. If _m_s_h is being invoked from _b_b_c, then typing CTRL-D will also tell _b_b_c to exit as well, while using the "quit" command will return control to _b_b_c, and _b_b_c will continue examining the list of BBoards that it is scanning. If the file is writable and has been modified, then using "quit" will query the user if the file should be updated. The `-prompt string' switch sets the prompting string for _m_s_h. You may wish to use an alternate _M_H profile for the commands that _m_s_h executes; see _m_h-_p_r_o_f_i_l_e (5) for details about the $MH envari- able. When invoked from _b_b_c, two special features are enabled: First, the `-scan' switch directs _m_s_h to do a `scan unseen' on start-up if new items are present in the BBoard. This feature is best used from _b_b_c, which correctly sets the stage. Second, the _m_a_r_k command in _m_s_h acts specially when you are reading a BBoard, since _m_s_h will consult the sequence "unseen" in determining what messages you have actually read. When _m_s_h exits, it reports this information to _b_b_c. In addition, if you give the _m_a_r_k command with no arguments, _m_s_h will interpret it as `mark -sequence unseen -delete -nozero all' Hence, to discard all of the messages in the current BBoard you're reading, just use the _m_a_r_k command with no arguments. Normally, the "exit" command is identical to the "quit" command in _m_s_h. When run under _b_b_c however, "exit" directs _m_s_h to mark all messages as seen and then "quit". For speedy type-in, this command is often abbreviated as just "e". When invoked from _v_m_h, another special feature is enabled: The `topcur' switch directs _m_s_h to have the current message "track" the top line of the _v_m_h scan window. Normally, _m_s_h has the current message "track" the center of the window (under `-notopcur', which is the default). _m_s_h supports an output redirection facility. Commands may be fol- lowed by one of > _f_i_l_e write output to _f_i_l_e >> _f_i_l_e append output to _f_i_l_e | _c_o_m_m_a_n_d pipe output to UNIX _c_o_m_m_a_n_d If _f_i_l_e starts with a `~' (tilde), then a _c_s_h-like expansion takes place. Note that _c_o_m_m_a_n_d is interpreted by _s_h (1). Also note that [mh.6] MH.6.8 UCI version MSH(1) -81- MSH(1) _m_s_h does NOT support history substitutions, variable substitutions, or alias substitutions. When parsing commands to the left of any redirection symbol, _m_s_h will honor `\' (back-slash) as the quote next-character symbol, and `"' (double-quote) as quote-word delimiters. All other input tokens are separated by whitespace (spaces and tabs). _F_i_l_e_s $HOME/.mh_profile The user profile /usr/bs/mh-6.8/lib/mtstailor tailor file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Msg-Protect: To set mode when creating a new `file' fileproc: Program to file messages showproc: Program to show messages _S_e_e _A_l_s_o bbc(1) _D_e_f_a_u_l_t_s `file' defaults to "./msgbox" `-prompt (msh) ' `-noscan' `-notopcur' _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version MSH(1) -82- MSH(1) _B_u_g_s The argument to the `-prompt' switch must be interpreted as a sin- gle token by the shell that invokes _m_s_h. Therefore, one must usu- ally place the argument to this switch inside double-quotes. There is a strict limit of messages per file in _p_a_c_k_f'd format which _m_s_h can handle. Usually, this limit is 1000 messages. Please remember that _m_s_h is not the _C_S_h_e_l_l, and that a lot of the nice facilities provided by the latter are not present in the form- er. In particular, _m_s_h does not understand back-quoting, so the only effective way to use _p_i_c_k inside _m_s_h is to always use the `-seq select' switch. Clever users of _M_H will put the line pick: -seq select -list in their .mh_profile file so that _p_i_c_k works equally well from both the shell and _m_s_h. _s_o_r_t_m always uses "-noverbose" and if "-textfield field" is used, "-limit 0". The _m_s_h program inherits most (if not all) of the bugs from the _M_H commands it implements. [mh.6] MH.6.8 UCI version NEXT(1) -83- NEXT(1) _N_A_M_E next - show the next message _S_Y_N_O_P_S_I_S next [+folder] [-header] [-noheader] [-showproc program] [-noshowproc] [switches for _s_h_o_w_p_r_o_c] [-help] _D_E_S_C_R_I_P_T_I_O_N _N_e_x_t performs a _s_h_o_w on the next message in the specified (or current) folder. Like _s_h_o_w, it passes any switches on to the pro- gram _s_h_o_w_p_r_o_c, which is called to list the message. This command is almost exactly equivalent to "show next". Consult the manual entry for _s_h_o_w (1) for all the details. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder showproc: Program to show the message _S_e_e _A_l_s_o show(1), prev(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `-header' _C_o_n_t_e_x_t If a folder is specified, it will become the current folder. The message that is shown (i.e., the next message in sequence) will be- come the current message. _B_u_g_s _n_e_x_t is really a link to the _s_h_o_w program. As a result, if you make a link to _n_e_x_t and that link is not called _n_e_x_t, your link will act like _s_h_o_w instead. To circumvent this, add a profile-entry for the link to your _M_H profile and add the argument _n_e_x_t to the entry. [mh.6] MH.6.8 UCI version PACKF(1) -84- PACKF(1) _N_A_M_E packf - compress an MH folder into a single file _S_Y_N_O_P_S_I_S packf [+folder] [msgs] [-file name] [-help] _D_E_S_C_R_I_P_T_I_O_N _P_a_c_k_f takes messages from a folder and copies them to a single file. Each message in the file is separated by four CTRL-A's and a newline (identical to the way messages are stored in your receiving mail drop). Messages packed can be unpacked using _i_n_c. If the _n_a_m_e given to the `-file name' switch exists, then the mes- sages specified will be appended to the end of the file, otherwise the file will be created and the messages appended. _F_i_l_e_s $HOME/.mh_profile The user profile .msgbox.map A binary index of the file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Msg-Protect: To set mode when creating a new `file' _S_e_e _A_l_s_o inc(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to all `-file ./msgbox' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The first message packed will become the current message. _B_u_g_s _P_a_c_k_f doesn't handle the old UUCP-style "mbox" format (used by _S_e_n_d_M_a_i_l). To pack messages into this format, use the script /_u_s_r/_b_s/_m_h-_6._8/_l_i_b/_p_a_c_k_m_b_o_x. Note that _p_a_c_k_m_b_o_x does not take the `-file' option of _p_a_c_k_f, and instead writes its output on _s_t_d_o_u_t. [mh.6] MH.6.8 UCI version PICK(1) -85- PICK(1) _N_A_M_E pick - select messages by content _S_Y_N_O_P_S_I_S pick [+folder] [msgs] [-and ...] [-or ...] [-not ...] [-lbrace ... -rbrace] [--component pattern] [-cc pattern] [-date pattern] [-from pattern] [-search pattern] [-subject pattern] [-to pattern] [-after date] [-before date] [-datefield field] [-sequence name ...] [-public] [-nopublic] [-zero] [-nozero] [-list] [-nolist] [-help] typically: scan `pick -from jones` pick -to holloway -sequence select show `pick -before friday` _D_E_S_C_R_I_P_T_I_O_N _P_i_c_k searches messages within a folder for the specified contents, and then identifies those messages. Two types of search primitives are available: pattern matching and date constraint operations. A modified _g_r_e_p(1) is used to perform the matching, so the full regular expression (see _e_d(1)) facility is available within `pat- tern'. With `-search', `pattern' is used directly, and with the others, the grep pattern constructed is: "component[ \t]*:.*pattern" This means that the pattern specified for a `-search' will be found everywhere in the message, including the header and the body, while the other pattern matching requests are limited to the single specified component. The expression `--component pattern' is a shorthand for specifying `-search "component[ \t]*:.*pattern" ' It is used to pick a component which is not one of "To:", "cc:", "Date:", "From:", or "Subject:". An example is `pick --reply-to pooh'. Pattern matching is performed on a per-line basis. Within the header of the message, each component is treated as one long line, but in the body, each line is separate. Lower-case letters in the search pattern will match either lower or upper case in the mes- sage, while upper case will match only upper case. Note that since the `-date' switch is a pattern matching operation (as described above), to find messages sent on a certain date the [mh.6] MH.6.8 UCI version PICK(1) -86- PICK(1) pattern string must match the text of the "Date:" field of the mes- sage. Independent of any pattern matching operations requested, the switches `-after date' or `-before date' may also be used to intro- duce date/time contraints on all of the messages. By default, the "Date:" field is consulted, but if another date yielding field (such as "BB-Posted:" or "Delivery-Date:") should be used, the `-datefield field' switch may be used. With `-before' and `-after', _p_i_c_k will actually parse the date fields in each of the messages specified in `msgs' and compare them to the date/time specified. If `-after' is given, then only those messages whose "Date:" field value is chronologically after the date specified will be considered. The `-before' switch specifies the complimentary action. Both the `-after' and `-before' switches take legal 822-style date specifications as arguments. _P_i_c_k will default certain missing fields so that the entire date need not be specified. These fields are (in order of defaulting): timezone, time and timezone, date, date and timezone. All defaults are taken from the current date, time, and timezone. In addition to 822-style dates, _p_i_c_k will also recognize any of the days of the week ("sunday", "monday", and so on), and the special dates "today", "yesterday" (24 hours ago), and "tomorrow" (24 hours from now). All days of the week are judged to refer to a day in the past (e.g., telling _p_i_c_k "saturday" on a "tuesday" means "last saturday" not "this saturday"). Finally, in addition to these special specifications, _p_i_c_k will also honor a specification of the form "-dd", which means "dd days ago". _P_i_c_k supports complex boolean operations on the searching primi- tives with the `-and', `-or', `-not', and `-lbrace ... -rbrace' switches. For example, pick -after yesterday -and -lbrace -from freida -or -from fear -rbrace identifies messages recently sent by "frieda" or "fear". The matching primitives take precedence over the `-not' switch, which in turn takes precedence over `-and' which in turn takes pre- cedence over `-or'. To override the default precedence, the `-lbrace' and `-rbrace' switches are provided, which act just like opening and closing parentheses in logical expressions. If no search criteria are given, all the messages specified on the command line are selected (this defaults to "all"). [mh.6] MH.6.8 UCI version PICK(1) -87- PICK(1) Once the search has been performed, if the `-list' switch is given, the message numbers of the selected messages are written to the standard output separated by newlines. This is _e_x_t_r_e_m_e_l_y useful for quickly generating arguments for other _M_H programs by using the "backquoting" syntax of the shell. For example, the command scan `pick +todo -after "31 Mar 83 0123 PST"` says to _s_c_a_n those messages in the indicated folder which meet the appropriate criterion. Note that since _p_i_c_k 's context changes are written out prior to _s_c_a_n 's invocation, you need not give the folder argument to _s_c_a_n as well. Regardless of the operation of the `-list' switch, the `-sequence name' switch may be given once for each sequence the user wishes to define. For each sequence named, that sequence will be defined to mean exactly those messages selected by _p_i_c_k. For example, pick -from frated -seq fred defines a new message sequence for the current folder called "fred" which contains exactly those messages that were selected. Note that whenever _p_i_c_k processes a `-sequence name' switch, it sets `-nolist'. By default, _p_i_c_k will zero the sequence before adding it. This action can be disabled with the `-nozero' switch, which means that the messages selected by _p_i_c_k will be added to the sequence, if it already exists, and any messages already a part of that sequence will remain so. The `-public' and `-nopublic' switches are used by _p_i_c_k in the same way _m_a_r_k uses them. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder _S_e_e _A_l_s_o mark(1) [mh.6] MH.6.8 UCI version PICK(1) -88- PICK(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to all `-datefield date' `-nopublic' if the folder is read-only, `-public' otherwise `-zero' `-list' is the default if no `-sequence', `-nolist' otherwise _C_o_n_t_e_x_t If a folder is given, it will become the current folder. _H_i_s_t_o_r_y In previous versions of _M_H, the _p_i_c_k command would _s_h_o_w, _s_c_a_n, or _r_e_f_i_l_e the selected messages. This was rather "inverted logic" from the UNIX point of view, so _p_i_c_k was changed to define se- quences and output those sequences. Hence, _p_i_c_k can be used to generate the arguments for all other _M_H commands, instead of giving _p_i_c_k endless switches for invoking those commands itself. Also, previous versions of _p_i_c_k balked if you didn't specify a search string or a date/time constraint. The current version does not, and merely matches the messages you specify. This lets you type something like: show `pick last:20 -seq fear` instead of typing mark -add -nozero -seq fear last:20 show fear Finally, timezones used to be ignored when comparing dates: they aren't any more. _H_e_l_p_f_u_l _H_i_n_t_s Use "pick sequence -list" to enumerate the messages in a sequence (such as for use by a shell script). [mh.6] MH.6.8 UCI version PICK(1) -89- PICK(1) _B_u_g_s The argument to the `-after' and `-before' switches must be inter- preted as a single token by the shell that invokes _p_i_c_k. There- fore, one must usually place the argument to this switch inside double-quotes. Furthermore, any occurance of `-datefield' must oc- cur prior to the `-after' or `-before' switch it applies to. If _p_i_c_k is used in a back-quoted operation, such as scan `pick -from jones` and _p_i_c_k selects no messages (e.g., no messages are from "jones"), then the shell will still run the outer command (e.g., "scan"). Since no messages were matched, _p_i_c_k produced no output, and the argument given to the outer command as a result of backquoting _p_i_c_k is empty. In the case of _M_H programs, the outer command now acts as if the default `msg' or `msgs' should be used (e.g., "all" in the case of _s_c_a_n ). To prevent this unexpected behavior, if `-list' was given, and if its standard output is not a tty, then _p_i_c_k outputs the illegal message number "0" when it fails. This lets the outer command fail gracefully as well. The pattern syntax "[l-r]" is not supported; each letter to be matched must be included within the square brackets. [mh.6] MH.6.8 UCI version PREV(1) -90- PREV(1) _N_A_M_E prev - show the previous message _S_Y_N_O_P_S_I_S prev [+folder] [-header] [-noheader] [-showproc program] [-noshowproc] [-switches for _s_h_o_w_p_r_o_c] [-help] _D_E_S_C_R_I_P_T_I_O_N _P_r_e_v performs a _s_h_o_w on the previous message in the specified (or current) folder. Like _s_h_o_w, it passes any switches on to the pro- gram named by _s_h_o_w_p_r_o_c, which is called to list the message. This command is almost exactly equivalent to "show prev". Consult the manual entry for _s_h_o_w (1) for all the details. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder showproc: Program to show the message _S_e_e _A_l_s_o show(1), next(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `-header' _C_o_n_t_e_x_t If a folder is specified, it will become the current folder. The message that is shown (i.e., the previous message in sequence) will become the current message. _B_u_g_s _p_r_e_v is really a link to the _s_h_o_w program. As a result, if you make a link to _p_r_e_v and that link is not called _p_r_e_v, your link will act like _s_h_o_w instead. To circumvent this, add a profile-entry for the link to your _M_H profile and add the argument _p_r_e_v to the entry. [mh.6] MH.6.8 UCI version PROMPTER(1) -91- PROMPTER(1) _N_A_M_E prompter - prompting editor front-end for MH _S_Y_N_O_P_S_I_S prompter [-erase chr] [-kill chr] [-prepend] [-noprepend] [-rapid] [-norapid] [-doteof] [-nodoteof] file [-help] _D_E_S_C_R_I_P_T_I_O_N This program is normally not invoked directly by users but takes the place of an editor and acts as an editor front-end. It operates on an 822-style message draft skeleton specified by file, normally provided by _c_o_m_p, _d_i_s_t, _f_o_r_w, or _r_e_p_l. _P_r_o_m_p_t_e_r is an editor which allows rapid composition of messages. It is particularly useful to network and low-speed (less than 2400 baud) users of _M_H. It is an _M_H program in that it can have its own profile entry with switches, but it is not invoked directly by the user. The commands _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l invoke _p_r_o_m_p_t_e_r as an editor, either when invoked with `-editor prompter', or by the profile entry "Editor: prompter", or when given the command `edit prompter' at "What now?" level. For each empty component _p_r_o_m_p_t_e_r finds in the draft, the user is prompted for a response; A will cause the whole component to be left out. Otherwise, a `\' preceding a will con- tinue the response on the next line, allowing for multiline com- ponents. Continuation lines must begin with a space or tab. Each non-empty component is copied to the draft and displayed on the terminal. The start of the message body is denoted by a blank line or a line of dashes. If the body is non-empty, the prompt, which isn't writ- ten to the file, is "--------Enter additional text", or (if `-prepend' was given) "--------Enter initial text". Message-body typing is terminated with an end-of-file (usually CTRL-D). With the `-doteof' switch, a period on a line all by itself also signifies end-of-file. At this point control is returned to the calling program, where the user is asked "What now?". See _w_h_a_t_n_o_w for the valid options to this query. By using the `-prepend' switch, the user can add type-in to the beginning of the message body and have the rest of the body follow. This is useful for the _f_o_r_w command. [mh.6] MH.6.8 UCI version PROMPTER(1) -92- PROMPTER(1) By using the `-rapid' switch, if the draft already contains text in the message-body, it is not displayed on the user's terminal. This is useful for low-speed terminals. The line editing characters for kill and erase may be specified by the user via the arguments `-kill chr' and `-erase chr', where chr may be a character; or `\nnn', where "nnn" is the octal value for the character. An interrupt (usually CTRL-C) during component typing will abort _p_r_o_m_p_t_e_r and the _M_H command that invoked it. An interrupt during message-body typing is equivalent to CTRL-D, for historical rea- sons. This means that _p_r_o_m_p_t_e_r should finish up and exit. The first non-flag argument to _p_r_o_m_p_t_e_r is taken as the name of the draft file, and subsequent non-flag arguments are ignored. _F_i_l_e_s $HOME/.mh_profile The user profile /tmp/prompter* Temporary copy of message _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s prompter-next: To name the editor to be used on exit from _p_r_o_m_p_t_e_r Msg-Protect: To set mode when creating a new draft _S_e_e _A_l_s_o comp(1), dist(1), forw(1), repl(1), whatnow(1) _D_e_f_a_u_l_t_s `-prepend' `-norapid' `-nodoteof' _C_o_n_t_e_x_t None _H_e_l_p_f_u_l _H_i_n_t_s The `-rapid' option is particularly useful with _f_o_r_w, and `-noprepend' is useful with _c_o_m_p -_u_s_e. The user may wish to link _p_r_o_m_p_t_e_r under several names (e.g., "ra- pid") and give appropriate switches in the profile entries under these names (e.g., "rapid: -rapid"). This facilitates invoking prompter differently for different _M_H commands (e.g., "forw: -edi- tor rapid"). [mh.6] MH.6.8 UCI version PROMPTER(1) -93- PROMPTER(1) _B_u_g_s _P_r_o_m_p_t_e_r uses _s_t_d_i_o (3), so it will lose if you edit files with nulls in them. [mh.6] MH.6.8 UCI version RCVSTORE(1) -94- RCVSTORE(1) _N_A_M_E rcvstore - incorporate new mail asynchronously _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/rcvstore [+folder] [-create] [-nocreate] [-sequence name ...] [-public] [-nopublic] [-zero] [-nozero] [-help] _D_E_S_C_R_I_P_T_I_O_N _R_c_v_s_t_o_r_e incorporates a message from the standard input into an _M_H folder. If `+folder' isn't specified, a folder in the user's _M_H directory will be used, either that specified by the "Inbox:" entry in the user's profile, or the folder named "inbox". The new mes- sage being incorporated is assigned the next highest number in the folder. If the specified (or default) folder doesn't exist, then it will be created if the `-create' option is specified, otherwise _r_c_v_s_t_o_r_e will exit. If the user's profile contains a "Msg-Protect: nnn" entry, it will be used as the protection on the newly created messages, otherwise the _M_H default of 0644 will be used. During all operations on mes- sages, this initially assigned protection will be preserved for each message, so _c_h_m_o_d(1) may be used to set a protection on an individual message, and its protection will be preserved thereafter. _R_c_v_s_t_o_r_e will incorporate anything except zero length messages into the user's MH folder. If the profile entry "Unseen-Sequence" is present and non-empty, then _r_c_v_s_t_o_r_e will add the newly incorporated message to each sequence named by the profile entry. This is similar to the "Previous-Sequence" profile entry supported by all _M_H commands which take `msgs' or `msg' arguments. Note that _r_c_v_s_t_o_r_e will not zero each sequence prior to adding messages. Furthermore, the incoming messages may be added to user-defined sequences as they arrive by appropriate use of the `-sequence' option. As with _p_i_c_k, use of the `-zero' and `-nozero' switches can also be used to zero old sequences or not. Similarly, use of the `-public' and `-nopublic switches may be used to force addi- tions to public and private sequences. _F_i_l_e_s $HOME/.mh_profile The user profile [mh.6] MH.6.8 UCI version RCVSTORE(1) -95- RCVSTORE(1) _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Folder-Protect: To set mode when creating a new folder Inbox: To find the default inbox Msg-Protect: To set mode when creating a new message Unseen-Sequence: To name sequences denoting unseen messages _S_e_e _A_l_s_o inc(1), pick(1), mh-mail(5) _D_e_f_a_u_l_t_s `+folder' defaults to "inbox" `-create' `-nopublic' if the folder is read-only, `-public' otherwise `-nozero' _C_o_n_t_e_x_t No context changes will be attempted, with the exception of se- quence manipulation. _B_u_g_s If you use the "Unseen-Sequence" profile entry, _r_c_v_s_t_o_r_e could try to update the context while another _M_H process is also trying to do so. This can cause the context to become corrupted. To avoid this, do not use _r_c_v_s_t_o_r_e if you use the "Unseen-Sequence" profile entry. [mh.6] MH.6.8 UCI version REFILE(1) -96- REFILE(1) _N_A_M_E refile - file message in other folders _S_Y_N_O_P_S_I_S refile [msgs] [-draft] [-link] [-nolink] [-preserve] [-nopreserve] [-src +folder] [-file file] [-rmmproc program] [-normmproc] +folder ... [-help] _D_E_S_C_R_I_P_T_I_O_N _R_e_f_i_l_e moves (_m_v (1)) or links (_l_n (1)) messages from a source folder into one or more destination folders. If you think of a message as a sheet of paper, this operation is not unlike filing the sheet of paper (or copies) in file cabinet folders. When a message is filed, it is linked into the destination folder(s) if possible, and is copied otherwise. As long as the destination folders are all on the same file system, multiple filing causes little storage overhead. This facility provides a good way to cross-file or multiply-index messages. For example, if a message is received from Jones about the ARPA Map Project, the command refile cur +jones +Map would allow the message to be found in either of the two folders `jones' or `Map'. The option `-file file' directs _r_e_f_i_l_e to use the specified file as the source message to be filed, rather than a message from a folder. Note that the file should be a validly formatted message, just like any other _M_H message. It should NOT be in mail drop for- mat (to convert a file in mail drop format to a folder of _M_H mes- sages, see _i_n_c (1)). If a destination folder doesn't exist, _r_e_f_i_l_e will ask if you want to create it. A negative response will abort the file operation. If the standard input for _r_e_f_i_l_e is _n_o_t a tty, then _r_e_f_i_l_e will not ask any questions and will proceed as if the user's answer was "yes" for all questions. The option `-link' preserves the source folder copy of the message (i.e., it does a _l_n(1) rather than a _m_v(1)), whereas, `-nolink' deletes the filed messages from the source folder. Normally, when a message is filed, it is assigned the next highest number avail- able in each of the destination folders. Use of the `-preserve' switch will override this message renaming, but name conflicts may occur, so use this switch cautiously. If `-link' is not specified (or `-nolink' is specified), the filed messages will be removed from the source folder, by renaming them with a site-dependent prefix (usually a comma). [mh.6] MH.6.8 UCI version REFILE(1) -97- REFILE(1) If the user has a profile component such as rmmproc: /bin/rm then _r_e_f_i_l_e will instead call the named program to delete the mes- sage files. The user may specify `-rmmproc program' on the command line to override this profile specification. The `-normmproc' option forces the message files to be deleted by renaming them as described above. The `-draft' switch tells _r_e_f_i_l_e to file the /draft. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Folder-Protect: To set mode when creating a new folder rmmproc: Program to delete the message _S_e_e _A_l_s_o folder(1) _D_e_f_a_u_l_t_s `-src +folder' defaults to the current folder `msgs' defaults to cur `-nolink' `-nopreserve' _C_o_n_t_e_x_t If `-src +folder' is given, it will become the current folder. If neither `-link' nor `all' is specified, the current message in the source folder will be set to the last message specified; otherwise, the current message won't be changed. If the Previous-Sequence profile entry is set, in addition to de- fining the named sequences from the source folder, _r_e_f_i_l_e will also define those sequences for the destination folders. See _m_h-_s_e_q_u_e_n_c_e (5) for information concerning the previous sequence. _B_u_g_s Since _r_e_f_i_l_e uses your _r_m_m_p_r_o_c to delete the message, the _r_m_m_p_r_o_c must NOT call _r_e_f_i_l_e without specifying `-normmproc', or you will create an infinte loop. [mh.6] MH.6.8 UCI version REPL(1) -98- REPL(1) _N_A_M_E repl - reply to a message _S_Y_N_O_P_S_I_S repl [+folder] [msg] [-annotate] [-noannotate] [-cc all/to/cc/me] [-nocc all/to/cc/me] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-fcc +folder] [-filter filterfile] [-form formfile] [-inplace] [-noinplace] [-query] [-noquery] [-width columns] [-whatnowproc program] [-nowhatnowproc] [-help] _D_E_S_C_R_I_P_T_I_O_N _R_e_p_l aids a user in producing a reply to an existing message. _R_e_p_l uses a reply template to guide its actions when constructing the message draft of the reply. In its simplest form (with no argu- ments), it will set up a message-form skeleton in reply to the current message in the current folder, and invoke the whatnow shell. The default reply template will direct _r_e_p_l to construct the composed message as follows: To: or cc: , , and yourself Subject: Re: In-reply-to: Your message of . where field names enclosed in angle brackets (< >) indicate the contents of the named field from the message to which the reply is being made. A reply template is simply a format file. See _m_h-_f_o_r_m_a_t (5) for the details. The `-cc type' switch takes an argument which specifies who gets placed on the "cc:" list of the reply. The `-query' switch modi- fies the action of `-cc type' switch by interactively asking you if each address that normally would be placed in the "To:" and "cc:" list should actually be sent a copy. (This is useful for special-purpose replies.) Note that the position of the `-cc' and `-nocc' switches, like all other switches which take a positive and negative form, is important. Lines beginning with the fields "To:", "cc:", and "Bcc:" will be standardized and have duplicate addresses removed. In addition, the `-width columns' switch will guide _r_e_p_l's formatting of these fields. If the file named "replcomps" exists in the user's MH directory, it will be used instead of the default form. In either case, the file specified by `-form formfile' will be used if given. If the draft already exists, _r_e_p_l will ask you as to the disposi- tion of the draft. A reply of quit will abort _r_e_p_l, leaving the [mh.6] MH.6.8 UCI version REPL(1) -99- REPL(1) draft intact; replace will replace the existing draft with a blank skeleton; and list will display the draft. See _c_o_m_p (1) for a description of the `-editor' and `-noedit' switches. Note that while in the editor, the message being replied to is available through a link named "@" (assuming the default _w_h_a_t_n_o_w_p_r_o_c ). In addition, the actual pathname of the message is stored in the envariable $editalt, and the pathname of the folder containing the message is stored in the envariable $mhfolder. Although _r_e_p_l uses the `-form formfile' switch to direct it how to construct the beginning of the draft, the `-filter filterfile' switch directs _r_e_p_l as to how the message being replied-to should be formatted in the body of the draft. If `-filter' is not speci- fied, then the message being replied-to is not included in the body of the draft. If `-filter filterfile' is specified, then the mes- sage being replied-to is filtered (re-formatted) prior to being output to the body of the draft. The filter file for _r_e_p_l should be a standard form file for _m_h_l, as _r_e_p_l will invoke _m_h_l to format the message being replied-to. There is no default message filter (`-filter' must be followed by a file name). A filter file that is commonly used is: : body:nocomponent,compwidth=9,offset=9 which says to output a blank line and then the body of the message being replied-to, indented by one tab-stop. Another format popular on USENET is: message-id:nocomponent,nonewline,\ formatfield="In message %{text}, " from:nocomponent,formatfield="%(friendly{text}) writes:" body:component=">",overflowtext=">",overflowoffset=0 Which cites the Message-ID and author of the message being replied-to, and then outputs each line of the body prefaced with the ">" character. If the `-annotate' switch is given, the message being replied-to will be annotated with the lines Replied: date Replied: addrs where the address list contains one line for each addressee. The annotation will be done only if the message is sent directly from _r_e_p_l. If the message is not sent immediately from _r_e_p_l, "comp -use" may be used to re-edit and send the constructed mes- sage, but the annotations won't take place. The `-inplace' switch causes annotation to be done in place in order to preserve links to [mh.6] MH.6.8 UCI version REPL(1) -100- REPL(1) the annotated message. The `-fcc +folder' switch can be used to automatically specify a folder to receive Fcc:s. More than one folder, each preceeded by `-fcc' can be named. In addition to the standard _m_h-_f_o_r_m_a_t (5) escapes, _r_e_p_l also recog- nizes the following additional _c_o_m_p_o_n_e_n_t escape: _E_s_c_a_p_e _R_e_t_u_r_n_s _D_e_s_c_r_i_p_t_i_o_n _f_c_c string Any folders specified with `-fcc folder' To avoid reiteration, _r_e_p_l strips any leading `Re: ' strings from the _s_u_b_j_e_c_t component. The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. Upon exiting from the editor, _r_e_p_l will invoke the _w_h_a_t_n_o_w program. See _w_h_a_t_n_o_w (1) for a discussion of available options. The invoca- tion of this program can be inhibited by using the `-nowhatnowproc' switch. (In truth of fact, it is the _w_h_a_t_n_o_w program which starts the initial edit. Hence, `-nowhatnowproc' will prevent any edit from occurring.) _F_i_l_e_s /usr/bs/mh-6.8/lib/replcomps The reply template or /replcomps Rather than the standard template $HOME/.mh_profile The user profile /draft The draft file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Alternate-Mailboxes: To determine the user's mailboxes Current-Folder: To find the default current folder Draft-Folder: To find the default draft-folder Editor: To override the default editor Msg-Protect: To set mode when creating a new message (draft) fileproc: Program to refile the message mhlproc: Program to filter message being replied-to whatnowproc: Program to ask the "What now?" questions _S_e_e _A_l_s_o comp(1), dist(1), forw(1), send(1), whatnow(1), mh-format(5) [mh.6] MH.6.8 UCI version REPL(1) -101- REPL(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msg' defaults to cur `-nocc all' at ATHENA sites, `-cc all' otherwise `-noannotate' `-nodraftfolder' `-noinplace' `-noquery' `-width 72' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The mes- sage replied-to will become the current message. _H_i_s_t_o_r_y Prior to using the format string mechanism, `-noformat' used to cause address headers to be output as-is. Now all address fields are formatted using Internet standard guidelines. _B_u_g_s If any addresses occur in the reply template, addresses in the tem- plate that do not contain hosts are defaulted incorrectly. Instead of using the localhost for the default, _r_e_p_l uses the sender's host. Moral of the story: if you're going to include addresses in a reply template, include the host portion of the address. The `-width columns' switch is only used to do address-folding; other headers are not line-wrapped. If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _r_e_p_l uses a built-in _w_h_a_t_n_o_w, it does not actually run the _w_h_a_t_n_o_w program. Hence, if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w since _r_e_p_l won't run it. If your current working directory is not writable, the link named "@" is not available. [mh.6] MH.6.8 UCI version RMF(1) -102- RMF(1) _N_A_M_E rmf - remove an MH folder _S_Y_N_O_P_S_I_S rmf [+folder] [-interactive] [-nointeractive] [-help] _D_E_S_C_R_I_P_T_I_O_N _R_m_f removes all of the messages (files) within the specified (or default) folder, and then removes the folder (directory) itself. If there are any files within the folder which are not a part of _M_H, they will _n_o_t be removed, and an error will be produced. If the folder is given explicitly or the `-nointeractive' option is given, then the folder will be removed without confirmation. Oth- erwise, the user will be asked for confirmation. If _r_m_f can't find the current folder, for some reason, the folder to be removed defaults to `+inbox' (unless overridden by user's profile entry "Inbox") with confirmation. _R_m_f irreversibly deletes messages that don't have other links, so use it with caution. If the folder being removed is a subfolder, the parent folder will become the new current folder, and _r_m_f will produce a message tel- ling the user this has happened. This provides an easy mechanism for selecting a set of messages, operating on the list, then remov- ing the list and returning to the current folder from which the list was extracted. _R_m_f of a read-only folder will delete the private sequence and cur information (i.e., "atr-_s_e_q-_f_o_l_d_e_r" entries) from the profile without affecting the folder itself. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Inbox: To find the default inbox _S_e_e _A_l_s_o rmm(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder, usually with confirmation `-interactive' if +folder' not given, `-nointeractive' otherwise [mh.6] MH.6.8 UCI version RMF(1) -103- RMF(1) _C_o_n_t_e_x_t _R_m_f will set the current folder to the parent folder if a subfolder is removed; or if the current folder is removed, it will make "in- box" current. Otherwise, it doesn't change the current folder or message. _B_u_g_s Although intuitively one would suspect that _r_m_f works recursively, it does not. Hence if you have a sub-folder within a folder, in order to _r_m_f the parent, you must first _r_m_f each of the children. [mh.6] MH.6.8 UCI version RMM(1) -104- RMM(1) _N_A_M_E rmm - remove messages _S_Y_N_O_P_S_I_S rmm [+folder] [msgs] [-help] _D_E_S_C_R_I_P_T_I_O_N _R_m_m removes the specified messages by renaming the message files with preceding commas. Many sites consider files that start with a comma to be a temporary backup, and arrange for _c_r_o_n (8) to remove such files once a day. If the user has a profile component such as rmmproc: /bin/rm then instead of simply renaming the message file, _r_m_m will call the named program to delete the file. Note that at most installations, _c_r_o_n (8) is told to remove files that begin with a comma once a night. Some users of csh prefer the following: alias rmm 'refile +d' where folder +d is a folder for deleted messages, and alias mexp 'rm `mhpath +d all`' is used to "expunge" deleted messages. The current message is not changed by _r_m_m, so a _n_e_x_t will advance to the next message in the folder as expected. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder rmmproc: Program to delete the message _S_e_e _A_l_s_o rmf(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to cur [mh.6] MH.6.8 UCI version RMM(1) -105- RMM(1) _C_o_n_t_e_x_t If a folder is given, it will become the current folder. _B_u_g_s Since _r_e_f_i_l_e uses your _r_m_m_p_r_o_c to delete the message, the _r_m_m_p_r_o_c must NOT call _r_e_f_i_l_e without specifying `-normmproc', or you will create an infinte loop. [mh.6] MH.6.8 UCI version SCAN(1) -106- SCAN(1) _N_A_M_E scan - produce a one line per message scan listing _S_Y_N_O_P_S_I_S scan [+folder] [msgs] [-clear] [-noclear] [-form formatfile] [-format string] [-header] [-noheader] [-width columns] [-reverse] [-noreverse] [-file filename] [-help] _D_E_S_C_R_I_P_T_I_O_N _S_c_a_n produces a one-line-per-message listing of the specified mes- sages. Each _s_c_a_n line contains the message number (name), the date, the "From:" field, the "Subject" field, and, if room allows, some of the body of the message. For example: 15+ 7/ 5 Dcrocker nned <> if the body is sufficiently short. _S_c_a_n actually reads each of the specified messages and parses them to extract the desired fields. During parsing, appropriate error mes- sages will be produced if there are format errors in any of the messages. The `-header' switch produces a header line prior to the _s_c_a_n list- ing. Currently, the name of the folder and the current date and time are output (see the HISTORY section for more information). If the `-clear' switch is used and _s_c_a_n'_s output is directed to a terminal, then _s_c_a_n will consult the $TERM and $TERMCAP envariables to determine your terminal type in order to find out how to clear the screen prior to exiting. If the `-clear' switch is used and _s_c_a_n'_s output is not directed to a terminal (e.g., a pipe or a file), then _s_c_a_n will send a formfeed prior to exiting. For example, the command: (scan -clear -header; show all -show pr -f) | lpr produces a scan listing of the current folder, followed by a formfeed, followed by a formatted listing of all messages in the folder, one per page. Omitting `-show pr -f' will cause the mes- sages to be concatenated, separated by a one-line header and two [mh.6] MH.6.8 UCI version SCAN(1) -107- SCAN(1) blank lines. If _s_c_a_n encounters a message without a "Date:" field, rather than leaving that portion of the scan listing blank, the date is filled-in with the last write date of the message, and post-fixed with a `*'. This is particularly handy for scanning a _d_r_a_f_t _f_o_l_d_e_r, as message drafts usually aren't allowed to have dates in them. To override the output format used by _s_c_a_n, the `-format string' or `-format file' switches are used. This permits individual fields of the scan listing to be extracted with ease. The string is sim- ply a format string and the file is simply a format file. See _m_h-_f_o_r_m_a_t (5) for the details. In addition to the standard _m_h-_f_o_r_m_a_t (5) escapes, _s_c_a_n also recog- nizes the following additional _c_o_m_p_o_n_e_n_t escapes: _E_s_c_a_p_e _R_e_t_u_r_n_s _D_e_s_c_r_i_p_t_i_o_n body string the (compressed) first part of the body dtimenow date the current date folder string the name of the current folder Also, if no date header was present in the message, the _f_u_n_c_t_i_o_n escapes which operate on {_d_a_t_e} will return values for the date of last modification of the message file itself. _s_c_a_n will update the _M_H context prior to starting the listing, so interrupting a long _s_c_a_n listing preserves the new context. _M_H purists hate this idea. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Alternate-Mailboxes: To determine the user's mailboxes Current-Folder: To find the default current folder _S_e_e _A_l_s_o inc(1), pick(1), show(1), mh-format(5) _D_e_f_a_u_l_t_s `+folder' defaults to the folder current `msgs' defaults to all `-format' defaulted as described above `-noheader' `-width' defaulted to the width of the terminal [mh.6] MH.6.8 UCI version SCAN(1) -108- SCAN(1) _C_o_n_t_e_x_t If a folder is given, it will become the current folder. _H_i_s_t_o_r_y Prior to using the format string mechanism, `-header' used to gen- erate a heading saying what each column in the listing was. Format strings prevent this from happening. _B_u_g_s The argument to the `-format' switch must be interpreted as a sin- gle token by the shell that invokes _s_c_a_n. Therefore, one must usu- ally place the argument to this switch inside double-quotes. The value of each _c_o_m_p_o_n_e_n_t escape is set by _s_c_a_n to the contents of the first message header _s_c_a_n encounters with the corresponding component name; any following headers with the same component name are ignored. The switch `-reverse', makes _s_c_a_n list the messages in reverse ord- er; this should be considered a bug. The `-file filename' switch allows the user to obtain a _s_c_a_n list- ing of a maildrop file as produced by _p_a_c_k_f. This listing includes every message in the file. The user should use _m_s_h for more selec- tive processing of the file. `-reverse' is ignored with this op- tion. [mh.6] MH.6.8 UCI version SEND(1) -109- SEND(1) _N_A_M_E send - send a message _S_Y_N_O_P_S_I_S send [-alias aliasfile] [-draft] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-filter filterfile] [-nofilter] [-format] [-noformat] [-forward] [-noforward] [-mime] [-nomime] [-msgid] [-nomsgid] [-push] [-nopush] [-split seconds] [-verbose] [-noverbose] [-watch] [-nowatch] [-width columns] [file ...] [-help] _D_E_S_C_R_I_P_T_I_O_N _S_e_n_d will cause each of the specified files to be delivered (via _p_o_s_t (8)) to each of the destinations in the "To:", "cc:", "Bcc:", and "Fcc:" fields of the message. If _s_e_n_d is re-distributing a message, as invoked from _d_i_s_t, then the corresponding "Resent-xxx" fields are examined instead. If `-push' is specified, _s_e_n_d will detach itself from the user's terminal and perform its actions in the background. If _p_u_s_h 'd and the draft can't be sent, then the `-forward' switch says that draft should be forwarded with the failure notice sent to the user. This differs from putting _s_e_n_d in the background because the output is trapped and analyzed by _M_H. If `-verbose' is specified, _s_e_n_d will indicate the interactions occurring with the transport system, prior to actual delivery. If `-watch' is specified _s_e_n_d will monitor the delivery of local and network mail. Hence, by specifying both switches, a large detail of information can be gathered about each step of the message's entry into the transport system. The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. If `-split' is specified, _s_e_n_d will split the draft into one or more partial messages prior to sending. This makes use of the multi-media content feature in MH. Note however that if _s_e_n_d is invoked under _d_i_s_t (1), then this switch is ignored -- it makes no sense to redistribute a message in this fashion. Sometimes you want _s_e_n_d to pause after posting a partial message. This is usu- ally the case when you are running _s_e_n_d_m_a_i_l and expect to generate a lot of partial messages. The argument to `-split' tells it how long to pause between postings. _S_e_n_d with no _f_i_l_e argument will query whether the draft is the intended file, whereas `-draft' will suppress this question. Once the transport system has successfully accepted custody of the mes- sage, the file will be renamed with a leading comma, which allows [mh.6] MH.6.8 UCI version SEND(1) -110- SEND(1) it to be retrieved until the next draft message is sent. If there are errors in the formatting of the message, _s_e_n_d will abort with a (hopefully) helpful error message. If a "Bcc:" field is encountered, its addresses will be used for delivery, and the "Bcc:" field will be removed from the message sent to sighted recipients. The blind recipients will receive an entirely new message with a minimal set of headers. Included in the body of the message will be a copy of the message sent to the sighted recipients. If `-filter filterfile' is specified, then this copy is filtered (re-formatted) prior to being sent to the blind recipients. Otherwise, to use the MIME rules for encapsula- tion, specify the `-mime' switch. Prior to sending the message, the fields "From: user@local", and "Date: now" will be appended to the headers in the message. If the envariable $SIGNATURE is set, then its value is used as your per- sonal name when constructing the "From:" line of the message. If this envariable is not set, then _s_e_n_d will consult the profile entry "Signature" for this information. On hosts where _M_H was con- figured with the UCI option, if $SIGNATURE is not set and the "Sig- nature" profile entry is not present, then the file $HOME/.signature is consulted. If `-msgid' is specified, then a "Message-ID:" field will also be added to the message. If _s_e_n_d is re-distributing a message (when invoked by _d_i_s_t ), then "Resent-" will be prepended to each of these fields: "From:", "Date:", and "Message-ID:". If the message already contains a "From:" field, then a "Sender: user@local" field will be added as well. (An already existing "Sender:" field is an error!) By using the `-format' switch, each of the entries in the "To:" and "cc:" fields will be replaced with "standard" format entries. This standard format is designed to be usable by all of the message handlers on the various systems around the Internet. If `-nofor- mat' is given, then headers are output exactly as they appear in the message draft. If an "Fcc: folder" is encountered, the message will be copied to the specified folder for the sender in the format in which it will appear to any non-Bcc receivers of the message. That is, it will have the appended fields and field reformatting. The "Fcc:" fields will be removed from all outgoing copies of the message. By using the `-width columns' switch, the user can direct _s_e_n_d as to how long it should make header lines containing addresses. The files specified by the profile entry "Aliasfile:" and any addi- tional alias files given by the `-alias aliasfile' switch will be read (more than one file, each preceeded by `-alias', can be named). See _m_h-_a_l_i_a_s (5) for more information. [mh.6] MH.6.8 UCI version SEND(1) -111- SEND(1) _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Draft-Folder: To find the default draft-folder Aliasfile: For a default alias file Signature: To determine the user's mail signature mailproc: Program to post failure notices postproc: Program to post the message _S_e_e _A_l_s_o comp(1), dist(1), forw(1), repl(1), mh-alias(5), post(8) _D_e_f_a_u_l_t_s `file' defaults to /draft `-alias /usr/bs/mh-6.8/lib/MailAliases' `-nodraftfolder' `-nofilter' `-format' `-forward' `-nomime' `-nomsgid' `-nopush' `-noverbose' `-nowatch' `-width 72' _C_o_n_t_e_x_t None _B_u_g_s Under some configurations, it is not possible to mointor the mail delivery transaction; `-watch' is a no-op on those systems. Using `-split 0' doesn't work correctly. [mh.6] MH.6.8 UCI version SHOW(1) -112- SHOW(1) _N_A_M_E show - show (list) messages _S_Y_N_O_P_S_I_S show [+folder] [msgs] [-draft] [-header] [-noheader] [-showproc program] [-noshowproc] [switches for _s_h_o_w_p_r_o_c] [-help] _D_E_S_C_R_I_P_T_I_O_N _S_h_o_w lists each of the specified messages to the standard output (typically, the terminal). Typically, the messages are listed exactly as they are, with no reformatting. A program named by the _s_h_o_w_p_r_o_c profile component is invoked to do the listing, and any switches not recognized by _s_h_o_w are passed along to that program. The default program is known as _m_o_r_e (1). To override the default and the _s_h_o_w_p_r_o_c profile component, use the `-showproc program' switch. For example, `-show pr' will cause the _p_r (1) program to list the messages. The _M_H command _m_h_l can be used as a _s_h_o_w_p_r_o_c to show messages in a more uniform format. Normally, this program is specified as the _s_h_o_w_p_r_o_c is the user's .mh_profile. See _m_h_l (1) for the details. If the `-noshowproc' option is specified, `/bin/cat' is used instead of _s_h_o_w_p_r_o_c. If you have messages with multi-media content, you should define the profile entry _m_h_n_p_r_o_c, which is the name of a program to mani- pulate multi-media messages. The _m_h_n (1) program is suitable for this purpose. Note that if the _m_h_n_p_r_o_c profile entry is defined, the `-noshowproc' option is NOT specified, and if one or more named messages has a multi-media content, then the program indicated by _m_h_n_p_r_o_c will be run instead of _s_h_o_w_p_r_o_c. The use of the _m_h_n_p_r_o_c can also be disabled if the environment variable $NOMHNPROC is set. The `-header' switch tells _s_h_o_w to display a one-line description of the message being shown. This description includes the folder and the message number. If no `msgs' are specified, the current message is used. If more than one message is specified, _m_o_r_e will prompt for a prior to listing each message. _m_o_r_e will list each message, a page at a time. When the end of page is reached, _m_o_r_e will ring the bell and wait for a or . If a is entered, _m_o_r_e will print the next line, whereas will print the next screenful. To exit _m_o_r_e, type "q". If the standard output is not a terminal, no queries are made, and each file is listed with a one-line header and two lines of separa- tion. "show -draft" will list the file /draft if it exists. If the profile entry "Unseen-Sequence" is present and non-empty, [mh.6] MH.6.8 UCI version SHOW(1) -113- SHOW(1) then _s_h_o_w will remove each of the messages shown from each sequence named by the profile entry. This is similar to the "Previous-Sequence" profile entry supported by all _M_H commands which take `msgs' or `msg' arguments. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder Unseen-Sequence: To name sequences denoting unseen messages showproc: Program to show messages mhnproc: Program to show messages with multi-media con- tent _S_e_e _A_l_s_o mhl(1), more(1), next(1), pick(1), prev(1), scan(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to cur `-header' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. The last message shown will become the current message. [mh.6] MH.6.8 UCI version SHOW(1) -114- SHOW(1) _B_u_g_s The `-header' switch doesn't work when `msgs' expands to more than one message. If the _s_h_o_w_p_r_o_c is _m_h_l, then is problem can be cir- cumvented by referencing the "messagename" field in the _m_h_l format file. _S_h_o_w updates the user's context before showing the message. Hence _s_h_o_w will mark messages as seen prior to the user actually seeing them. This is generally not a problem, unless the user relies on the "unseen" messages mechanism, and interrupts _s_h_o_w while it is showing "unseen" messages. If _s_h_o_w_p_r_o_c is _m_h_l, then _s_h_o_w uses a built-in _m_h_l: it does not ac- tually run the _m_h_l program. Hence, if you define your own _s_h_o_w_p_r_o_c, don't call it _m_h_l since _s_h_o_w won't run it. If _m_o_r_e (1) is your showproc (the default), then avoid running _s_h_o_w in the background with only its standard output piped to another process, as in show | imprint & Due to a bug in _m_o_r_e, show will go into a "tty input" state. To avoid this problem, re-direct _s_h_o_w's diagnostic output as well. For users of _c_s_h: show |& imprint & For users of _s_h: show 2>&1 | imprint & [mh.6] MH.6.8 UCI version SLOCAL(1) -115- SLOCAL(1) _N_A_M_E slocal - special local mail delivery _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/slocal [address info sender] [-addr address] [-info data] [-sender sender] [-user username] [-mailbox mbox] [-file file] [-maildelivery deliveryfile] [-verbose] [-noverbose] [-debug] [-help] _D_E_S_C_R_I_P_T_I_O_N _S_l_o_c_a_l is a program designed to allow you to have your inbound mail processed according to a complex set of selection criteria. You do not normally invoke _s_l_o_c_a_l yourself, rather _s_l_o_c_a_l is invoked on your behalf by your system's Message Transfer Agent. The message selection criteria used by _s_l_o_c_a_l is specified in the file ._m_a_i_l_d_e_l_i_v_e_r_y in the user's home directory. The format of this file is given below. The message delivery address and message sender are determined from the Message Transfer Agent envelope information, if possible. Under _S_e_n_d_M_a_i_l, the sender will obtained from the UUCP "From " line, if present. The user may override these values with command line arguments, or arguments to the `-addr' and `-sender' switches. The message is normally read from the standard input. The `-file' switch sets the name of the file from which the message should be read, instead of reading stdin. The `-user' switch tells _s_l_o_c_a_l the name of the user for whom it is delivering mail. The `-mail- box' switch tells _s_l_o_c_a_l the name of the user's maildrop file. The `-info' switch may be used to pass an arbitrary argument to sub-processes which _s_l_o_c_a_l may invoke on your behalf. The `-ver- bose' switch causes _s_l_o_c_a_l to give information on stdout about its progress. The `-debug' switch produces more verbose debugging out- put on stderr. _M_e_s_s_a_g_e _T_r_a_n_s_f_e_r _A_g_e_n_t_s If your MTA is _S_e_n_d_M_a_i_l, you should include the line "| /usr/bs/mh-6.8/lib/slocal -user username" in your .forward file in your home directory. This will cause _S_e_n_d_M_a_i_l to invoke _s_l_o_c_a_l on your behalf. If your MTA is _M_M_D_F-_I, you should (symbolically) link /usr/bs/mh- 6.8/lib/slocal to the file bin/rcvmail in your home directory. This will cause _M_M_D_F-_I to invoke _s_l_o_c_a_l on your behalf with the [mh.6] MH.6.8 UCI version SLOCAL(1) -116- SLOCAL(1) correct "_a_d_d_r_e_s_s _i_n_f_o _s_e_n_d_e_r" arguments. If your MTA is _M_M_D_F-_I_I, then you should not use _s_l_o_c_a_l. An equivalent functionality is already provided by _M_M_D_F-_I_I; see mail- delivery(5) for details. _T_h_e _M_a_i_l_d_e_l_i_v_e_r_y _F_i_l_e The ._m_a_i_l_d_e_l_i_v_e_r_y file controls how local delivery is performed. Each line of this file consists of five fields, separated by white-space or comma. Since double-quotes are honored, these char- acters may be included in a single argument by enclosing the entire argument in double-quotes. A double-quote can be included by preceding it with a backslash. Lines beginning with `#' are ignored. The format of each line in the ._m_a_i_l_d_e_l_i_v_e_r_y file is: header pattern action result string header: The name of a header field that is to be searched for a pat- tern. This is any field in the headers of the message that might be present. The following special fields are also defined: _s_o_u_r_c_e the out-of-band sender information _a_d_d_r the address that was used to cause delivery to the recipient _d_e_f_a_u_l_t this matches _o_n_l_y if the message hasn't been delivered yet * this always matches pattern: The sequence of characters to match in the specified header field. Matching is case-insensitive, but does not use regular expressions. action: The action to take to deliver the message: _d_e_s_t_r_o_y This action always succeeds. _f_i_l_e or > Append the message to the file named by string. The message is appended to the file in the maildrop for- mat which is used by your message transport system. If the message can be appended to the file, then this action succeeds. When writing to the file, a "Delivery-Date: date" header is added which indi- cates the date and time that message was appended to the file. [mh.6] MH.6.8 UCI version SLOCAL(1) -117- SLOCAL(1) _m_b_o_x Identical to _f_i_l_e, but always appends the message using the format used by _p_a_c_k_f (the MMDF mailbox format). _p_i_p_e or | Pipe the message as the standard input to the com- mand named by string, using the Bourne shell _s_h(1) to interpret the string. Prior to giving the string to the shell, it is expanded with the following built-in variables: $(sender) the out-of-band sender information $(address) the address that was used to cause delivery to the recipient $(size) the size of the message in bytes $(reply-to) either the "Reply-To:" or "From:" field of the message $(info) the out-of-band information specified _q_p_i_p_e or <_c_a_r_e_t> Similar to _p_i_p_e, but executes the command directly, after built-in variable expansion, without assis- tance from the shell. This action can be used to avoid quoting special characters which your shell might interpret. result: Indicates how the action should be performed: _A Perform the action. If the action succeeds, then the message is considered delivered. _R Perform the action. Regardless of the outcome of the action, the message is not considered delivered. ? Perform the action only if the message has not been delivered. If the action succeeds, then the message is considered delivered. _N Perform the action only if the message has not been delivered and the previous action succeeded. If this action succeeds, then the message is considered delivered. To summarize, here's an example: #_f_i_e_l_d _p_a_t_t_e_r_n _a_c_t_i_o_n _r_e_s_u_l_t _s_t_r_i_n_g # lines starting with a '#' are ignored, as are blank lines # # file mail with mmdf2 in the "To:" line into file mmdf2.log _T_o _m_m_d_f_2 _f_i_l_e _A _m_m_d_f_2._l_o_g # Messages from mmdf pipe to the program err-message-archive _F_r_o_m _m_m_d_f _p_i_p_e _A /_b_i_n/_e_r_r-_m_e_s_s_a_g_e-_a_r_c_h_i_v_e # Anything with the "Sender:" address "mh-workers" [mh.6] MH.6.8 UCI version SLOCAL(1) -118- SLOCAL(1) # file in mh.log if not filed already _S_e_n_d_e_r _m_h-_w_o_r_k_e_r_s _f_i_l_e ? _m_h._l_o_g # "To:" unix - put in file unix-news _T_o _U_n_i_x > _A _u_n_i_x-_n_e_w_s # if the address is jpo=ack - send an acknowledgement copy back _a_d_d_r _j_p_o=_a_c_k | _R "/_b_i_n/_r_e_s_e_n_d -_r $(_r_e_p_l_y-_t_o)" # anything from steve - destroy! _F_r_o_m _s_t_e_v_e _d_e_s_t_r_o_y _A - # anything not matched yet - put into mailbox _d_e_f_a_u_l_t - > ? _m_a_i_l_b_o_x # always run rcvtty * - | _R /_m_h/_l_i_b/_r_c_v_t_t_y The file is always read completely, so that several matches can be made and several actions can be taken. The ._m_a_i_l_d_e_l_i_v_e_r_y file must be owned either by the user or by root, and must be writable only by the owner. If the ._m_a_i_l_d_e_l_i_v_e_r_y file cannot be found, or does not perform an action which delivers the message, then the file /usr/bs/mh-6.8/lib/maildelivery is read according to the same rules. This file must be owned by the root and must be writable only by the root. If this file cannot be found or does not perform an action which delivers the message, then standard delivery to the user's maildrop is performed. _S_u_b-_p_r_o_c_e_s_s _e_n_v_i_r_o_n_m_e_n_t When a process is invoked, its environment is: the user/group-ids are set to recipient's ids; the working directory is the recipient's home directory; the umask is 0077; the process has no /dev/tty; the standard input is set to the message; the standard output and diagnostic output are set to /dev/null; all other file- descriptors are closed; the envariables $USER, $HOME, $SHELL are set appropriately, and no other envariables exist. The process is given a certain amount of time to execute. If the process does not exit within this limit, the process will be ter- minated with extreme prejudice. The amount of time is calculated as ((size x 60) + 300) seconds, where size is the number of bytes in the message. The exit status of the process is consulted in determining the suc- cess of the action. An exit status of zero means that the action succeeded. Any other exit status (or abnormal termination) means that the action failed. In order to avoid any time limitations, you might implement a pro- cess that began by _f_o_r_k_i_n_g. The parent would return the appropri- ate value immediately, and the child could continue on, doing what- ever it wanted for as long as it wanted. This approach is somewhat risky if the parent is going to return an exit status of zero. If the parent is going to return a non-zero exit status, then this [mh.6] MH.6.8 UCI version SLOCAL(1) -119- SLOCAL(1) approach can lead to quicker delivery into your maildrop. _F_i_l_e_s /usr/bs/mh-6.8/lib/mtstailor MH tailor file $HOME/.maildelivery The file controlling local delivery /usr/bs/mh-6.8/lib/maildelivery Rather than the standard file /usr/spool/mail/$USER The default maildrop _S_e_e _A_l_s_o rcvstore(1), mhook(1), mh-format(5) , maildelivery(5) _D_e_f_a_u_l_t_s `-noverbose' `-maildelivery .maildelivery' `-mailbox /usr/spool/mail/$USER' `-file' defaults to stdin `-user' defaults to the current user _C_o_n_t_e_x_t None _H_i_s_t_o_r_y _S_l_o_c_a_l is designed to be backward-compatible with the _m_a_i_l_d_e_l_i_v_e_r_y facility provided by _M_M_D_F-_I_I. Thus, the ._m_a_i_l_d_e_l_i_v_e_r_y file syntax is limited, as is the functionality of _s_l_o_c_a_l. In addition to an exit status of zero, the _M_M_D_F values _R_P__M_O_K (32) and _R_P__O_K (9) mean that the message has been fully delivered. Any other non-zero exit status, including abnormal termination, is in- terpreted as the _M_M_D_F value _R_P__M_E_C_H (200), which means "use an al- ternate route" (deliver the message to the maildrop). _B_u_g_s Only two return codes are meaningful, others should be. _S_l_o_c_a_l is designed to be backwards-compatible with the _m_a_i_l_d_e_l_i_v_e_r_y functionality provided by MMDF-II. Versions of _M_M_D_F with the _m_a_i_l_d_e_l_i_v_e_r_y mechanism aren't entirely backwards-compatible with earlier versions of _M_M_D_F. If you have an _M_M_D_F-_I old-style hook, the best you can do is to have a one-line ._m_a_i_l_d_e_l_i_v_e_r_y file: default - pipe A "bin/rcvmail $(address) $(info) $(sender)" [mh.6] MH.6.8 UCI version SORTM(1) -120- SORTM(1) _N_A_M_E sortm - sort messages _S_Y_N_O_P_S_I_S sortm [+folder] [msgs] [-datefield field] [-textfield field] [-notextfield] [-limit days] [-nolimit] [-verbose] [-noverbose] [-help] _D_E_S_C_R_I_P_T_I_O_N _S_o_r_t_m sorts the specified messages in the named folder according to the chronological order of the "Date:" field of each message. The `-verbose' switch directs _s_o_r_t_m to tell the user the general actions that it is taking to place the folder in sorted order. The `-datefield field' switch tells _s_o_r_t_m the name of the field to use when making the date comparison. If the user has a special field in each message, such as "BB-Posted:" or "Delivery-Date:", then the `-datefield' switch can be used to direct _s_o_r_t_m which field to examine. The `-textfield field' switch causes _s_o_r_t_m to sort messages by the specified text field. If this field is "subject", any leading "re:" is stripped off. In any case, all characters except letters and numbers are stripped and the resulting strings are sorted datefield-major, textfield-minor, using a case insensitive com- parison. With `-textfield field', if `-limit days' is specified, messages with similar textfields that are dated within `days' of each other appear together. Specifying `-nolimit' makes the limit infinity. With `-limit 0', the sort is instead made textfield-major, date-minor. For example, to order a folder by date-major, subject-minor, use: sortm -textfield subject +folder _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Current-Folder: To find the default current folder _S_e_e _A_l_s_o folder (1) [mh.6] MH.6.8 UCI version SORTM(1) -121- SORTM(1) _D_e_f_a_u_l_t_s `+folder' defaults to the current folder `msgs' defaults to all `-datefield date' `-notextfield' `-noverbose' `-nolimit' _C_o_n_t_e_x_t If a folder is given, it will become the current folder. If the current message is moved, _s_o_r_t_m will preserve its status as current. _H_i_s_t_o_r_y Timezones used to be ignored when comparing dates: they aren't any more. Messages which were in the folder, but not specified by `msgs', used to be moved to the end of the folder; now such messages are left untouched. Previously, _s_o_r_t_m would try to fill any gaps in a folder within the range of messages it sorted. To improve performance, _s_o_r_t_m now minimizes the number of message moves. To pack a folder, use "_f_o_l_d_e_r -_p_a_c_k" instead. _B_u_g_s If _s_o_r_t_m encounters a message without a date-field, or if the mes- sage has a date-field that _s_o_r_t_m cannot parse, then _s_o_r_t_m attempts to keep the message in the same relative position. This does not always work. For instance, if the first message encountered lacks a date which can be parsed, then it will usually be placed at the end of the messages being sorted. When _s_o_r_t_m complains about a message which it can't temporally ord- er, it complains about the message number _p_r_i_o_r to sorting. It should indicate what the message number will be _a_f_t_e_r sorting. [mh.6] MH.6.8 UCI version VMH(1) -122- VMH(1) _N_A_M_E vmh - visual front-end to MH _S_Y_N_O_P_S_I_S vmh [-prompt string] [-vmhproc program] [-novmhproc] [switches for _v_m_h_p_r_o_c] [-help] _D_E_S_C_R_I_P_T_I_O_N _v_m_h is a program which implements the server side of the _M_H window management protocol and uses _c_u_r_s_e_s (3) routines to maintain a split-screen interface to any program which implements the client side of the protocol. This latter program, called the _v_m_h_p_r_o_c, is specified using the `-vmhproc program' switch. The upshot of all this is that one can run _m_s_h on a display termi- nal and get a nice visual interface. To do this, for example, just add the line mshproc: vmh to your .mh_profile. (This takes advantage of the fact that _m_s_h is the default _v_m_h_p_r_o_c for _v_m_h.) In order to facilitate things, if the `-novmhproc' switch is given, and _v_m_h can't run on the user's terminal, the _v_m_h_p_r_o_c is run directly without the window management protocol. After initializing the protocol, _v_m_h prompts the user for a command to be given to the client. Usually, this results in output being sent to one or more windows. If a output to a window would cause it to scroll, _v_m_h prompts the user for instructions, roughly per- mitting the capabilities of _l_e_s_s or _m_o_r_e (e.g., the ability to scroll backwards and forwards): SPACE advance to the next windowful RETURN * advance to the next line y * retreat to the previous line d * advance to the next ten lines u * retreat to the previous ten lines g * go to an arbitrary line (preceed g with the line number) G * go to the end of the window (if a line number is given, this acts like `g') CTRL-L refresh the entire screen h print a help message q abort the window (A `*' indicates that a numeric prefix is meaningful for this com- mand.) Note that if a command resulted in more than one window's worth of [mh.6] MH.6.8 UCI version VMH(1) -123- VMH(1) information being displayed, and you allow the command which is generating information for the window to gracefully finish (i.e., you don't use the `q' command to abort information being sent to the window), then _v_m_h will give you one last change to peruse the window. This is useful for scrolling back and forth. Just type `q' when you're done. To abnormally terminate _v_m_h (without core dump), use (usu- ally CTRL-\). For instance, this does the "right" thing with _b_b_c and _m_s_h. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory _S_e_e _A_l_s_o msh(1) _D_e_f_a_u_l_t_s `-prompt (vmh) ' `-vmhproc msh' _C_o_n_t_e_x_t None _B_u_g_s The argument to the `-prompt' switch must be interpreted as a sin- gle token by the shell that invokes _v_m_h. Therefore, one must usu- ally place the argument to this switch inside double-quotes. At present, there is no way to pass signals (e.g., interrupt, quit) to the client. However, generating QUIT when _v_m_h is reading a com- mand from the terminal is sufficient to tell the client to go away quickly. Acts strangely (loses peer or botches window management protocol with peer) on random occasions. [mh.6] MH.6.8 UCI version WHATNOW(1) -124- WHATNOW(1) _N_A_M_E whatnow - prompting front-end for send _S_Y_N_O_P_S_I_S whatnow [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-prompt string] [file] [-help] _D_E_S_C_R_I_P_T_I_O_N _W_h_a_t_n_o_w is the default program that queries the user about the disposition of a composed draft. It is normally invoked by one of _c_o_m_p, _d_i_s_t, _f_o_r_w, or _r_e_p_l after the initial edit. When started, the editor is started on the draft (unless `-noedit' is given, in which case the initial edit is suppressed). Then, _w_h_a_t_n_o_w repetitively prompts the user with "What now?" and awaits a response. The valid responses are: display to list the message being distributed/replied-to on the terminal edit to re-edit using the same editor that was used on the preceding round unless a profile entry "-next: " names an alternate editor edit to invoke for further editing list to list the draft on the terminal push to send the message in the background quit to terminate the session and preserve the draft quit -delete to terminate, then delete the draft refile +folder to refile the draft into the given folder send to send the message send -watch to cause the delivery process to be monitored whom to list the addresses that the message will go to whom -check to list the addresses and verify that they are acceptable to the transport service For the edit response, any valid switch to the editor is valid. Similarly, for the send and whom responses, any valid switch to _s_e_n_d (1) and _w_h_o_m (1) commands, respectively, are valid. For the push response, any valid switch to _s_e_n_d (1) is valid (as this merely invokes _s_e_n_d with the `-push' option). For the _r_e_f_i_l_e response, any valid switch to the _f_i_l_e_p_r_o_c is valid. For the display and list responses, any valid argument to the _l_p_r_o_c is valid. If any non-switch arguments are present, then the pathname of the draft will be excluded from the argument list given to the _l_p_r_o_c (this is useful for listing another _M_H message). See _m_h-_p_r_o_f_i_l_e (5) for further information about how editors are used by MH. It also discusses how complex envariables can be used to direct _w_h_a_t_n_o_w's actions. The `-prompt string' switch sets the prompting string for _w_h_a_t_n_o_w. [mh.6] MH.6.8 UCI version WHATNOW(1) -125- WHATNOW(1) The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. _F_i_l_e_s $HOME/.mh_profile The user profile /draft The draft file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Draft-Folder: To find the default draft-folder Editor: To override the default editor -next: To name an editor to be used after exit from automhnproc: Program to automatically run prior to sending if the draft is an _m_h_n composition file fileproc: Program to refile the message lproc: Program to list the contents of a message sendproc: Program to use to send the message whomproc: Program to determine who a message would go to _S_e_e _A_l_s_o send(1), whom(1) _D_e_f_a_u_l_t_s `-prompt "What Now? "' _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version WHATNOW(1) -126- WHATNOW(1) _B_u_g_s The argument to the `-prompt' switch must be interpreted as a sin- gle token by the shell that invokes _w_h_a_t_n_o_w. Therefore, one must usually place the argument to this switch inside double-quotes. If the initial edit fails, _w_h_a_t_n_o_w deletes your draft (by renaming it with a leading comma); failure of a later edit preverves the draft. If _w_h_a_t_n_o_w_p_r_o_c is _w_h_a_t_n_o_w, then _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l use a built-in _w_h_a_t_n_o_w, and do not actually run the _w_h_a_t_n_o_w program. Hence, if you define your own _w_h_a_t_n_o_w_p_r_o_c, don't call it _w_h_a_t_n_o_w since it won't be run. If _s_e_n_d_p_r_o_c is _s_e_n_d, then _w_h_a_t_n_o_w uses a built-in _s_e_n_d, it does not actually run the _s_e_n_d program. Hence, if you define your own _s_e_n_d_p_r_o_c, don't call it _s_e_n_d since _w_h_a_t_n_o_w won't run it. [mh.6] MH.6.8 UCI version WHOM(1) -127- WHOM(1) _N_A_M_E whom - report to whom a message would go _S_Y_N_O_P_S_I_S whom [-alias aliasfile] [-check] [-nocheck] [-draft] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [file] [-help] _D_E_S_C_R_I_P_T_I_O_N _W_h_o_m is used to expand the headers of a message into a set of addresses and optionally verify that those addresses are deliver- able at that time (if `-check' is given). The `-draftfolder +folder' and `-draftmessage msg' switches invoke the _M_H draft folder facility. This is an advanced (and highly use- ful) feature. Consult the Advanced Features section of the _M_H manual for more information. The files specified by the profile entry "Aliasfile:" and any addi- tional alias files given by the `-alias aliasfile' switch will be read (more than one file, each preceeded by `-alias', can be named). See _m_h-_a_l_i_a_s (5) for more information. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory Draft-Folder: To find the default draft-folder Aliasfile: For a default alias file postproc: Program to post the message _S_e_e _A_l_s_o mh-alias(5), post(8) _D_e_f_a_u_l_t_s `file' defaults to /draft `-nocheck' `-alias /usr/bs/mh-6.8/lib/MailAliases' _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version WHOM(1) -128- WHOM(1) _B_u_g_s With the `-check' option, _w_h_o_m makes no guarantees that the ad- dresses listed as being ok are really deliverable, rather, an ad- dress being listed as ok means that at the time that _w_h_o_m was run the address was thought to be deliverable by the transport service. For local addresses, this is absolute; for network addresses, it means that the host is known; for uucp addresses, it (often) means that the _U_U_C_P network is available for use. [mh.6] MH.6.8 UCI version -129- _M_O_R_E _D_E_T_A_I_L_S This section describes some of the more intense points of the _M_H system, by expanding on topics previously discussed. The format presented conforms to the standard form for the description of UNIX documentation. MH-ALIAS(5) -130- MH-ALIAS(5) _N_A_M_E mh-alias - alias file for MH message system _S_Y_N_O_P_S_I_S any _M_H command _D_E_S_C_R_I_P_T_I_O_N This describes both _M_H personal alias files and the (primary) alias file for mail delivery, the file /usr/bs/mh-6.8/lib/MailAliases It does not describe aliases files used by the message transport system. Each line of the alias file has the format: alias : address-group or alias ; address-group or < alias-file or ; comment where: address-group := address-list | "<" file | "=" UNIX-group | "+" UNIX-group | "*" address-list := address | address-list, address Continuation lines in alias files end with `\' followed by the new- line character. Alias-file and file are UNIX file names. UNIX-group is a group name (or number) from /_e_t_c/_g_r_o_u_p. An address is a "simple" Internet-style address. Througout this file, case is ignored, except for alias-file names. If the line starts with a `<', then the file named after the `<' is read for more alias definitions. The reading is done recursively, so a `<' may occur in the beginning of an alias file with the expected results. If the address-group starts with a `<', then the file named after the `<' is read and its contents are added to the address-list for the alias. [mh.6] MH.6.8 UCI version MH-ALIAS(5) -131- MH-ALIAS(5) If the address-group starts with an `=', then the file /_e_t_c/_g_r_o_u_p is consulted for the UNIX-group named after the `='. Each login name occurring as a member of the group is added to the address-list for the alias. In contrast, if the address-group starts with a `+', then the file /_e_t_c/_g_r_o_u_p is consulted to determine the group-id of the UNIX-group named after the `+'. Each login name occurring in the /_e_t_c/_p_a_s_s_w_d file whose group-id is indicated by this group is added to the address-list for the alias. If the address-group is simply `*', then the file /_e_t_c/_p_a_s_s_w_d is consulted and all login names with a userid greater than some magic number (usually 200) are added to the address-list for the alias. In match, a trailing * on an alias will match just about anything appropriate. (See example below.) An approximation of the way aliases are resolved at posting time is (it's not really done this way): 1) Build a list of all addresses from the message to be delivered, eliminating duplicate addresses. 2) If this draft originated on the local host, then for those addresses in the message that have no host specified, perform alias resolution. 3) For each line in the alias file, compare "alias" against all of the existing addresses. If a match, remove the matched "alias" from the address list, and add each new address in the address-group to the address list if it is not already on the list. The alias itself is not usually output, rather the address-group that the alias maps to is output instead. If "alias" is terminated with a `;' instead of a `:', then both the "alias" and the address are output in the correct format. (This makes replies possible since _M_H aliases and personal aliases are unknown to the mail transport system.) Since the alias file is read line by line, forward references work, but backward references are not recognized, thus, there is no recursion. [mh.6] MH.6.8 UCI version MH-ALIAS(5) -132- MH-ALIAS(5) Example: " are defined to be "news". The key thing to understand about aliasing in _M_H is that aliases in _M_H alias files are expanded into the headers of messages posted. This aliasing occurs first, at posting time, without the knowledge of the message transport system. In contrast, once the message transport system is given a message to deliver to a list of addresses, for each address that appears to be local, a system-wide alias file is consulted. These aliases are NOT expanded into the headers of messages delivered. _H_e_l_p_f_u_l _H_i_n_t_s To use aliasing in _M_H quickly, do the following: First, in your ._m_h__p_r_o_f_i_l_e, choose a name for your alias file, say "aliases", and add the line: Aliasfile: aliases Second, create the file "aliases" in your _M_H directory. [mh.6] MH.6.8 UCI version MH-ALIAS(5) -133- MH-ALIAS(5) Third, start adding aliases to your "aliases" file as appropriate. _F_i_l_e_s /usr/bs/mh-6.8/lib/MailAliases Primary alias file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Aliasfile: For a default alias file _S_e_e _A_l_s_o ali(1), send(1), whom(1), group(5), passwd(5), conflict(8), post(8) _D_e_f_a_u_l_t_s None _C_o_n_t_e_x_t None _H_i_s_t_o_r_y In previous releases of _M_H, only a single, system-wide mh-alias file was supported. Now that _M_H uses _M_M_D_F as a transport system, the system-wide aliasing facility can be more consistently con- trolled by the latter. This means that at most sites, the system-wide mh-alias file will be empty (or trivial at best). Hence, the semantics of mh-alias were extended to support personal alias files. Users of _M_H no longer need to bother mail-system ad- ministrators for keeping information in the system-wide alias file, as each _M_H user can create/modify/remove aliases at will from any number of personal files. _B_u_g_s Although the forward-referencing semantics of _m_h-_a_l_i_a_s files prevent recursion, the "< alias-file" command may defeat this. Since the number of file descriptors is finite (and very limited), such infinite recursion will terminate with a meaningless diagnos- tic when all the fds are used up. Forward references do not work correctly inside blind lists. [mh.6] MH.6.8 UCI version MH-FORMAT(5) -134- MH-FORMAT(5) _N_A_M_E mh-format - format file for MH message system _S_Y_N_O_P_S_I_S some _M_H commands _D_E_S_C_R_I_P_T_I_O_N Several _M_H commands utilize either a _f_o_r_m_a_t string or a _f_o_r_m_a_t file during their execution. For example, _s_c_a_n (1) uses a format string which directs it how to generate the scan listing for each message; _r_e_p_l (1) uses a format file which directs it how to generate the reply to a message, and so on. Format strings are designed to be efficiently parsed by _M_H which means they are not necessarily simple to write and understand. This means that novice, casual, or even advanced users of _M_H should not have to deal with them. Some canned scan listing formats are in /usr/bs/mh-6.8/lib/scan.time, /usr/bs/mh-6.8/lib/scan.size, and /usr/bs/mh-6.8/lib/scan.timely. Look in /usr/bs/mh-6.8/lib for other _s_c_a_n and _r_e_p_l format files which may have been written at your site. It suffices to have your local _M_H expert actually write new format commands or modify existing ones. This manual section explains how to do that. Note: familiarity with the C _p_r_i_n_t_f routine is assumed. A format string consists of ordinary text, and special multi- character _e_s_c_a_p_e sequences which begin with `%'. When specifying a format string, the usual C backslash characters are honored: `\b', `\f', `\n', `\r', and `\t'. Continuation lines in format files end with `\' followed by the newline character. There are three types of _e_s_c_a_p_e sequences: header _c_o_m_p_o_n_e_n_t_s, built-in _f_u_n_c_t_i_o_n_s, and flow _c_o_n_t_r_o_l. A _c_o_m_p_o_n_e_n_t escape is specified as `%{_c_o_m_p_o_n_e_n_t}', and exists for each header found in the message being processed. For example `%{date}' refers to the "Date:" field of the appropriate message. All component escapes have a string value. Normally, component values are compressed by converting any control characters (tab and newline included) to spaces, then eliding any leading or multiple spaces. However, commands may give different interpretations to some component escapes; be sure to refer to each command's manual entry for complete details. A _f_u_n_c_t_i_o_n escape is specified as `%(_f_u_n_c_t_i_o_n)'. All functions are built-in, and most have a string or numeric value. [mh.6] MH.6.8 UCI version MH-FORMAT(5) -135- MH-FORMAT(5) _C_o_n_t_r_o_l-_f_l_o_w _e_s_c_a_p_e_s A _c_o_n_t_r_o_l escape is one of: `%<', `%?', `%|', or `%>'. These are combined into the conditional execution construct: % Extra white space is shown here only for clarity. These constructs may be nested without ambiguity. They form a general if-elseif-else-endif block where only one of the _f_o_r_m_a_t _t_e_x_t seg- ments is interpreted. The `%<' and `%?' control escapes causes a condition to be evaluated. This condition may be either a _c_o_m_p_o_n_e_n_t or a _f_u_n_c_t_i_o_n. The four constructs have the following syntax: %<{component} %<(function) %?{component} %?(function) These control escapes test whether the function or component value is non-zero (for integer-valued escapes), or non-empty (for string-valued escapes). If this test evaulates true, then the format text up to the next corresponding control escape (one of `%|', `%?', or `%>') is inter- preted normally. Next, all format text (if any) up to the corresponding `%>' control escape is skipped. The `%>' control escape is not interpreted; normal interpretation resumes after the `%>' escape. If the test evaluates false, however, then the format text up to the next corresponding control escape (again, one of `%|', `%?', or `%>') is skipped, instead of being interpreted. If the control escape encountered was `%?', then the condition associated with that control escape is evaluated, and interpretation proceeds after that test as described in the previous paragraph. If the control escape encountered was `%|', then the format text up to the corresponding `%>' escape is interpreted normally. As above, the `%>' escape is not interpreted and normal interpretation resumes after the `%>' escape. [mh.6] MH.6.8 UCI version MH-FORMAT(5) -136- MH-FORMAT(5) The `%?' control escape and its following format text is optional, and may be included zero or more times. The `%|' control escape and its following format text is also optional, and may be included zero or one times. _F_u_n_c_t_i_o_n _e_s_c_a_p_e_s Most functions expect an argument of a particular type: _A_r_g_u_m_e_n_t _D_e_s_c_r_i_p_t_i_o_n _E_x_a_m_p_l_e _S_y_n_t_a_x literal A literal number, %(_f_u_n_c 1234) or string %(_f_u_n_c text string) comp Any header component %(_f_u_n_c{_i_n-_r_e_p_l_y-_t_o}) date A date component %(_f_u_n_c{_d_a_t_e}) addr An address component %(_f_u_n_c{_f_r_o_m}) expr An optional component, %(_f_u_n_c(_f_u_n_c_2)) function or control, %(_f_u_n_c %<{_r_e_p_l_y-_t_o}%|%{_f_r_o_m}%>) perhaps nested %(_f_u_n_c(_f_u_n_c_2{_c_o_m_p})) The types _d_a_t_e and _a_d_d_r have the same syntax as _c_o_m_p, but require that the header component be a date string, or address string, respectively. All arguments except those of type _e_x_p_r are required. For the _e_x_p_r argument type, the leading `%' must be omitted for component and function escape arguments, and must be present (with a leading space) for control escape arguments. The evaluation of format strings is based on a simple machine with an integer register _n_u_m, and a text string register _s_t_r. When a function escape is processed, if it accepts an optional _e_x_p_r argu- ment which is not present, it reads the current value of either _n_u_m or _s_t_r as appropriate. _R_e_t_u_r_n _v_a_l_u_e_s Component escapes write the value of their message header in _s_t_r. Function escapes write their return value in _n_u_m for functions returning _i_n_t_e_g_e_r or _b_o_o_l_e_a_n values, and in _s_t_r for functions returning string values. (The _b_o_o_l_e_a_n type is a subset of integers with usual values 0=false and 1=true.) Control escapes return a _b_o_o_l_e_a_n value, and set _n_u_m. All component escapes, and those function escapes which return an _i_n_t_e_g_e_r or _s_t_r_i_n_g value, pass this value back to their caller in addition to setting _s_t_r or _n_u_m. These escapes will print out this value unless called as part of an argument to another escape sequence. Escapes which return a _b_o_o_l_e_a_n value do pass this value back to their caller in _n_u_m, but will never print out the value. [mh.6] MH.6.8 UCI version MH-FORMAT(5) -137- MH-FORMAT(5) _F_u_n_c_t_i_o_n _A_r_g_u_m_e_n_t _R_e_t_u_r_n _D_e_s_c_r_i_p_t_i_o_n msg integer message number cur integer message is current size integer size of message strlen integer length of _s_t_r width integer output buffer size in bytes charleft integer bytes left in output buffer timenow integer seconds since the UNIX epoch me string the user's mailbox eq literal boolean _n_u_m == _a_r_g ne literal boolean _n_u_m != _a_r_g gt literal boolean _n_u_m > _a_r_g match literal boolean _s_t_r contains _a_r_g amatch literal boolean _s_t_r starts with _a_r_g plus literal integer _a_r_g plus _n_u_m minus literal integer _a_r_g minus _n_u_m divide literal integer _n_u_m divided by _a_r_g modulo literal integer _n_u_m modulo _a_r_g num literal integer Set _n_u_m to _a_r_g lit literal string Set _s_t_r to _a_r_g getenv literal string Set _s_t_r to environment value of _a_r_g nonzero expr boolean _n_u_m is non-zero zero expr boolean _n_u_m is zero null expr boolean _s_t_r is empty nonnull expr boolean _s_t_r is non-empty void expr Set _s_t_r or _n_u_m comp comp string Set _s_t_r to component text compval comp integer _n_u_m set to "atoi(_c_o_m_p)" trim expr trim trailing white-space from _s_t_r putstr expr print _s_t_r putstrf expr print _s_t_r in a fixed width putnum expr print _n_u_m putnumf expr print _n_u_m in a fixed width These functions require a date component as an argument: _F_u_n_c_t_i_o_n _A_r_g_u_m_e_n_t _R_e_t_u_r_n _D_e_s_c_r_i_p_t_i_o_n sec date integer seconds of the minute min date integer minutes of the hour hour date integer hours of the day (0-23) wday date integer day of the week (Sun=0) day date string day of the week (abbrev.) weekday date string day of the week sday date integer day of the week known? (0=implicit,-1=unknown) mday date integer day of the month yday date integer day of the year mon date integer month of the year month date string month of the year (abbrev.) lmonth date string month of the year year date integer year (may be > 100) zone date integer timezone in hours [mh.6] MH.6.8 UCI version MH-FORMAT(5) -138- MH-FORMAT(5) tzone date string timezone string szone date integer timezone explicit? (0=implicit,-1=unknown) date2local date coerce date to local timezone date2gmt date coerce date to GMT dst date integer daylight savings in effect? clock date integer seconds since the UNIX epoch rclock date integer seconds prior to current time tws date string official 822 rendering pretty date string user-friendly rendering nodate date integer _s_t_r not a date string These functions require an address component as an argument. The return value of functions noted with `*' pertain only to the first address present in the header component. _F_u_n_c_t_i_o_n _A_r_g_u_m_e_n_t _R_e_t_u_r_n _D_e_s_c_r_i_p_t_i_o_n proper addr string official 822 rendering friendly addr string user-friendly rendering addr addr string mbox@host or host!mbox rendering* pers addr string the personal name* note addr string commentary text* mbox addr string the local mailbox* mymbox addr integer the user's addresses? (0=no,1=yes) host addr string the host domain* nohost addr integer no host was present* type addr integer host type* (0=local,1=network, -1=uucp,2=unknown) path addr string any leading host route* ingrp addr integer address was inside a group* gname addr string name of group* formataddr expr append _a_r_g to _s_t_r as a (comma separated) address list putaddr literal print _s_t_r address list with _a_r_g as optional label; get line width from _n_u_m When escapes are nested, evaluation is done from inner-most to outer-most. The outer-most escape must begin with `%'; the inner escapes must not. For example, %<(mymbox{from}) To: %{to}%> writes the value of the header component "From:" to _s_t_r; then (_m_y_m_- _b_o_x) reads _s_t_r and writes its result to _n_u_m; then the control escape evaluates _n_u_m. If _n_u_m is non-zero, the string "To: " is printed followed by the value of the header component "To:". A minor explanation of (_m_y_m_b_o_x{_c_o_m_p}) is in order. In general, it checks each of the addresses in the header component "_c_o_m_p" against the user's mailbox name and any _A_l_t_e_r_n_a_t_e-_M_a_i_l_b_o_x_e_s. It returns true if any address matches, however, it also returns true if the [mh.6] MH.6.8 UCI version MH-FORMAT(5) -139- MH-FORMAT(5) "_c_o_m_p" header is not present in the message. If needed, the (_n_u_l_l) function can be used to explicitly test for this condition. When a function or component escape is interpreted and the result will be immediately printed, an optional field width can be speci- fied to print the field in exactly a given number of characters. For example, a numeric escape like %4(_s_i_z_e) will print at most 4 digits of the message size; overflow will be indicated by a `?' in the first position (like `?234'). A string escape like %4(_m_e) will print the first 4 characters and truncate at the end. Short fields are padded at the right with the fill character (normally, a blank). If the field width argument begins with a leading zero, then the fill character is set to a zero. As above, the functions (_p_u_t_n_u_m_f) and (_p_u_t_s_t_r_f) print their result in exactly the number of characters specified by their leading field width argument. For example, %06(_p_u_t_n_u_m_f(_s_i_z_e)) will print the message size in a field six characters wide filled with leading zeros; %14(_p_u_t_s_t_r_f{_f_r_o_m}) will print the "From:" header component in fourteen characters with trailing spaces added as needed. For _p_u_t_s_t_r_f, using a negative value for the field width causes right- justification of the string within the field, with padding on the left up to the field width. The functions (_p_u_t_n_u_m) and (_p_u_t_s_t_r) print their result in the minimum number of characters required, and ignore any leading field width argument. The available output width is kept in an internal register; any output past this width will be truncated. Comments may be inserted in most places where a function argument is not expected. A comment begins with `%;' and ends with a (non- escaped) newline. With all this in mind, here's the default format string for _s_c_a_n. It's been divided into several pieces for readability. The first part is: %4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %> which says that the message number should be printed in four digits, if the message is the current message then a `+' else a space should be printed, and if a "Replied:" field is present then a `-' else if an "Encrypted:" field is present then an `E' other- wise a space should be printed. Next: %02(mon{date})/%02(mday{date}) the month and date are printed in two digits (zero filled) separated by a slash. Next, %<{date} %|*> [mh.6] MH.6.8 UCI version MH-FORMAT(5) -140- MH-FORMAT(5) If a "Date:" field was present, then a space is printed, otherwise a `*'. Next, %<(mymbox{from})%<{to}To:%14(friendly{to})%>%> if the message is from me, and there is a "To:" header, print `To:' followed by a "user-friendly" rendering of the first address in the "To:" field. Continuing, %<(zero)%17(friendly{from})%> if either of the above two tests failed, then the "From:" address is printed in a "user-friendly" format. And finally, %{subject}%<{body}<<%{body}%> the subject and initial body (if any) are printed. For a more complicated example, next consider the default _r_e_p_l_c_o_m_p_s format file. %(lit)%(formataddr %<{reply-to} This clears _s_t_r and formats the "Reply-To:" header if present. If not present, the else-if clause is executed. %?{from}%?{sender}%?{return-path}%>)\ This formats the "From:", "Sender:" and "Return-Path:" headers, stopping as soon as one of them is present. Next: %<(nonnull)%(void(width))%(putaddr To: )\n%>\ If the _f_o_r_m_a_t_a_d_d_r result is non-null, it is printed as an address (with line folding if needed) in a field _w_i_d_t_h wide with a leading label of "To: ". %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ _s_t_r is cleared, and the "To:" and "Cc:" headers, along with the user's address (depending on what was specified with the "-cc" switch to _r_e_p_l) are formatted. %<(nonnull)%(void(width))%(putaddr cc: )\n%>\ If the result is non-null, it is printed as above with a leading label of "cc: ". %<{fcc}Fcc: %{fcc}\n%>\ If a "-fcc folder" switch was given to _r_e_p_l (see _r_e_p_l (1) for more details about %{_f_c_c}), an "Fcc:" header is output. [mh.6] MH.6.8 UCI version MH-FORMAT(5) -141- MH-FORMAT(5) %<{subject}Subject: Re: %{subject}\n%>\ If a subject component was present, a suitable reply subject is output. %<{date}In-reply-to: Your message of "\ %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id} %{message-id}%>\n%>\ -------- If a date component was present, an "In-Reply-To:" header is output with the preface "Your message of ". If the date was parseable, it is output in a user-friendly format, otherwise it is output as-is. The message-id is included if present. As with all plain-text, the row of dashes are output as-is. This last part is a good example for a little more elaboration. Here's that part again in pseudo-code: if (comp_exists(date)) then print ("In-reply-to: Your message of \"") if (not_date_string(date.value) then print (date.value) else print (pretty(date.value)) endif print ("\"") if (comp_exists(message-id)) then print ("\n\t") print (message-id.value) endif print ("\n") endif Although this seems complicated, in point of fact, this method is flexible enough to extract individual fields and print them in any format the user desires. _F_i_l_e_s None _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None _S_e_e _A_l_s_o scan(1), repl(1), ap(8), dp(8) _D_e_f_a_u_l_t_s None [mh.6] MH.6.8 UCI version MH-FORMAT(5) -142- MH-FORMAT(5) _C_o_n_t_e_x_t None _H_i_s_t_o_r_y This software was contributed for MH 6.3. Prior to this, output format specifications were much easier to write, but considerably less flexible. _B_u_g_s On hosts where _M_H was configured with the BERK option, address parsing is not enabled. [mh.6] MH.6.8 UCI version MH-MAIL(5) -143- MH-MAIL(5) _N_A_M_E mh-mail - message format for MH message system _S_Y_N_O_P_S_I_S any _M_H command _D_E_S_C_R_I_P_T_I_O_N _M_H processes messages in a particular format. It should be noted that although neither Bell nor Berkeley mailers produce message files in the format that _M_H prefers, _M_H can read message files in that antiquated format. Each user possesses a mail drop box which initially receives all messages processed by _p_o_s_t (8). _I_n_c (1) will read from that drop box and incorporate the new messages found there into the user's own mail folders (typically `+inbox'). The mail drop box consists of one or more messages. To facilitate the separation of messages, each message begins and ends with a line consisting of nothing but four CTRL-A (octal 001) characters. Messages are expected to consist of lines of text. Graphics and binary data are not handled. No data compression is accepted. All text is clear ASCII 7-bit data. The general "memo" framework of RFC-822 is used. A message con- sists of a block of information in a rigid format, followed by gen- eral text with no specified format. The rigidly formatted first part of a message is called the header, and the free-format portion is called the body. The header must always exist, but the body is optional. These parts are separated by an empty line, i.e., two consecutive newline characters. Within _M_H, the header and body may be separated by a line consisting of dashes: To: cc: Subject: -------- The header is composed of one or more header items. Each header item can be viewed as a single logical line of ASCII characters. If the text of a header item extends across several real lines, the continuation lines are indicated by leading spaces or tabs. Each header item is called a component and is composed of a keyword or name, along with associated text. The keyword begins at the left margin, may NOT contain spaces or tabs, may not exceed 63 characters (as specified by RFC-822), and is terminated by a colon (`:'). Certain components (as identified by their keywords) must follow rigidly defined formats in their text portions. The text for most formatted components (e.g., "Date:" and [mh.6] MH.6.8 UCI version MH-MAIL(5) -144- MH-MAIL(5) "Message-Id:") is produced automatically. The only ones entered by the user are address fields such as "To:", "cc:", etc. Internet addresses are assigned mailbox names and host computer specifica- tions. The rough format is "local@domain", such as "MH@UCI", or "MH@UCI-ICSA.ARPA". Multiple addresses are separated by commas. A missing host/domain is assumed to be the local host/domain. As mentioned above, a blank line (or a line of dashes) signals that all following text up to the end of the file is the body. No for- matting is expected or enforced within the body. Following is a list of header components that are considered mean- ingful to various MH programs. Date: Added by _p_o_s_t (8), contains date and time of the message's entry into the transport system. From: Added by _p_o_s_t (8), contains the address of the author or authors (may be more than one if a "Sender:" field is present). Replies are typically directed to addresses in the "Reply-To:" or "From:" field (the former has precedence if present). Sender: Added by _p_o_s_t (8) in the event that the message already has a "From:" line. This line contains the address of the actual sender. Replies are never sent to addresses in the "Sender:" field. To: Contains addresses of primary recipients. cc: Contains addresses of secondary recipients. Bcc: Still more recipients. However, the "Bcc:" line is not copied onto the message as delivered, so these recipients are not listed. _M_H uses an encapsulation method for blind copies, see _s_e_n_d (1). Fcc: Causes _p_o_s_t (8) to copy the message into the specified folder for the sender, if the message was successfully given to the transport system. Message-ID: A unique message identifier added by _p_o_s_t (8) if the `-msgid' flag is set. Subject: [mh.6] MH.6.8 UCI version MH-MAIL(5) -145- MH-MAIL(5) Sender's commentary. It is displayed by _s_c_a_n (1). In-Reply-To: A commentary line added by _r_e_p_l (1) when replying to a mes- sage. Resent-Date: Added when redistributing a message by _p_o_s_t (8). Resent-From: Added when redistributing a message by _p_o_s_t (8). Resent-To: New recipients for a message resent by _d_i_s_t (1). Resent-cc: Still more recipients. See "cc:" and "Resent-To:". Resent-Bcc: Even more recipients. See "Bcc:" and "Resent-To:". Resent-Fcc: Copy resent message into a folder. See "Fcc:" and "Resent-To:". Resent-Message-Id: A unique identifier glued on by _p_o_s_t (8) if the `-msgid' flag is set. See "Message-Id:" and "Resent-To:". Resent: Annotation for _d_i_s_t (1) under the `-annotate' option. Forwarded: Annotation for _f_o_r_w (1) under the `-annotate' option. Replied: Annotation for _r_e_p_l (1) under the `-annotate' option. _F_i_l_e_s /usr/spool/mail/$USER Location of mail drop _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None _S_e_e _A_l_s_o _S_t_a_n_d_a_r_d _f_o_r _t_h_e _F_o_r_m_a_t _o_f _A_R_P_A _I_n_t_e_r_n_e_t _T_e_x_t _M_e_s_s_a_g_e_s (aka RFC-822) [mh.6] MH.6.8 UCI version MH-MAIL(5) -146- MH-MAIL(5) _D_e_f_a_u_l_t_s None _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version MH-PROFILE(5) -147- MH-PROFILE(5) _N_A_M_E mh-profile - user profile customization for MH message handler _S_Y_N_O_P_S_I_S ._m_h__p_r_o_f_i_l_e _D_E_S_C_R_I_P_T_I_O_N Each user of _M_H is expected to have a file named ._m_h__p_r_o_f_i_l_e in his or her home directory. This file contains a set of user parameters used by some or all of the _M_H family of programs. Each line of the file is of the format _p_r_o_f_i_l_e-_c_o_m_p_o_n_e_n_t: _v_a_l_u_e The possible profile components are exemplified below. Only `Path:' is mandatory. The others are optional; some have default values if they are not present. In the notation used below, (pro- file, default) indicates whether the information is kept in the user's _M_H profile or _M_H context, and indicates what the default value is. Path: Mail Locates _M_H transactions in directory "Mail". (profile, no default) context: context Declares the location of the _M_H context file, see the HISTORY section below. (profile, default: /context) Current-Folder: inbox Keeps track of the current open folder. (context, default: folder specified by "Inbox") Inbox: inbox Defines the name of your inbox. (profile, default: inbox) Previous-Sequence: pseq Names the sequences which should be defined as the `msgs' or `msg' argument given to the program. If not present, or empty, no sequences are defined. Otherwise, for each name given, the sequence is first zero'd and then each message is added to the sequence. (profile, no default) Sequence-Negation: not Defines the string which, when prefixed to a sequence name, negates that sequence. Hence, "notseen" means all those messages that are not a member of the sequence "seen". (profile, no default) [mh.6] MH.6.8 UCI version MH-PROFILE(5) -148- MH-PROFILE(5) Unseen-Sequence: unseen Names the sequences which should be defined as those mes- sages recently incorporated by _i_n_c. _S_h_o_w knows to remove messages from this sequence once it thinks they have been seen. If not present, or empty, no sequences are defined. Otherwise, each message is added to each sequence name given. (profile, no default) mh-sequences: .mh_sequences The name of the file in each folder which defines public sequences. To disable the use of public sequences, leave the value portion of this entry blank. (profile, default: .mh_sequences) atr-_s_e_q-_f_o_l_d_e_r: 172 178-181 212 Keeps track of the private sequence called _s_e_q in the specified folder. (context, no default) Editor: /usr/ucb/ex Defines editor to be used by _c_o_m_p (1), _d_i_s_t (1), _f_o_r_w (1), and _r_e_p_l (1). (profile, default: prompter) Msg-Protect: 644 Defines octal protection bits for message files. See _c_h_m_o_d (1) for an explanation of the octal number. (pro- file, default: 0644) Folder-Protect: 711 Defines protection bits for folder directories. (pro- file, default: 0711) _p_r_o_g_r_a_m: default switches Sets default switches to be used whenever the mh program _p_r_o_g_r_a_m is invoked. For example, one could override the _E_d_i_t_o_r: profile component when replying to messages by adding a component such as: repl: -editor /bin/ed (profile, no defaults) _l_a_s_t_e_d_i_t_o_r-next: nexteditor Names "nexteditor" to be the default editor after using "lasteditor". This takes effect at "What now?" level in _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l. After editing the draft with "lasteditor", the default editor is set to be "nextedi- tor". If the user types "edit" without any arguments to "What now?", then "nexteditor" is used. (profile, no default) bboards: system Tells _b_b_c which BBoards you are interested in. (profile, default: system) [mh.6] MH.6.8 UCI version MH-PROFILE(5) -149- MH-PROFILE(5) Folder-Stack: _f_o_l_d_e_r_s The contents of the folder-stack for the _f_o_l_d_e_r command. (context, no default) mhe: If present, tells _i_n_c to compose an _M_H_E auditfile in addition to its other tasks. _M_H_E is Brian Reid's _E_m_a_c_s front-end for _M_H. An early version is supplied with the _m_h._6 distribution. (profile, no default) Alternate-Mailboxes: mh@uci-750a, bug-mh* Tells _r_e_p_l and _s_c_a_n which addresses are really yours. In this way, _r_e_p_l knows which addresses should be included in the reply, and _s_c_a_n knows if the message really ori- ginated from you. Addresses must be separated by a comma, and the hostnames listed should be the "official" hostnames for the mailboxes you indicate, as local nick- names for hosts are not replaced with their official site names. For each address, if a host is not given, then that address on any host is considered to be you. In addition, an asterisk (`*') may appear at either or both ends of the mailbox and host to indicate wild-card match- ing. (profile, default: your user-id) Aliasfile: aliases other-alias Indicates aliases files for _a_l_i, _w_h_o_m, and _s_e_n_d. This may be used instead of the `-alias file' switch. (pro- file, no default) Draft-Folder: drafts Indicates a default draft folder for _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l. (profile, no default) digest-issue-_l_i_s_t: 1 Tells _f_o_r_w the last issue of the last volume sent for the digest _l_i_s_t. (context, no default) digest-volume-_l_i_s_t: 1 Tells _f_o_r_w the last volume sent for the digest _l_i_s_t. (context, no default) MailDrop: .mail Tells _i_n_c your maildrop, if different from the default. This is superceded by the MAILDROP envariable. (profile, default: /usr/spool/mail/$USER) Signature: RAND MH System (agent: Marshall Rose) Tells _s_e_n_d your mail signature. This is superceded by the SIGNATURE envariable. On hosts where _M_H was config- ured with the UCI option, if SIGNATURE is not set and this profile entry is not present, the file $HOME/.signature is consulted. Your signature will be [mh.6] MH.6.8 UCI version MH-PROFILE(5) -150- MH-PROFILE(5) added to the address _s_e_n_d puts in the "From:" header; do not include an address in the signature text. (profile, no default) The following profile elements are used whenever an _M_H program invokes some other program such as _m_o_r_e (1). The ._m_h__p_r_o_f_i_l_e can be used to select alternate programs if the user wishes. The default values are given in the examples. fileproc: /usr/bs/mh-6.8/bin/refile incproc: /usr/bs/mh-6.8/bin/inc installproc: /usr/bs/mh-6.8/lib/install-mh lproc: /usr/ucb/more mailproc: /usr/bs/mh-6.8/bin/mhmail mhlproc: /usr/bs/mh-6.8/lib/mhl moreproc: /usr/ucb/more mshproc: /usr/bs/mh-6.8/bin/msh packproc: /usr/bs/mh-6.8/bin/packf postproc: /usr/bs/mh-6.8/lib/post rmmproc: none rmfproc: /usr/bs/mh-6.8/bin/rmf sendproc: /usr/bs/mh-6.8/bin/send showproc: /usr/ucb/more whatnowproc: /usr/bs/mh-6.8/bin/whatnow whomproc: /usr/bs/mh-6.8/bin/whom If you define the envariable MH, you can specify a profile other than ._m_h__p_r_o_f_i_l_e to be read by the _M_H programs that you invoke. If the value of MH is not absolute, (i.e., does not begin with a / ), it will be presumed to start from the current working directory. This is one of the very few exceptions in _M_H where non-absolute pathnames are not considered relative to the user's _M_H directory. Similarly, if you define the envariable MHCONTEXT, you can specify a context other than the normal context file (as specified in the _M_H profile). As always, unless the value of MHCONTEXT is absolute, it will be presumed to start from your _M_H directory. _M_H programs also support other envariables: MAILDROP : tells _i_n_c the default maildrop This supercedes the "MailDrop:" profile entry. SIGNATURE : tells _s_e_n_d and _p_o_s_t your mail signature This supercedes the "Signature:" profile entry. HOME : tells all _M_H programs your home directory SHELL : tells _b_b_l the default shell to run TERM : tells _M_H your terminal type The TERMCAP envariable is also consulted. In particular, [mh.6] MH.6.8 UCI version MH-PROFILE(5) -151- MH-PROFILE(5) these tell _s_c_a_n and _m_h_l how to clear your terminal, and how many columns wide your terminal is. They also tell _m_h_l how many lines long your terminal screen is. editalt : the alternate message This is set by _d_i_s_t and _r_e_p_l during edit sessions so you can peruse the message being distributed or replied to. The mes- sage is also available through a link called "@" in the current directory if your current working directory and the folder the message lives in are on the same UNIX filesystem. mhdraft : the path to the working draft This is set by _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l to tell the _w_h_a_t_- _n_o_w_p_r_o_c which file to ask "What now?" questions about. In addition, _d_i_s_t, _f_o_r_w, and _r_e_p_l set mhfolder if appropriate. Further, _d_i_s_t and _r_e_p_l set mhaltmsg to tell the _w_h_a_t_n_o_w_p_r_o_c about an alternate message associated with the draft (the mes- sage being distributed or replied to), and _d_i_s_t sets mhdist to tell the _w_h_a_t_n_o_w_p_r_o_c that message re-distribution is occur- ring. Also, mheditor is set to tell the _w_h_a_t_n_o_w_p_r_o_c the user's choice of editor (unless overridden by `-noedit'). Similarly, mhuse may be set by _c_o_m_p. Finally, mhmessages is set by _d_i_s_t, _f_o_r_w, and _r_e_p_l if annotations are to occur (along with mhannotate, and mhinplace). It's amazing all the infor- mation that has to get passed via envariables to make the "What now?" interface look squeaky clean to the _M_H user, isn't it? The reason for all this is that the _M_H user can select _a_n_y program as the _w_h_a_t_n_o_w_p_r_o_c, including one of the standard shells. As a result, it's not possible to pass information via an argument list. If the WHATNOW option was set during _M_H configuration (type `-help' to an _M_H command to find out), and if this envariable is set, if the commands _r_e_f_i_l_e, _s_e_n_d, _s_h_o_w, or _w_h_o_m are not given any `msgs' arguments, then they will default to using the file indicated by mhdraft. This is useful for getting the default behavior supplied by the default _w_h_a_t_n_o_w_p_r_o_c. mhfolder : the folder containing the alternate message This is set by _d_i_s_t and _r_e_p_l during edit sessions so you can peruse other messages in the current folder besides the one being distributed or replied to. The mhfolder envariable is also set by _s_h_o_w, _p_r_e_v, and _n_e_x_t for use by _m_h_l. MHBBRC : If you define the envariable MHBBRC, you can specify a BBoards information file other than ._b_b_r_c to be read by _b_b_c. If the value of MHBBRC is not absolute, (i.e., does not begin with a / ), it will be presumed to start from the current working directory. MHFD : If the OVERHEAD option was set during _M_H configuration (type [mh.6] MH.6.8 UCI version MH-PROFILE(5) -152- MH-PROFILE(5) `-help' to an _M_H command to find out), then if this envariable is set, _M_H considers it to be the number of a file descriptor which is opened, read-only to the _M_H profile. Similarly, if the envariable MHCONTEXTFD is set, this is the number of a file descriptor which is opened read-only to the _M_H context. This feature of _M_H is experimental, and is used to examine possible speed improvements for _M_H startup. Note that these envariables must be set and non-empty to enable this feature. However, if OVERHEAD is enabled during _M_H configuration, then when _M_H programs call other _M_H programs, this scheme is used. These file descriptors are not closed throughout the execution of the _M_H program, so children may take advantage of this. This approach is thought to be completely safe and does result in some performance enhancements. _F_i_l_e_s $HOME/.mh_profile The user profile or $MH Rather than the standard profile /context The user context or $CONTEXT Rather than the standard context /.mh_sequences Public sequences for _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s All _S_e_e _A_l_s_o mh(1), environ(5), mh-sequence(5) _D_e_f_a_u_l_t_s None _C_o_n_t_e_x_t All [mh.6] MH.6.8 UCI version MH-PROFILE(5) -153- MH-PROFILE(5) _H_i_s_t_o_r_y In previous versions of _M_H, the current-message value of a writable folder was kept in a file called "cur" in the folder itself. In _m_h._3, the ._m_h__p_r_o_f_i_l_e contained the current-message values for all folders, regardless of their writability. In all versions of _M_H since _m_h._4, the ._m_h__p_r_o_f_i_l_e contains only static information, which _M_H programs will NOT update. Changes in context are made to the _c_o_n_t_e_x_t file kept in the users MH _d_i_r_e_c_t_o- _r_y. This includes, but is not limited to: the "Current-Folder" en- try and all private sequence information. Public sequence informa- tion is kept in a file called ._m_h__s_e_q_u_e_n_c_e_s in each folder. To convert from the format used in releases of _M_H prior to the for- mat used in the _m_h._4 release, _i_n_s_t_a_l_l-_m_h should be invoked with the `-compat' switch. This generally happens automatically on _M_H sys- tems generated with the "COMPAT" option during _M_H configuration. The ._m_h__p_r_o_f_i_l_e may override the path of the _c_o_n_t_e_x_t file, by specifying a "context" entry (this must be in lower-case). If the entry is not absolute (does not start with a / ), then it is inter- preted relative to the user's _M_H directory. As a result, you can actually have more than one set of private sequences by using dif- ferent context files. [mh.6] MH.6.8 UCI version MH-PROFILE(5) -154- MH-PROFILE(5) _B_u_g_s The shell quoting conventions are not available in the .mh_profile. Each token is separated by whitespace. There is some question as to what kind of arguments should be placed in the profile as options. In order to provide a clear answer, recall command line semantics of all _M_H programs: conflict- ing switches (e.g., `-header and `-noheader') may occur more than one time on the command line, with the last switch taking effect. Other arguments, such as message sequences, filenames and folders, are always remembered on the invocation line and are not superseded by following arguments of the same type. Hence, it is safe to place only switches (and their arguments) in the profile. If one finds that an _M_H program is being invoked again and again with the same arguments, and those arguments aren't switches, then there are a few possible solutions to this problem. The first is to create a (soft) link in your $_H_O_M_E/_b_i_n directory to the _M_H pro- gram of your choice. By giving this link a different name, you can create a new entry in your profile and use an alternate set of de- faults for the _M_H command. Similarly, you could create a small shell script which called the _M_H program of your choice with an al- ternate set of invocation line switches (using links and an alter- nate profile entry is preferable to this solution). Finally, the _c_s_h user could create an alias for the command of the form: alias cmd 'cmd arg1 arg2 ...' In this way, the user can avoid lengthy type-in to the shell, and still give _M_H commands safely. (Recall that some _M_H commands in- voke others, and that in all cases, the profile is read, meaning that aliases are disregarded beyond an initial command invocation) [mh.6] MH.6.8 UCI version MH-SEQUENCE(5) -155- MH-SEQUENCE(5) _N_A_M_E mh-sequence - sequence specification for MH message system _S_Y_N_O_P_S_I_S most _M_H commands _D_E_S_C_R_I_P_T_I_O_N Most _M_H commands accept a `msg' or `msgs' specification, where `msg' indicates one message and `msgs' indicates one or more mes- sages. To designate a message, you may use either its number (e.g., 1, 10, 234) or one of these "reserved" message names: _N_a_m_e _D_e_s_c_r_i_p_t_i_o_n first the first message in the folder last the last message in the folder cur the most recently accessed message prev the message numerically preceding "cur" next the message numerically following "cur" In commands that take a `msg' argument, the default is "cur". As a shorthand, "." is equivalent to "cur". For example: In a folder containing five messages numbered 5, 10, 94, 177 and 325, "first" is 5 and "last" is 325. If "cur" is 94, then "prev" is 10 and "next" is 177. The word `msgs' indicates that one or more messages may be speci- fied. Such a specification consists of one message designation or of several message designations separated by spaces. A message designation consists either of a message name as defined above, or a message range. A message range is specified as "name1-name2" or "name:n", where `name', `name1' and `name2' are message names, and `n' is an integer. The specification "name1-name2" designates all currently-existing messages from `name1' to `name2' inclusive. The message name "all" is a shorthand for the message range "first-last". The specification "name:n" designates up to `n' messages. These messages start with `name' if `name' is a message number or one of the reserved names "first" "cur", or "next", The messages end with `name' if `name' is "prev" or "last". The interpretation of `n' may be overridden by preceding `n' with a plus or minus sign; `+n' always means up to `n' messages starting with `name', and `-n' always means up to `n' messages ending with `name'. In commands which accept a `msgs' argument, the default is either "cur" or "all", depending on which makes more sense for each com- mand (see the individual man pages for details). Repeated [mh.6] MH.6.8 UCI version MH-SEQUENCE(5) -156- MH-SEQUENCE(5) specifications of the same message have the same effect as a single specification of the message. _U_s_e_r-_D_e_f_i_n_e_d _M_e_s_s_a_g_e _S_e_q_u_e_n_c_e_s In addition to the "reserved" (pre-defined) message names given above, _M_H supports user-defined sequence names. User-defined sequences allow the _M_H user a tremendous amount of power in dealing with groups of messages in the same folder by allowing the user to bind a group of messages to a meaningful symbolic name. The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanumeric charac- ters, and can not be one of the "reserved" message names above. After defining a sequence, it can be used wherever an _M_H command expects a `msg' or `msgs' argument. Some forms of message ranges are allowed with user-defined sequences. The specification "name:n" may be used, and it desig- nates up to the first `n' messages (or last `n' messages for `-n') which are elements of the user-defined sequence `name'. The specifications "name:next" and "name:prev" may also be used, and they designate the next or previous message (relative to the current message) which is an element of the user-defined sequence `name'. The specificaitions "name:first" and "name:last" are equivalent to "name:1" and "name:-1", respectively. The specifica- tion "name:cur" is not allowed (use just "cur" instead). The syn- tax of these message range specifcations is subject to change in the future. User-defined sequence names are specific to each folder. They are defined using the _p_i_c_k and _m_a_r_k commands. _P_u_b_l_i_c _a_n_d _P_r_i_v_a_t_e _U_s_e_r-_D_e_f_i_n_e_d _S_e_q_u_e_n_c_e_s There are two varieties of sequences: _p_u_b_l_i_c sequences and _p_r_i_v_a_t_e sequences. _P_u_b_l_i_c sequences of a folder are accessible to any _M_H user that can read that folder and are kept in the .mh_sequences file in the folder. _P_r_i_v_a_t_e sequences are accessible only to the _M_H user that defined those sequences and are kept in the user's _M_H context file. By default, _p_i_c_k and _m_a_r_k create _p_u_b_l_i_c sequences if the folder for which the sequences are being defined is writable by the _M_H user. Otherwise, _p_r_i_v_a_t_e sequences are created. This can be overridden with the `-public' and `-private' switches to _m_a_r_k. _S_e_q_u_e_n_c_e _N_e_g_a_t_i_o_n _M_H provides the ability to select all messages not elements of a [mh.6] MH.6.8 UCI version MH-SEQUENCE(5) -157- MH-SEQUENCE(5) user-defined sequence. To do this, the user should define the entry "Sequence-Negation" in the _M_H profile file; its value may be any string. This string is then used to preface an existing user- defined sequence name. This specification then refers to those messages not elements of the specified sequence name. For example, if the profile entry is: Sequence-Negation: not then anytime an _M_H command is given "notfoo" as a `msg' or `msgs' argument, it would substitute all messages that are not elements of the sequence "foo". Obviously, the user should beware of defining sequences with names that begin with the value of the "Sequence-Negation" profile entry. _T_h_e _P_r_e_v_i_o_u_s _S_e_q_u_e_n_c_e _M_H provides the ability to remember the `msgs' or `msg' argument last given to an _M_H command. The entry "Previous-Sequence" should be defined in the _M_H profile; its value should be a sequence name or multiple sequence names separated by spaces. If this entry is defined, when when an _M_H command finishes, it will define the sequence(s) named in the value of this entry to be those messages that were specified to the command. Hence, a profile entry of Previous-Sequence: pseq directs any _M_H command that accepts a `msg' or `msgs' argument to define the sequence "pseq" as those messages when it finishes. Note: there can be a performance penalty in using the "Previous-Sequence" facility. If it is used, all _M_H programs have to write the sequence information to the .mh_sequences file for the folder each time they run. If the "Previous-Sequence" profile entry is not included, only _p_i_c_k and _m_a_r_k will write to the .mh_sequences file. _T_h_e _U_n_s_e_e_n _S_e_q_u_e_n_c_e Finally, some users like to indicate messages which have not been previously seen by them. Both _i_n_c and _s_h_o_w honor the profile entry "Unseen-Sequence" to support this activity. This entry in the .mh_profile should be defined as one or more sequence names separated by spaces. If there is a value for "Unseen-Sequence" in the profile, then whenever _i_n_c places new messages in a folder, the new messages will also be added to the sequence(s) named in the value of this entry. Hence, a profile entry of Unseen-Sequence: unseen [mh.6] MH.6.8 UCI version MH-SEQUENCE(5) -158- MH-SEQUENCE(5) directs _i_n_c to add new messages to the sequence "unseen". Unlike the behavior of the "Previous-Sequence" entry in the profile, how- ever, the sequence(s) will not be zeroed by _i_n_c. Similarly, whenever _s_h_o_w (or _n_e_x_t or _p_r_e_v) displays a message, that message will be removed from any sequences named by the "Unseen-Sequence" entry in the profile. _F_i_l_e_s $HOME/.mh_profile The user profile /context The user context /.mh_sequences Public sequences for _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Sequence-Negation: To designate messages not in a sequence Previous-Sequence: The last message specification given Unseen-Sequence: Those messages not yet seen by the user _S_e_e _A_l_s_o mh(1), mark(1), pick(1), mh-profile(5) _D_e_f_a_u_l_t_s None _C_o_n_t_e_x_t All _B_u_g_s User-defined sequences are stored in the .mh_sequences file as a series of message specifications separated by spaces. If a user- defined sequence contains too many individual message specifica- tions, that line in the file may become too long for _M_H to handle. This will generate the error message ".mh_sequences is poorly for- matted". You'll have to edit the file by hand to remove the of- fending line. This can happen to users who define the "Previous-Sequence" entry in the _M_H profile and have a folder containing many messages with gaps in the numbering. A workaround for large folders is to minim- ize numbering gaps by using "folder -pack" often. [mh.6] MH.6.8 UCI version AP(8) -159- AP(8) _N_A_M_E ap - parse addresses 822-style _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/ap [-form formatfile] [-format string] [-normalize] [-nonormalize] [-width columns] addrs ... [-help] _D_E_S_C_R_I_P_T_I_O_N _A_p is a program that parses addresses according to the ARPA Inter- net standard. It also understands many non-standard formats. It is useful for seeing how _M_H will interpret an address. The _a_p program treats each argument as one or more addresses, and prints those addresses out in the official 822-format. Hence, it is usually best to enclose each argument in double-quotes for the shell. To override the output format used by _a_p, the `-format string' or `-format file' switches are used. This permits individual fields of the address to be extracted with ease. The string is simply a format stringand thefile is simply a format file. See _m_h-_f_o_r_m_a_t (5) for the details. In addition to the standard escapes, _a_p also recognizes the follow- ing additional escape: _E_s_c_a_p_e _R_e_t_u_r_n_s _D_e_s_c_r_i_p_t_i_o_n error string A diagnostic if the parse failed If the `-normalize' switch is given, _a_p will try to track down the official hostname of the address. Here is the default format string used by _a_p: %<{error}%{error}: %{text}%|%(putstr(proper{text}))%> which says that if an error was detected, print the error, a `:', and the address in error. Otherwise, output the 822-proper format of the address. _F_i_l_e_s $HOME/.mh_profile The user profile /usr/bs/mh-6.8/lib/mtstailor tailor file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None [mh.6] MH.6.8 UCI version AP(8) -160- AP(8) _S_e_e _A_l_s_o dp(8), _S_t_a_n_d_a_r_d _f_o_r _t_h_e _F_o_r_m_a_t _o_f _A_R_P_A _I_n_t_e_r_n_e_t _T_e_x_t _M_e_s_s_a_g_e_s (aka RFC-822) _D_e_f_a_u_l_t_s `-format' defaults as described above `-normalize' `-width' defaults to the width of the terminal _C_o_n_t_e_x_t None _B_u_g_s The argument to the `-format' switch must be interpreted as a sin- gle token by the shell that invokes _a_p. Therefore, one must usual- ly place the argument to this switch inside double-quotes. On hosts where _M_H was configured with the BERK option, address parsing is not enabled. [mh.6] MH.6.8 UCI version CONFLICT(8) -161- CONFLICT(8) _N_A_M_E conflict - search for alias/password conflicts _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/conflict [-mail name] [-search directory] [aliasfiles...] [-help] _D_E_S_C_R_I_P_T_I_O_N _C_o_n_f_l_i_c_t is a program that checks to see if the interface between _M_H and transport system is in good shape _C_o_n_f_l_i_c_t also checks for maildrops in /usr/spool/mail which do not belong to a valid user. It assumes that no user name will start with `.', and thus ignores files in /usr/spool/mail which begin with `.'. It also checks for entries in the _g_r_o_u_p (5) file which do not belong to a valid user, and for users who do not have a valid group number. In addition duplicate users and groups are noted. If the `-mail name' switch is used, then the results will be sent to the specified _n_a_m_e. Otherwise, the results are sent to the standard output. The `-search directory' switch can be used to search directories other than /usr/spool/mail and to report anomalies in those direc- tories. The `-search directory' switch can appear more than one time in an invocation to _c_o_n_f_l_i_c_t. _C_o_n_f_l_i_c_t should be run under _c_r_o_n (8), or whenever system account- ing takes place. _F_i_l_e_s /usr/bs/mh-6.8/lib/mtstailor tailor file /etc/passwd List of users /etc/group List of groups /usr/bs/mh-6.8/bin/mhmail Program to send mail /usr/spool/mail/ Directory of mail drop _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None _S_e_e _A_l_s_o mh-alias(5) _D_e_f_a_u_l_t_s `aliasfiles' defaults to /usr/bs/mh-6.8/lib/MailAliases [mh.6] MH.6.8 UCI version CONFLICT(8) -162- CONFLICT(8) _C_o_n_t_e_x_t None [mh.6] MH.6.8 UCI version DP(8) -163- DP(8) _N_A_M_E dp - parse dates 822-style _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/dp [-form formatfile] [-format string] [-width columns] dates ... [-help] _D_E_S_C_R_I_P_T_I_O_N _D_p is a program that parses dates according to the ARPA Internet standard. It also understands many non-standard formats, such as those produced by TOPS-20 sites and some UNIX sites using _c_t_i_m_e (3). It is useful for seeing how _M_H will interpret a date. The _d_p program treats each argument as a single date, and prints the date out in the official 822-format. Hence, it is usually best to enclose each argument in double-quotes for the shell. To override the output format used by _d_p, the `-format string' or `-format file' switches are used. This permits individual fields of the address to be extracted with ease. The string is simply a format stringand thefile is simply a format file. See _m_h-_f_o_r_m_a_t (5) for the details. Here is the default format string used by _d_p: %<(nodate{text})error: %{text}%|%(putstr(pretty{text}))%> which says that if an error was detected, print the error, a `:', and the date in error. Otherwise, output the 822-proper format of the date. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s None _S_e_e _A_l_s_o ap(8) _S_t_a_n_d_a_r_d _f_o_r _t_h_e _F_o_r_m_a_t _o_f _A_R_P_A _I_n_t_e_r_n_e_t _T_e_x_t _M_e_s_s_a_g_e_s (aka RFC-822) _D_e_f_a_u_l_t_s `-format' default as described above `-width' default to the width of the terminal [mh.6] MH.6.8 UCI version DP(8) -164- DP(8) _C_o_n_t_e_x_t None _B_u_g_s The argument to the `-format' switch must be interpreted as a sin- gle token by the shell that invokes _d_p. Therefore, one must usual- ly place the argument to this switch inside double-quotes. [mh.6] MH.6.8 UCI version FMTDUMP(8) -165- FMTDUMP(8) _N_A_M_E fmtdump - decode MH format files _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/fmtdump [-form formatfile] [-format string] [-help] _D_E_S_C_R_I_P_T_I_O_N _F_m_t_d_u_m_p is a program that parses an _M_H format file and produces a pseudo-language listing of the how _M_H interprets the file. The `-format string' and `-form formatfile' switches may be used to specify a format string or format file to read. The string is sim- ply a format string and the file is simply a format file. See _m_h- _f_o_r_m_a_t(5) for the details. _F_i_l_e_s $HOME/.mh_profile The user profile /usr/bs/mh-6.8/lib/scan.default The default format file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To determine the user's MH directory _S_e_e _A_l_s_o mh-format(5), mh-sequences(8) _C_o_n_t_e_x_t None _B_u_g_s The output may not be useful unless you are familiar with the internals of the mh-format subroutines. [mh.6] MH.6.8 UCI version INSTALL-MH(8) -166- INSTALL-MH(8) _N_A_M_E install-mh - initialize the MH environment _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/install-mh [-auto] [-compat] _D_E_S_C_R_I_P_T_I_O_N When a user runs any _M_H program for the first time, the program will invoke _i_n_s_t_a_l_l-_m_h (with the `-auto' switch) to query the user for the initial _M_H environment. The user does NOT invoke this pro- gram directly. The user is asked for the name of the directory that will be designated as the user's _M_H directory. If this direc- tory does not exist, the user is asked if it should be created. Normally, this directory should be under the user's home directory, and has the default name of Mail/. After _i_n_s_t_a_l_l-_m_h has written the initial .mh_profile for the user, control returns to the origi- nal _M_H program. As with all _M_H commands, _i_n_s_t_a_l_l-_m_h first consults the $HOME envariable to determine the user's home directory. If $HOME is not set, then the /_e_t_c/_p_a_s_s_w_d file is consulted. When converting from _m_h._3 to _m_h._4, _i_n_s_t_a_l_l-_m_h is automatically invoked with the `-compat' switch. _F_i_l_e_s $HOME/.mh_profile The user profile _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s Path: To set the user's MH directory _C_o_n_t_e_x_t With `-auto', the current folder is changed to "inbox". [mh.6] MH.6.8 UCI version POST(8) -167- POST(8) _N_A_M_E post - deliver a message _S_Y_N_O_P_S_I_S /usr/bs/mh-6.8/lib/post [-alias aliasfile] [-filter filterfile] [-nofilter] [-format] [-noformat] [-mime] [-nomime] [-msgid] [-nomsgid] [-verbose] [-noverbose] [-watch] [-nowatch] [-width columns] file [-help] _D_E_S_C_R_I_P_T_I_O_N _P_o_s_t is the program called by _s_e_n_d (1) to deliver the message in _f_i_l_e to local and remote users. In fact, all of the functions attributed to _s_e_n_d on its manual page are performed by _p_o_s_t, with _s_e_n_d acting as a relatively simple preprocessor. Thus, it is _p_o_s_t which parses the various header fields, appends From: and Date: lines, and interacts with the _M_M_D_F transport system. _P_o_s_t will not normally be called directly by the user. _P_o_s_t searches the "To:", "cc:", "Bcc:", "Fcc:", and "Resent-xxx:" header lines of the specified message for destination addresses, checks these addresses for validity, and formats them so as to con- form to ARPAnet Internet Message Format protocol, unless the `-noformat' flag is set. This will normally cause "@_l_o_c_a_l-_s_i_t_e" to be appended to each local destination address, as well as any local return addresses. The `-width columns' switch can be used to indi- cate the preferred length of the header components that contain addresses. If a "Bcc:" field is encountered, its addresses will be used for delivery, and the "Bcc:" field will be removed from the message sent to sighted recipients. The blind recipients will receive an entirely new message with a minimal set of headers. Included in the body of the message will be a copy of the message sent to the sighted recipients. If `-filter filterfile' is specified, then this copy is filtered (re-formatted) prior to being sent to the blind recipients. Otherwise, to use the MIME rules for encapsula- tion, specify the `-mime' switch. The `-alias aliasfile' switch can be used to specify a file that post should take aliases from. More than one file can be speci- fied, each being preceded with `-alias'. In any event, the primary alias file is read first. The `-msgid' switch indicates that a "Message-ID:" or "Resent-Message-ID:" field should be added to the header. The `-verbose' switch indicates that the user should be informed of each step of the posting/filing process. The `-watch' switch indicates that the user would like to watch the transport system's handling of the message (e.g., local and "fast" [mh.6] MH.6.8 UCI version POST(8) -168- POST(8) delivery). _P_o_s_t consults the envariable $SIGNATURE to determine the sender's personal name in constructing the "From:" line of the message. _F_i_l_e_s /usr/bs/mh-6.8/lib/mtstailor tailor file /usr/bs/mh-6.8/bin/refile Program to process Fcc:s /usr/bs/mh-6.8/lib/mhl Program to process Bcc:s /usr/bs/mh-6.8/lib/MailAliases Primary alias file _P_r_o_f_i_l_e _C_o_m_p_o_n_e_n_t_s _p_o_s_t does NOT consult the user's .mh_profile _S_e_e _A_l_s_o _S_t_a_n_d_a_r_d _f_o_r _t_h_e _F_o_r_m_a_t _o_f _A_R_P_A _I_n_t_e_r_n_e_t _T_e_x_t _M_e_s_s_a_g_e_s (aka RFC-822), mhmail(1), send(1), mh-mail(5), mh-alias(5) _D_e_f_a_u_l_t_s `-alias /usr/bs/mh-6.8/lib/MailAliases' `-format' `-nomime' `-nomsgid' `-noverbose' `-nowatch' `-width 72' `-nofilter' _C_o_n_t_e_x_t None _B_u_g_s "Reply-To:" fields are allowed to have groups in them according to the 822 specification, but _p_o_s_t won't let you use them. [mh.6] MH.6.8 UCI version _5. _R_E_P_O_R_T_I_N_G _P_R_O_B_L_E_M_S If problems are encountered with an _M_H program, the problems should be reported to the local maintainers of _M_H. When doing this, the name of the program should be reported, along with the version information for the program. To find out what version of an _M_H program is being run, invoke the program with the `-help' switch. In addition to listing the syntax of the command, the program will list information pertaining to its version. This information includes the version of _M_H, the host it was generated on, and the date the program was loaded. A second line of information, found on versions of _M_H after #5.380 include _M_H confi- guration options. For example, version: MH 6.1 #1[UCI] (nrtc-gremlin) of Wed Nov 6 01:13:53 PST 1985 options: [BSD42] [MHE] [NETWORK] [SENDMTS] [MMDFII] [SMTP] [POP] The `6.1 #1[UCI]' indicates that the program is from the UCI _m_h._6 ver- sion of _M_H. The program was generated on the host `nrtc-gremlin' on `Wed Nov 6 01:13:53 PST 1985'. It's usually a good idea to send the output of the `-help' switch along with your report. If there is no local _M_H maintainer, try the address Bug-MH. If that fails, use the Internet mailbox Bug-MH@ICS.UCI.EDU. -169- _6. _A_D_V_A_N_C_E_D _F_E_A_T_U_R_E_S This section describes some features of _M_H that were included strictly for advanced _M_H users. These capabilities permit _M_H to exhibit more powerful behavior for the seasoned _M_H users. _U_S_E_R-_D_E_F_I_N_E_D _S_E_Q_U_E_N_C_E_S User-defined sequences allow the _M_H user a tremendous amount of power in dealing with groups of messages in the same folder by allowing the user to bind a group of messages to a meaningful symbolic name. The user may choose any name for a message sequence, as long as it consists of alphanumeric characters and does not conflict with the standard _M_H reserved message names (e.g., "first", etc). After defining a sequence, it can be used wherever an _M_H command expects a `msg' or `msgs' argu- ment. A restricted form of message ranges are allowed with user-defined sequences. The form "name:n", specifies up to the first `n' messages which are part of the user-defined sequence `name'. A leading plus sign is allowed on `n', but is ignored. The interpretation of n is overrid- den if n is preceded by a minus sign; `-n' always means up to the last `n' messages which are part of the sequence `name'. Although all _M_H commands expand user-defined sequences as appropri- ate, there are two commands that allow the user to define and manipulate them: _p_i_c_k and _m_a_r_k. _P_i_c_k _a_n_d _U_s_e_r-_D_e_f_i_n_e_d _S_e_q_u_e_n_c_e_s Most users of _M_H will use user-defined sequences only with the _p_i_c_k command. By giving the `-sequence name' switch to _p_i_c_k (which can occur more than once on the command line), each sequence named is defined as those messages which _p_i_c_k matched according the the selection criteria it was given. Hence, pick -from frated -seq fred finds all those messages in the current folder which were from "frated", creates a sequence called "fred", and then adds them to the sequence. The user could then invoke scan fred to get a _s_c_a_n listing of those messages. Note that by default, _p_i_c_k creates the named sequences before it adds the selected messages to the sequence. Hence, if the named sequence already existed, the sequence is -170- -171- destroyed prior to being re-defined (nothing happens to the messages that were a part of this sequence, they simply cease to be members of that sequence). By using the `-nozero' switch, this behavior can be inhibited, as in pick -from frated -seq sgroup pick -from fear -seq sgroup -nozero pick -from freida -seq sgroup -nozero finds all those messages in the current folder which were from "frated", "fear", or "freida", and defines the sequence called "sgroup" as exactly those messages. These operations amounted to an "inclusive-or" of three selection criteria, using _p_i_c_k, one can also generate the "and" of some selection criteria as well: pick -from frated -seq fred pick -before friday -seq fred fred This example defines the sequence called "fred" as exactly those mes- sages from "frated" that were dated prior to "friday".[1] _P_i_c_k is normally used as a back-quoted command, for example, scan `pick -from postmaster` Now suppose that the user decides that another command should be issued, using exactly those messages. Since, _p_i_c_k wasn't given a `-sequence name' argument in this example, the user would end-up typing the entire back-quoted command again. A simpler way is to add a default sequence name to the .mh_profile. For example, pick: -seq select -list will tell _p_i_c_k to always define the sequence "select" whenever it's run. The `-list' is necessary since the `-sequence name' switch sets `-nol- ist' whenever the former is encountered. Hence, this profile entry makes _p_i_c_k define the "select" sequence and otherwise behave exactly as [1] Of course, it is much easier to simply use the built-in boolean operation of _p_i_c_k to get the desired results: pick -from frated -or -from fear -or -from freida -seq sgroup and pick -from frated -and -before friday -seq fred do exactly the same thing as the five commands listed above. Hence, the `-nozero' option to _p_i_c_k is only useful to manipulate existing se- quences. -172- if there was no profile entry at all. _M_a_r_k _a_n_d _U_s_e_r-_D_e_f_i_n_e_d _S_e_q_u_e_n_c_e_s The _m_a_r_k command lets the user perform low-level manipulation of sequences, and also provides a well-needed debug facility to the implementors/developers/maintainers of _M_H (the _M_H-hacks). In the future, a user-friendly "front-end" for _m_a_r_k will probably be developed to give the _M_H user a way to take better advantage of the underlying facilities. _P_u_b_l_i_c _a_n_d _P_r_i_v_a_t_e _U_s_e_r-_D_e_f_i_n_e_d _S_e_q_u_e_n_c_e_s There are two kinds of sequences: _p_u_b_l_i_c sequences, and _p_r_i_v_a_t_e sequences. _P_u_b_l_i_c sequences of a folder are accessible to any _M_H user that can read that folder and are kept in the .mh_sequences file in the folder. _P_r_i_v_a_t_e sequences are accessible only to the _M_H user that defined those sequences and are kept in the user's _M_H context file. By default, _p_i_c_k (and _m_a_r_k ) create _p_u_b_l_i_c sequences if the folder for which the sequences are being defined is writable by the _M_H user. Oth- erwise, _p_r_i_v_a_t_e sequences are created. This can be overridden with the `-public' and `-nopublic' switches. _S_e_q_u_e_n_c_e _N_e_g_a_t_i_o_n In addition to telling an _M_H command to use the messages in the sequence "seen", as in refile seen +old it would be useful to be easily able to tell an _M_H command to use all messages _e_x_c_e_p_t those in the sequence. One way of doing this would be to use _m_a_r_k and define the sequence explicitly, as in mark -delete -zero seen -seq notseen which, owing to _m_a_r_k 's cryptic interpretation of `-delete' and `-zero', defines the sequence "notseen" to be all messages not in the sequence "seen". Naturally, anytime the sequence "seen" is changed, "notseen" will have to be updated. Another way to achieve this is to define the entry "Sequence-Negation:" in the .mh_profile. If the entry was Sequence-Negation: not then anytime an _M_H command was given "notseen" as a `msg' or `msgs' argument, it would substitute all messages that are not a member of the sequence "seen". That is, refile notseen +new does just that. The value of the "Sequence-Negation:" entry in the pro- file can be any string. Hence, experienced users of _M_H do not use a -173- word, but rather a special character which their shell does not inter- pret (users of the _C_S_h_e_l_l use a single caret or circumflex (usually shift-6), while users of the Bourne shell use an exclamation-mark). This is because there is nothing to prevent a user of _M_H from defining a sequence with this string as its prefix, if the string is nothing by letters and digits. Obviously, this could lead to confusing behavior if the "Sequence-Negation:" entry leads _M_H to believe that two sequences are opposites by virtue of their names differing by the prefix string. _T_h_e _P_r_e_v_i_o_u_s _S_e_q_u_e_n_c_e Many times users find themselves issuing a series of commands on the same sequences of messages. If the user first defined these mes- sages as a sequence, then considerable typing may be saved. If the user doesn't have this foresight, _M_H provides a handy way of having _M_H remember the `msgs' or `msg' argument last given to an _M_H command. If the entry "Previous-Sequence:" is defined in the .mh_profile, then when the command finishes, it will define the sequence(s) named in the value of this entry as being exactly those messages that were specified. Hence, a profile entry of Previous-Sequence: pseq directs any _M_H command that accepts a `msg' or `msgs' argument to define the sequence "pseq" as those messages when it finishes. More than one sequence name may be placed in this entry, separated with spaces. The one disadvantage of this approach is that the _M_H progams have to update the sequence information for the folder each time they run (although most programs read this information, usually only _p_i_c_k and _m_a_r_k have to write this information out). _T_h_e _U_n_s_e_e_n _S_e_q_u_e_n_c_e Finally, some users like to distinguish between messages which have been previously seen by them. Both _i_n_c and _s_h_o_w honorthe profile entry "Unseen-Sequence" to support this activity. Whenever _i_n_c places new messages in a folder, if the entry "Unseen-Sequence" is defined in the .mh_profile, then when the command finishes, _i_n_c will add the new mes- sages to the sequence(s) named in the value of this entry. Hence, a profile entry of Unseen-Sequence: unseen directs _i_n_c to add new messages to the sequence "unseen". Unlike the behavior of the "Previous-Sequence" entry in the profile however, the sequence(s) will not be zero'd. Similarly, whenever _s_h_o_w (or _n_e_x_t or _p_r_e_v ) displays a message, they remove those messages from any sequences named by the "Unseen-Sequence" entry in the profile. -174- _C_O_M_P_O_S_I_T_I_O_N _O_F _M_A_I_L There are a number of interesting advanced facilities for the com- position of outgoing mail. _T_h_e _D_r_a_f_t _F_o_l_d_e_r The _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l commands have two switches, `-draftfolder +folder' and `-draftmessage msg'. If `-draftfolder +folder' is used, these commands are directed to construct a draft message in the indicated folder. (The "Draft-Folder:" profile entry may be used to declare a default draft folder for use with _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l) If `-draftmessage msg' is not used, it defaults to `new' (unless the user invokes _c_o_m_p with `-use', in which case the default is `cur'). Hence, the user may have several message composi- tions in progress simultaneously. Now, all of the _M_H tools are avail- able on each of the user's message drafts (e.g., _s_h_o_w, _s_c_a_n, _p_i_c_k, and so on). If the folder does not exist, the user is asked if it should be created (just like with _r_e_f_i_l_e ). Also, the last draft message the user was composing is known as `cur' in the draft folder. Furthermore, the _s_e_n_d command has these switches as well. Hence, from the shell, the user can send off whatever drafts desired using the standard _M_H `msgs' convention with `-draftmessage msgs'. If no `msgs' are given, it defaults to `cur'. In addition, all five programs have a `-nodraftfolder' switch, which undoes the last occurrence of `-draftfolder folder' (useful if the latter occurs in the user's _M_H profile). If the user does not give the `-draftfolder +folder' switch, then all these commands act ``normally''. Note that the `-draft' switch to _s_e_n_d and _s_h_o_w still refers to the file called `draft' in the user's _M_H directory. In the interests of economy of expression, when using _c_o_m_p or _s_e_n_d, the user needn't prefix the draft `msg' or `msgs' with `-draft- message'. Both of these commands accept a `file' or `files' argument, and they will, if given `-draftfolder +folder' treat these arguments as `msg' or `msgs'.[2] Hence, send -draftf +drafts first is the same as send -draftf +drafts -draftm first [2] This may appear to be inconsistent, at first, but it saves a lot of typing. -175- To make all this a bit more clear, here are some examples. Let's assume that the following entries are in the _M_H profile: Draft-Folder: +drafts sendf: -draftfolder +drafts Furthermore, let's assume that the program _s_e_n_d_f is a (symbolic) link in the user's $HOME/bin/ directory to _s_e_n_d. Then, any of the commands comp dist forw repl constructs the message draft in the `draft' folder using the `new' mes- sage number. Furthermore, they each define `cur' in this folder to be that message draft. If the user were to use the _q_u_i_t option at `What now?' level, then later on, if no other draft composition was done, the draft could be sent with simply sendf Or, if more editing was required, the draft could be edited with comp -use Instead, if other drafts had been composed in the meantime, so that this message draft was no longer known as `cur' in the `draft' folder, then the user could _s_c_a_n the folder to see which message draft in the folder should be used for editing or sending. Clever users could even employ a back-quoted _p_i_c_k to do the work: comp -use `pick +drafts -to bug-mh` or sendf `pick +drafts -to bug-mh` Note that in the _c_o_m_p example, the output from _p_i_c_k must resolve to a single message draft (it makes no sense to talk about composing two or more drafts with one invocation of _c_o_m_p ). In contrast, in the _s_e_n_d example, as many message drafts as desired can appear, since _s_e_n_d doesn't mind sending more than one draft at a time. Note that the argument `-draftfolder +folder' is not included in the profile entry for _s_e_n_d, since when _c_o_m_p, et. al., invoke _s_e_n_d directly, they supply _s_e_n_d with the UNIX pathname of the message draft, and not a `draftmessage msg' argument. As far as _s_e_n_d is concerned, a _d_r_a_f_t _f_o_l_d_e_r is not being used. It is important to realize that _M_H treats the draft folder like a standard _M_H folder in nearly all respects. There are two exceptions: -176- first_____, under no circumstancs will the `-draftfolder folder' switch cause the named folder to become the current folder.[3] Second______, although con- ceptually _s_e_n_d deletes the `msgs' named in the draft folder, it does not call `delete-prog' to perform the deletion. _W_h_a_t _H_a_p_p_e_n_s _i_f _t_h_e _D_r_a_f_t _E_x_i_s_t_s When the _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l commands are invoked and the draft you indicated already exists, these programs will prompt the user for a reponse directing the program's action. The prompt is Draft ``/usr/src/uci/mh/mhbox/draft'' exists (xx bytes). Disposition? The appropriate responses and their meanings are: replace_______: deletes the draft and starts afresh; list____: lists the draft; refile______: files the draft into a folder and starts afresh; and, quit____: leaves the draft intact and exits. In addition, if you specified `-draftfolder folder' to the com- mand, then one other response will be accepted: new___: finds a new draft, just as if `-draftmessage new' had been given. Finally, the _c_o_m_p com- mand will accept one more response: use___: re-uses the draft, just as if `-use' had been given. _T_h_e _P_u_s_h _O_p_t_i_o_n _a_t _W_h_a_t _n_o_w? _L_e_v_e_l The _p_u_s_h option to the "What now?" query in the _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l commands, directs the command to _s_e_n_d the draft in a special detached fashion, with all normal output discarded. If _p_u_s_h is used and the draft can not be sent, then _M_H will send the user a message, indi- cating the name of the draft file, and an explanation of the failure. The user can also invoke _s_e_n_d from the shell with the `-push' switch, which makes _s_e_n_d act like it had been _p_u_s_h 'd by one of the com- position commands. By using _p_u_s_h, the user can free the shell to do other things, because it appears to the shell that the _M_H command has finished. As a result the shell will immediately prompt for another command, despite the fact that the command is really still running. Note that if the user indicates that annotations are to be performed (with `-annotate' to [3] Obviously, if the folder appeared in the context of a standard `+folder' argument to an _M_H program, as in scan +drafts it might become the current folder, depending on the context changes of the _M_H program in question. -177- _d_i_s_t, _f_o_r_w, or _r_e_p_l), the annotations will be performed after the mes- sage has been successfully sent. This action will appear to occur asyn- chronously. Obviously, if one of the messages that is to be annotated is removed before the draft has been successfully sent, then when _M_H tries to make the annotations, it won't be able to do so. In previous versions of _M_H, this resulted in an error message mysteriously appearing on the user's terminal. In _m_h._5 and later versions, in this special circumstance, no error will be generated. If send is _p_u_s_h 'd, then the `-forward' switch is examined if a failure notice is generated. If given, then the draft is forwarded with the failure notice sent to the user. This allows rapid _b_u_r_s_t 'ing of the failure notice to retrieve the unsent draft. _O_p_t_i_o_n_s _a_t _W_h_a_t _n_o_w? _L_e_v_e_l By default, the message composition programs call a program called _w_h_a_t_n_o_w before the initial draft composition. The _M_H user can specify any program for this. Following is some information about the default "What now?" level. More detailed information can be found in the _w_h_a_t_- _n_o_w (1) manual entry. When using the _c_o_m_p, _d_i_s_t, _f_o_r_w, and _r_e_p_l commands at "What now?" level, the _e_d_i_t, _l_i_s_t, _h_e_a_d_e_r_s, _r_e_f_i_l_e, and (for the _d_i_s_t and _r_e_p_l com- mands) the _d_i_s_p_l_a_y options will pass on any additional arguments given them to whatever program they invoke. In _m_h._1 (the original RAND _M_H ) and _m_h._2 (the first UCI version of _M_H ), _M_H used a complicated heuristic to determine if the draft should be deleted or preserved after an unsuccessful edit. In _m_h._3, _M_H was changed to preserve the draft always, since _c_o_m_p, et. al., could usually look at a draft, apply another set of heuristics, and decide if it was important or not. With the notion of a _d_r_a_f_t _f_o_l_d_e_r, in which one by default gets a `new' message draft, the edit deletion/preservation algo- rithm was re-implemented, to keep the draft folder from being cluttered with aborted edits. Also, note that by default, if the draft cannot be successfully sent, these commands return to "What now?" level. But, when _p_u_s_h is used, this does not happen (obviously). Hence, if these commands were expected to annotate any messages, this will have to be done by hand, later on, with the _a_n_n_o command. Finally, if the `-delete' switch is not given to the _q_u_i_t option, then these commands will inform the user of the name of the unsent draft file. _D_i_g_e_s_t_s -178- The _f_o_r_w command has the beginnings of a digestifying facility, with the `-digest list', `-issue number', and `-volume number' switches. If _f_o_r_w is given "list" to the `-digest' switch as the name of the dis- cussion group, and the `-issue number' switch is not given, then _f_o_r_w looks for an entry in the user's _M_H context called "_d_i_g_e_s_t-issue-list" and increments its value to use as the issue number. Similarly, if the `-volume number' switch is not given, then _f_o_r_w looks for "_d_i_g_e_s_t-volume-list" (but does not increment its value) to use as the volume number. Having calculated the name of the digest and the volume and issue numbers, _f_o_r_w will now process the components file using the same format string mechanism used by _r_e_p_l. The current `%'-escapes are: _e_s_c_a_p_e _t_y_p_e _s_u_b_s_t_i_t_u_t_i_o_n digest string digest name msg integer issue number cur integer volume number In addition, to capture the current date, any of the escapes valid for _d_p (8) are also valid for _f_o_r_w. The default components file used by _f_o_r_w when in digest mode is: From: %{digest}-Request To: %{digest} Distribution: dist-%{digest}; Subject: %{digest} Digest V%(cur) #%(msg) Reply-To: %{digest} -------- %{digest} Digest %(weekday{date}), %2(mday{date}) %(month{date}) 19%02(year{date}) Volume %(cur) : Issue %(msg) Today's Topics: Hence, when the `-digest' switch is present, the first step taken by _f_o_r_w is to expand the format strings in the component file. The next step is to compose the draft using the standard digest encapsulation algorithm (even putting an "End of list Digest" trailer in the draft). Once the draft is composed by _f_o_r_w, _f_o_r_w writes out the volume and issue profile entries for the digest, and then invokes the editor. Naturally, when composing the draft, _f_o_r_w will honor the `-filter filterfile' switch, which is given to _m_h_l to filter each mes- sage being forwarded prior to encapsulation in the draft. A good filter file to use, which is called _m_h_l._d_i_g_e_s_t, is: -179- width=80,overflowoffset=10 leftadjust,compress,compwidth=9 Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>" From: Subject: : body:nocomponent,overflowoffset=0,noleftadjust,nocompress _F_O_L_D_E_R _H_A_N_D_L_I_N_G There are two interesting facilities for manipulating folders: relative folder addressing, which allows a user to shorten the typing of long folder names; and the folder-stack, which permits a user to keep a stack of current folders. _R_e_l_a_t_i_v_e _F_o_l_d_e_r _A_d_d_r_e_s_s_i_n_g By default, when `+folder' is given, and the folder name is not absolute (does not start with /, ./, or ../), then the UNIX pathname of the folder is interpreted relative to the user's _M_H directory. Although this mechanism works fine for top-level folders and their immediate sub-folders, once the depth of the sub-folder tree grows, it becomes rather unwieldly: scan +mh/mh.4/draft/flames is a lot of typing. _M_H can't do anything if the current folder was "+inbox", but if the current folder was, say, "+mh/mh.4/draft", _M_H has a short-hand notation to reference a sub-folder of the current folder. Using the `@folder' notation, the _M_H user can direct any _M_H program which expects a `+folder' argument to look for the folder relative to the current folder instead of the user's _M_H directory. Hence, if the current folder _w_a_s "+mh/mh.4/draft", then scan @flames would do the trick handily. In addition, if the current folder _w_a_s "+mh/mh.4/draft", scan @../pick would scan the folder "+mh/mh.4/pick", since, in the UNIX fashion, it references the folder "pick" which is a sub-folder of the folder that is the parent of the current folder. Since most advanced _M_H users seem to exhibit a large degree of locality in referencing folders when they pro- cess mail, this convention should receive a wide range of uses. -180- _T_h_e _F_o_l_d_e_r-_S_t_a_c_k The _f_o_l_d_e_r-_s_t_a_c_k mechanism in _M_H gives the _M_H user a facility simi- lar to the _C_S_h_e_l_l 's directory-stack. Simply put, folder -push +foo makes "foo" the current folder, saving the folder that was previously the current folder on the _f_o_l_d_e_r-_s_t_a_c_k. As expected, folder -pop takes the top of the _f_o_l_d_e_r-_s_t_a_c_k and makes it the current folder. Each of these switches lists the _f_o_l_d_e_r-_s_t_a_c_k when they execute. It is sim- ple to write a _p_u_s_h_f command as a shell script. It's one line: exec folder -push $@ Probably a better way is to link _f_o_l_d_e_r to the $HOME/bin/ directory under the name of _p_u_s_h_f and then add the entry pushf: -push to the .mh_profile. The manual page for _f_o_l_d_e_r discusses the analogy between the _C_S_h_e_l_l directory stack commands and the switches in _f_o_l_d_e_r which manipulate the _f_o_l_d_e_r-_s_t_a_c_k. The _f_o_l_d_e_r command uses the context entry `Folder-Stack:' to keep track of the folders in the user's stack of folders. Appendix A _C_O_M_M_A_N_D _S_U_M_M_A_R_Y ali [-alias aliasfile] [-list] [-nolist] [-normalize] [-nonormalize] [-user] [-nouser] aliases ... [-help] anno [+folder] [msgs] [-component field] [-inplace] [-noinplace] [-date] [-nodate] [-text body] [-help] bbc [bboards ...] [-topics] [-check] [-read] [-quiet] [-verbose] [-archive] [-noarchive] [-protocol] [-noprotocol] [-mshproc program] [switches for _m_s_h_p_r_o_c] [-rcfile rcfile] [-norcfile] [-file BBoardsfile] [-user BBoardsuser] [-host host] [-help] burst [+folder] [msgs] [-inplace] [-noinplace] [-quiet] [-noquiet] [-verbose] [-noverbose] [-help] comp [+folder] [msg] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-file file] [-form formfile] [-use] [-nouse] [-whatnowproc program] [-nowhatnowproc] [-help] dist [+folder] [msg] [-annotate] [-noannotate] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-form formfile] [-inplace] [-noinplace] [-whatnowproc program] [-nowhatnowproc] [-help] /usr/bs/mh-6.8/lib/fmtdump [-form formatfile] [-format string] [-help] folder [+folder] [msg] [-all] [-fast] [-nofast] [-header] [-noheader] [-pack] [-nopack] [-recurse] [-norecurse] [-total] [-nototal] [-print] [-noprint] [-list] [-nolist] [-push] [-pop] [-help] folders forw [+folder] [msgs] [-annotate] [-noannotate] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-filter filterfile] [-form formfile] [-format] [-noformat] [-inplace] [-noinplace] [-mime] [-nomime] [-whatnowproc program] [-nowhatnowproc] [-help] -181- forw [+folder] [msgs] [-digest list] [-issue number] [-volume number] [other switches for _f_o_r_w] [-help] inc [+folder] [-audit audit-file] [-noaudit] [-changecur] [-nochangecur] [-file name] [-form formatfile] [-format string] [-silent] [-nosilent] [-truncate] [-notruncate] [-width columns] [-host host] [-user user] [-apop] [-noapop] [-rpop] [-norpop] [-pack file] [-nopack] [-help] mark [+folder] [msgs] [-sequence name ...] [-add] [-delete] [-list] [-public] [-nopublic] [-zero] [-nozero] [-help] /usr/bs/mh-6.8/lib/mhl [-bell] [-nobell] [-clear] [-noclear] [-folder +folder] [-form formfile] [-length lines] [-width columns] [-moreproc program] [-nomoreproc] [files ...] [-help] mhmail [ addrs ... [-body text] [-cc addrs ...] [-from addr] [-subject subject]] [-help] mhn [+folder] [msgs] [-part number]... [-type content]... [-list [-header] [-noheader] [-realsize] [-norealsize]] [-nolist] [-show [-serialonly] [-noserialonly]] [-form formfile]] [-noshow] [-store [-auto] [-noauto]] [-nostore] [-verbose] [-noverbose] [-rfc934mode] [-norfc934mode] [-ebcdic] [-noebcdicsafe] [-help] mhparam [profile-components] [-components] [-nocomponents] [-all] [-help] mhpath [+folder] [msgs] [-help] msgchk [-date] [-nodate] [-notify all/mail/nomail] [-nonotify all/mail/nomail] [-host host] [-user user] [-apop] [-noapop] [-rpop] [-norpop] [users ...] [-help] msh [-prompt string] [-scan] [-noscan] [-topcur] [-notopcur] [file] [-help] next [+folder] [-header] [-noheader] [-showproc program] [-noshowproc] [switches for _s_h_o_w_p_r_o_c] [-help] packf [+folder] [msgs] [-file name] [-help] -182- pick [+folder] [msgs] [-and ...] [-or ...] [-not ...] [-lbrace ... -rbrace] [--component pattern] [-after date] [-before date] [-datefield field] [-sequence name ...] [-public] [-nopublic] [-zero] [-nozero] [-list] [-nolist] [-help] prev [+folder] [-header] [-noheader] [-showproc program] [-noshowproc] [switches for _s_h_o_w_p_r_o_c] [-help] prompter [-erase chr] [-kill chr] [-prepend] [-noprepend] [-rapid] [-norapid] [-doteof] [-nodoteof] file [-help] /usr/bs/mh-6.8/lib/rcvstore [+folder] [-create] [-nocreate] [-sequence name ...] [-public] [-nopublic] [-zero] [-nozero] [-help] refile [msgs] [-draft] [-link] [-nolink] [-preserve] [-nopreserve] [-src +folder] [-file file] +folder ... [-help] repl [+folder] [msg] [-annotate] [-noannotate] [-cc all/to/cc/me] [-nocc all/to/cc/me] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-fcc +folder] [-filter filterfile] [-form formfile] [-inplace] [-noinplace] [-query] [-noquery] [-whatnowproc program] [-nowhatnowproc] [-width columns] [-help] rmf [+folder] [-interactive] [-nointeractive] [-help] rmm [+folder] [msgs] [-help] scan [+folder] [msgs] [-clear] [-noclear] [-form formatfile] [-format string] [-header] [-noheader] [-width columns] [-reverse] [-noreverse] [-file filename] [-help] send [-alias aliasfile] [-draft] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-filter filterfile] [-nofilter] [-format] [-noformat] [-forward] [-noforward] [-mime] [-nomime] [-msgid] [-nomsgid] [-push] [-nopush] [-split seconds] [-verbose] [-noverbose] [-watch] [-nowatch] [-width columns] [file ...] [-help] show [+folder] [msgs] [-draft] [-header] [-noheader] [-showproc program] [-noshowproc] [switches for _s_h_o_w_p_r_o_c] [-help] sortm [+folder] [msgs] [-datefield field] [-textfield field] [-notextfield] [-limit days] [-nolimit] [-verbose] [-noverbose] [-help] -183- vmh [-prompt string] [-vmhproc program] [-novmhproc] [switches for _v_m_h_p_r_o_c] [-help] whatnow [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit] [-prompt string] [file] [-help] whom [-alias aliasfile] [-check] [-nocheck] [-draft] [-draftfolder +folder] [-draftmessage msg] [-nodraftfolder] [file] [-help] /usr/bs/mh-6.8/lib/ap [-form formatfile] [-format string] [-normalize] [-nonormalize] [-width columns] addrs ... [-help] /usr/bs/mh-6.8/lib/conflict [-mail name] [-search directory] [aliasfiles ...] [-help] /usr/bs/mh-6.8/lib/dp [-form formatfile] [-format string] [-width columns] dates ... [-help] /usr/bs/mh-6.8/lib/install-mh [-auto] [-compat] /usr/bs/mh-6.8/lib/post [-alias aliasfile] [-filter filterfile] [-nofilter] [-format] [-noformat] [-mime] [-nomime] [-msgid] [-nomsgid] [-verbose] [-noverbose] [-watch] [-nowatch] [-width columns] file [-help] /usr/bs/mh-6.8/lib/slocal [address info sender] [-addr address] [-info data] [-sender sender] [-user username] [-mailbox mbox] [-file file] [-maildelivery deliveryfile] [-verbose] [-noverbose] [-debug] [-help] -184- Appendix B _M_E_S_S_A_G_E _N_A_M_E _B_N_F msgs := msgspec | msgs msgspec msgspec := msg | msg-range | msg-sequence | user-defined-sequence msg := msg-name | msg-name := "first" | "last" | "cur" | "." | "next" | "prev" msg-range := msg"-"msg | "all" msg-sequence := msg":"signed-number signed-number := "+" | "-" | user-defined-sequence := | * Where is a decimal number greater than zero. Msg-range specifies all of the messages in the given range and must not be empty. Msg-sequence specifies up to of messages, beginning with "msg" (in the case of first, cur, next, or ), or ending with "msg" (in the case of prev or last). + forces "starting with msg", and - forces "ending with number". In all cases, "msg" must exist. User-defined sequences are defined and manipulated with the _p_i_c_k and _m_a_r_k commands. -185- _R_E_F_E_R_E_N_C_E_S 1. Crocker, D. H., J. J. Vittal, K. T. Pogran, and D. A. Henderson, Jr., "Standard for the Format of ARPA Network Text Messages," _R_F_C_7_3_3, November 1977. 2. Thompson, K., and D. M. Ritchie, "The UNIX Time-sharing System," _C_o_m_m_u_n_i_c_a_t_i_o_n_s _o_f _t_h_e _A_C_M, Vol. 17, July 1974, pp. 365-375. 3. McCauley, E. J., and P. J. Drongowski, "KSOS-The Design of a Secure Operating System," _A_F_I_P_S _C_o_n_f_e_r_e_n_c_e _P_r_o_c_e_e_d_i_n_g_s, National Computer Conference, Vol. 48, 1979, pp. 345-353. 4. Crocker, David H., _F_r_a_m_e_w_o_r_k _a_n_d _F_u_n_c_t_i_o_n_s _o_f _t_h_e "_M_S" _P_e_r_s_o_n_a_l _M_e_s_- _s_a_g_e _S_y_s_t_e_m, The RAND Corporation, R-2134-ARPA, December 1977. 5. Thompson, K., and D. M. Ritchie, _U_N_I_X _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l, 6th ed., Western Electric Company, May 1975 (available only to UNIX licen- sees). 6. Crocker, D. H., "Standard for the Format of ARPA Internet Text Mes- sages," _R_F_C_8_2_2, August 1982. -186- -i- _R_E_A_D _T_H_I_S Although the _M_H system was originally developed by the RAND Cor- poration, and is now in the public domain, the RAND Corporation assumes no responsibility for _M_H or this particular version of _M_H. In addition, the Regents of the University of California issue the following disclaimer in regard to the UCI version of _M_H: "Although each program has been tested by its contributor, no war- ranty, express or implied, is made by the contributor or the University of California, as to the accuracy and functioning of the program and related program material, nor shall the fact of distri- bution constitute any such warranty, and no responsibility is assumed by the contributor or the University of California in con- nection herewith." This version of _M_H is in the public domain, and as such, there are no real restrictions on its use. The _M_H source code and documentation have no licensing restrictions whatsoever. As a courtesy, the authors ask only that you provide appropriate credit to the RAND Corporation and the University of California for having developed the software. _M_H is a software package that is supported neither by the RAND Cor- poration nor the University of California. However, since we do use the software ourselves and plan to continue using (and improving) _M_H, bug reports and their associated fixes should be reported back to us so that we may include them in future releases. The current computer mailbox for _M_H is Bug-MH@ICS.UCI.EDU (in the ARPA Internet), and ...!ucbvax!ucivax!bug-mh (UUCP). Presently, there are two Internet dis- cussion groups, MH-Users@ICS.UCI.EDU and MH-Workers@ICS.UCI.EDU. MH-Workers is for people discussing code changes to _M_H. MH-Users is for general discussion about how to use _M_H. MH-Users is bi-directionally gatewayed into USENET as comp.mail.mh. _H_O_W _T_O _G_E_T _M_H Since you probably already have _M_H, you may not need to read this unless you suspect you have an old version. There are two ways to get the latest release: 1. If you can FTP to the ARPA Internet, use anonymous FTP to ics.uci.edu [128.195.1.1] and retrieve the file pub/mh/mh-6.8.tar.Z. This is a tar image after being run through the compress program (approximately 1.8MB). There should also be a README file in that directory which tells what the current release of _M_H is, and how to get updates. -i- -ii- This tar file is also available on louie.udel.edu [128.175.1.3] in portal/mh-6.8.tar.Z. You may also find MH on various other hosts; to make sure you get the latest version and don't waste your time re-fixing bugs, it's best to get it from either ics.uci.edu or louie.udel.edu. 2. You can send $75 US to the address below. This covers the cost of a 6250 BPI 9-track magtape, handling, and shipping. In addition, you'll get a laser-printed hard-copy of the entire MH documentation set. Be sure to include your USPS address with your check. Checks must be drawn on U.S. funds and should be made payable to: Regents of the University of California The distribution address is: Computing Support Group Attn: MH distribution Department of Information and Computer Science University of California, Irvine Irvine, CA 92717 714/856-7554 If you just want the hard-copies of the documentation, you still have to pay the $75. The tar image has the documentation source (the manual is in roff format, but the rest are in TeX format). Postscript formatted versions of the TeX papers are available, as are crude tty- conversions of those papers. _F_O_R_E_W_O_R_D This document describes the RAND _M_H Message Handling System. Its primary purpose is to serve as a user's manual. It has been heavily based on a previous version of the manual, prepared by Bruce Borden, Stockton Gaines, and Norman Shapiro. _M_H is a particularly novel system, and thus it is often more prone to change than other pieces of production software. As such, some specific points in this manual may not be correct in the future. In all cases, the on-line sections of this manual, available through the UNIX[1] _m_a_n command, should present the most current information. When reading this document as a user's manual, certain sections are more interesting than others. The Preface and Summary are not particu- larly interesting to those interested in learning _M_H. The Introduction is slightly more interesting, as it touches upon the organization of the remainder of this document. The most useful sections are the Overview, Tutorial, and Detailed Description. The Overview should be read by all _M_H users, regardless of their expertise (beginning, novice, advanced, or hacker). The Tutorial should be read by all beginning and novice _M_H users, as it presents a nice description of the _M_H system. The Detailed Description should be read by the day-to-day user of _M_H, as it spells out all of the realities of the _M_H system. The Advanced Features sec- tion discusses some powerful _M_H capabilities for advanced users. Appen- dix A is particularly useful for novices, as it summarizes the invoca- tion syntax of all the _M_H commands. There are also several other documents which may be useful to you: _T_h_e _R_A_N_D _M_H _M_e_s_s_a_g_e _H_a_n_d_l_i_n_g _S_y_s_t_e_m: _T_u_t_o_r_i_a_l, which is a tutorial for _M_H; _T_h_e _R_A_N_D _M_H _M_e_s_s_a_g_e _H_a_n_d_l_i_n_g _S_y_s_t_e_m: _T_h_e _U_C_I _B_B_o_a_r_d_s _F_a_c_i_l_i_t_y, which describes the BBoards handling under _M_H; _M_H._5: _H_o_w _t_o _p_r_o_c_e_s_s _2_0_0 _m_e_s_- _s_a_g_e_s _a _d_a_y _a_n_d _s_t_i_l_l _g_e_t _s_o_m_e _r_e_a_l _w_o_r_k _d_o_n_e, which was presented at the 1985 Summer Usenix Conference and Exhibition in Portland, Oregon; _M_H: _A _M_u_l_t_i_f_a_r_i_o_u_s _U_s_e_r _A_g_e_n_t, which has been accepted for publication by Computer Networks; _M_Z_n_e_t: _M_a_i_l _S_e_r_v_i_c_e _f_o_r _P_e_r_s_o_n_a_l _M_i_c_r_o-_C_o_m_p_u_t_e_r _S_y_s_t_e_m_s, which was presented at the First International Symposium on Computer Message Systems in Nottingham, U.K.; and, _D_e_s_i_g_n _o_f _t_h_e _T_T_I _P_r_o_t_o_t_y_p_e _T_r_u_s_t_e_d _M_a_i_l _A_g_e_n_t, which describes a proprietary "trusted" mail system built on _M_H. There are also documents, mostly specific to U.C. Irvine which you may find interesting: _M_H _f_o_r _B_e_g_i_n_n_e_r_s, and _M_H _f_o_r _M_M _U_s_e_r_s. All of these documents exist in the _m_h._6 distribution sent to your site. There's also a document, _C_h_a_n_g_e_s _t_o _t_h_e _R_A_N_D _M_H _M_e_s_s_a_g_e _H_a_n_- _d_l_i_n_g _S_y_s_t_e_m: _M_H._6, which describes user-visible changes made to _M_H since the last major release. [1] UNIX is a trademark of AT&T Bell Laboratories. -iii- -iv- This manual is very large, as it describes a large, powerful system in gruesome detail. The important thing to remember is: _D_O_N'_T _P_A_N_I_C[_2] As explained in the tutorial, you really need to know only 5 commands to handle most of your mail. Very advanced users may wish to consult _T_h_e _R_A_N_D _M_H _M_e_s_s_a_g_e _H_a_n_- _d_l_i_n_g _S_y_s_t_e_m: _A_d_m_i_n_i_s_t_r_a_t_o_r'_s _G_u_i_d_e, which is also present in the _m_h._6 distribution sent to your site. [2] Note the large, _f_r_i_e_n_d_l_y letters. _A_C_K_N_O_W_L_E_D_G_M_E_N_T_S The _M_H system described herein is based on the original RAND _M_H system. It has been extensively developed (perhaps too much so) by Marshall T. Rose and John L. Romine at the University of California, Irvine. Einar A. Stefferud, Jerry N. Sweet, and Terry P. Domae provided numerous suggestions to improve the UCI version of _M_H. Of course, a large number of people have helped _M_H along. The list of ``_M_H immor- tals'' is too long to list here. However, Van Jacobson deserves a spe- cial acknowledgement for his tireless work in improving the performance of _M_H. Some programs have been speeded-up by a factor of 10 or 20. All of users of _M_H, everywhere, owe a special thanks to Van. For this release, numerous _M_H-_W_o_r_k_e_r_s sent in fixes and other changes. A handful of courageous _M_H-_W_o_r_k_e_r_s volunteered to beta-test these changes; their help is particularly appreciated. This manual is based on the original _M_H manual written at RAND by Bruce Borden, Stockton Gaines, and Norman Shapiro. -v- _P_R_E_F_A_C_E This report describes a system for dealing with messages transmit- ted on a computer. Such messages might originate with other users of the same computer or might come from an outside source through a network to which the user's computer is connected. Such computer-based message systems are becoming increasingly widely used, both within and outside the Department of Defense. The message handling system _M_H was developed for two reasons. One was to investigate some research ideas concerning how a message system might take advantage of the architecture of the UNIX time-sharing operating system for Digital Equipment Corporation PDP-11 and VAX com- puters, and the special features of UNIX's command-level interface with the user (the "shell"). The other reason was to provide a better and more adaptable base than that of conventional designs on which to build a command and control message system. The effort has succeeded in both regards, although this report mainly describes the message system itself and how it fits in with UNIX. The present report should be of interest to three groups of readers. First, it is a complete reference manual for the users of _M_H. Second, it should be of interest to those who have a general knowledge of computer-based message systems, both in civilian and military appli- cations. Finally, it should be of interest to those who build large subsystems that interface with users, since it illustrates a new approach to such interfaces. The original _M_H system was developed by Bruce Borden, using an approach suggested by Stockton Gaines and Norman Shapiro. Valuable assistance was provided by Phyllis Kantar in the later stages of the system's implementation. Several colleagues contributed to the ideas included in this system, particularly Robert Anderson and David Crocker. In addition, valuable experience in message systems, and a valuable source of ideas, was available to us in the form of a previous message system for UNIX called MS, designed at RAND by David Crocker. This report was originally prepared as part of the RAND project entitled "Data Automation Research", sponsored by Project AIR FORCE. -vi- _S_U_M_M_A_R_Y Electronic communication of text messages is becoming commonplace. Computer-based message systems-software packages that provide tools for dealing with messages-are used in many contexts. In particular, message systems are becoming increasingly important in command and control and intelligence applications. This report describes a message handling system called _M_H. This system provides the user with tools to compose, send, receive, store, retrieve, forward, and reply to messages. _M_H has been built on the UNIX time-sharing system, a popular operating system developed for the DEC PDP-11 and VAX classes of computers. A complete description of _M_H is given for users of the system. For those who do not intend to use the system, this description gives a gen- eral idea of what a message system is like. The system involves some new ideas about how large subsystems can be constructed. The interesting and unusual features of _M_H include the following: The user command interface to _M_H is the UNIX "shell" (the standard UNIX command interpreter). Each separable component of message handling, such as message composition or message display, is a separate command. Each program is driven from and updates a private user environment, which is stored as a file between program invocations. This private environment also contains information to "custom tailor" _M_H to the individual's tastes. _M_H stores each message as a separate file under UNIX, and it utilizes the tree-structured UNIX file system to organize groups of files within separate directories or "folders". All of the UNIX facilities for dealing with files and directories, such as renam- ing, copying, deleting, cataloging, off-line printing, etc., are appli- cable to messages and directories of messages (folders). Thus, impor- tant capabilities needed in a message system are available in _M_H without the need (often seen in other message systems) for code that duplicates the facilities of the supporting operating system. It also allows users familiar with the shell to use _M_H with minimal effort. -vii- _C_O_N_T_E_N_T_S READ THIS ......................................................... i FOREWORD .......................................................... iii ACKNOWLEDGMENTS ................................................... v PREFACE ........................................................... vi SUMMARY ........................................................... vii Section 1. INTRODUCTION ............................................... 1 2. OVERVIEW ................................................... 4 3. TUTORIAL ................................................... 7 4. DETAILED DESCRIPTION ....................................... 10 THE USER PROFILE ............................................. 10 MESSAGE NAMING ............................................... 13 OTHER MH CONVENTIONS ......................................... 14 MH COMMANDS .................................................. 16 ALI ....................................................... 17 ANNO ...................................................... 19 BBC ....................................................... 21 BBOARDS ................................................... 24 BURST ..................................................... 26 COMP ...................................................... 28 DIST ...................................................... 30 FOLDER .................................................... 33 FORW ...................................................... 37 INC ....................................................... 42 MARK ...................................................... 45 MHL ....................................................... 47 MHMAIL .................................................... 52 MHN ....................................................... 54 MHOOK ..................................................... 70 MHPARAM ................................................... 72 MHPATH .................................................... 74 MSGCHK .................................................... 77 MSH ....................................................... 79 NEXT ...................................................... 83 PACKF ..................................................... 84 PICK ...................................................... 85 PREV ...................................................... 90 PROMPTER .................................................. 91 RCVSTORE .................................................. 94 REFILE .................................................... 96 REPL ...................................................... 98 RMF ....................................................... 102 RMM ....................................................... 104 SCAN ...................................................... 106 SEND ...................................................... 109 SHOW ...................................................... 112 SLOCAL .................................................... 115 SORTM ..................................................... 120 VMH ....................................................... 122 WHATNOW ................................................... 124 WHOM ...................................................... 127 MORE DETAILS ................................................. 129 MH-ALIAS .................................................. 130 MH-FORMAT ................................................. 134 MH-MAIL ................................................... 143 MH-PROFILE ................................................ 147 MH-SEQUENCE ............................................... 155 AP ........................................................ 159 CONFLICT .................................................. 161 DP ........................................................ 163 FMTDUMP ................................................... 165 INSTALL-MH ................................................ 166 POST ...................................................... 167 5. REPORTING PROBLEMS ......................................... 169 6. ADVANCED FEATURES .......................................... 170 USER-DEFINED SEQUENCES ....................................... 170 Pick and User-Defined Sequences ........................... 170 Mark and User-Defined Sequences ........................... 172 Public and Private User-Defined Sequences ................. 172 Sequence Negation ......................................... 172 The Previous Sequence ..................................... 173 The Unseen Sequence ....................................... 173 COMPOSITION OF MAIL .......................................... 174 The Draft Folder .......................................... 174 What Happens if the Draft Exists .......................... 176 The Push Option at What now? Level ........................ 176 Options at What now? Level ................................ 177 Digests ................................................... 178 FOLDER HANDLING .............................................. 179 Relative Folder Addressing ................................ 179 The Folder-Stack .......................................... 180 Appendix A. Command Summary ............................................ 181 B. Message Name BNF ........................................... 185 REFERENCES ........................................................ 186 THE RAND MH MESSAGE HANDLING SYSTEM: USER'S MANUAL UCI Version Marshall T. Rose John L. Romine Based on the original manual by Borden, Gaines, and Shapiro December 14, 1992 6.6 #1[UCI]