mh-profile - user customization for the mmh message handler
Each user of mmh is expected to have a file named $HOME/.mmh/profile in his or her home directory. This file contains a set of user parameters used by some or all of the mmh family of programs. Each entry in the file is of the format
If the text of profile entry is long, you may extend it across several real lines by indenting the continuation lines with leading spaces or tabs.
Standard Profile Entries¶
The possible profile components are exemplified below. The only mandatory entry is `Path:'. The others are optional; some have default values if they are not present. In the notation used below, (profile, default) indicates whether the information is kept in the user's mmh profile or mmh context, and indicates what the default value is.
atr-seq-folder: 172 178-181 212
Mime-Type-Query: file -b --mime
program: default switches
(profile, no defaults)
Alternate-Mailboxes: mh@uci-750a, bug-mh*
Default-From: Philipp Takacs <firstname.lastname@example.org>
Aliasfile: aliases other-alias
Signature: RAND MH System (agent: Marshall Rose)
Process Profile Entries¶
The following profile elements are used whenever an mmh
program invokes some other program such as more. The profile can be
used to select alternate programs if the user wishes. The default values are
given in the examples.
The operation of mmh and its commands it also controlled by the presence of certain environment variables.
Many of these environment variables are used internally by the `What now?' interface. It's amazing all the information that has to get passed via environment variables to make the `What now?' interface look squeaky clean to the mmh user, isn't it? The reason for all this is that the mmh user can select any program as the whatnowproc, including one of the standard shells. As a result, it's not possible to pass information via an argument list. The convention is that environment variables whose names are all upper-case are user-settable; those whose names are lower-case only are used internally by mmh and should not generally be set by the user.
If the WHATNOW option was set during mmh configuration, and if this environment variable is set, then if the commands refile , send or show are not given any `msgs' arguments, then they will default to using the file indicated by mh-draft(7). This is useful for getting the default behavior supplied by the default whatnowproc.
This variable is checked to see if a RFC-2047 header field should be decoded (in inc, scan, mhl). This variable is checked by show to see if the showproc or showmimeproc should be called, since showmimeproc will be called if a text message uses a character set that doesn't match $MM_CHARSET. This variable is checked by show for matches against the charset parameter of text contents to decide it the text content can be displayed without modifications to your terminal. This variable is checked by mhbuild to decide what character set to specify in the charset parameter of text contents containing 8-bit characters.
When decoding text in such an alternate character set, mmh must be able to determine which characters are alphabetic, which are control characters, etc. For many operating systems, this will require enabling the support for locales (such as setting the environment variable $LC_CTYPE to iso_8859_1).
The environment variable $TERMCAP is also consulted. In particular, these tell scan and mhl how many columns wide your terminal is. They also tell mhl how many lines long your terminal screen is.
This is set by comp, dist, forw, and repl to tell the whatnowproc which file to ask `What now?' questions about.
This is set by dist and repl during edit sessions so you can peruse other messages in the current folder besides the one being distributed or replied to.
^$HOME/.mmh~^The user's mmh directory ^or $MMH~^Rather than the standard mmh directory ^$HOME/.mmh/profile~^The user's profile ^or $MMHP~^Rather than the standard profile ^$HOME/.mmh/context~^The user's context ^or $MMHC~^Rather than the standard context ^<folder>/.mh_sequences~^Public sequences for <folder>
The $HOME/.mmh/profile contains only static information, which mmh programs will NOT update. Changes in context are made to the $HOME/.mmh/context file. This includes, but is not limited to: the `Current-Folder' entry and all private sequence information. Public sequence information is kept in each folder in the file determined by the `Mh-Sequences' profile entry (default is .mh_sequences).
The profile may override the path of the context file, by specifying a `Context' entry. As a result, you can actually have more than one set of private sequences by using different context files.
The shell quoting conventions are not available in the 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 mmh programs: conflicting 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 mmh 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 $HOME/bin directory to the mmh program 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 defaults for the mmh command. Similarly, you could create a small shell script which called the mmh program of your choice with an alternate set of invocation line switches (using links and an alternate profile entry is preferable to this solution).
Finally, the csh user could create an alias for the command of the form:
In this way, the user can avoid lengthy type-in to the shell, and still give mmh commands safely. (Recall that some mmh commands invoke others, and that in all cases, the profile is read, meaning that aliases are disregarded beyond an initial command invocation)