Content-type: text/html Man page of mh_profile

mh_profile

Section: Devices and Network Interfaces (4)
Index Return to Main Contents
 

NAME

mh_profile - User customization file for the MH message system  

DESCRIPTION

Each user of MH is expected to have a file named .mh_profile in his or her home directory. This file contains a set of static user parameters used by some or all programs in the the MH family. Each line of the file is in the following format:

profile-component: value

In addition, MH keeps information about changes in context (for example, the current folder and message) in the context file, which is normally located in the user's Mail directory. MH also consults a number of environment variables. Both the context file entries and these environment variables are described in this reference page.  

Profile File Entries

The possible profile components are described in the following list. Only Path is mandatory. The others are optional; some have default values if they are not present. In the notation used below, the default value is given in parentheses ( ) at the end of each entry.

When giving path names, mh-dir is used to indicate the user's Mail directory. This is the directory given by the Path entry in the user's profile, and is set up initially by MH to be $HOME/Mail. Locates MH transactions in the named directory. If the directory path name is not absolute (does not begin with a / ), it is assumed to begin in the user's home directory. When you first use MH, it creates a directory called Mail in your home directory, and adds the appropriate entry to the .mh_profile.

(no default)
Declares the location of the MH context file.
(default: mh-dir/context) 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 zeroed and then each message is added to the sequence.
(no default) Defines the string which, when prefixed to a sequence name, negates that sequence. Hence, the argument notseen means all those messages that are not a member of the sequence seen.
(no default) Names the sequences which should be defined as those messages recently incorporated by inc. The show command removes messages from this sequence once it thinks they have been seen. If not present, or empty, no sequences are defined. Otherwise, for each name given, the sequence is first zeroed and then each message is added to the sequence.
(no default) 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.
(default: .mh_sequences) Defines the editor to be used by the comp, dist, forw, and repl commands.
(default: prompter)
Defines octal protection bits for message files. See chmod(1) for an explanation of the octal number.
(default: 0600) Defines protection bits for folder directories. See chmod(1) for an explanation of the octal number.
(default: 0700) Sets the options to be used whenever an MH command is invoked. You should set up only command options, not command arguments, in your profile. Options correspond to settings made through command line flags, which are usually preceded by a dash - in the SYNOPSIS for the command. You can override any options set up in your .mh_profile by using a flag on the command line. For example, you can override the Editor profile component when replying to messages by entering the following command:
% repl -editor /bin/ed
(no default) Defines the alias file to be used by MH commands that take the -alias flag. The named file must be in the correct format; see mh-alias(4).
(no default) Names nexteditor to be the default editor after using lasteditor. This takes effect at the What now? level when using comp, dist, forw, and repl. After editing the draft with lasteditor, the default editor is set to be nexteditor. If the user types edit without any arguments at the What now? prompt, then nexteditor is used.
(no default) If present, tells inc to compose an Emacs audit file in addition to other tasks performed by the command.
(no default) Tells repl and scan which addresses are really yours. In this way, repl knows which addresses should be included in the reply, and scan knows if the message really originated from you. Addresses must be separated by a comma, and the host names listed should be the official host names for the mailboxes you indicate, as local nicknames for hosts are not replaced by their official site names. If a host is not given for an address, 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 matching.
(default: your user-id) Specifies the name of the draft folder. This is used by comp, dist, forw, and repl to construct draft messages in, and to store unsent draft messages. A draft folder allows you to have more than one unsent draft at a time. The draft folder is conventionally called +drafts.
(no default) Tells inc your maildrop, if itdifferent from the default. This is superseded by the $MAILDROP environment variable.
(default: /usr/spool/mail/$USER) Tells send your mail signature. This is superseded by the $SIGNATURE environment variable. The signature must be enclosed in double quotes (" ").
(no default) Tells send the mail interchange codeset. The send program can convert a message from the user application codeset used for local message display to the codeset used for mail interchange. For more information on codeset conversion, see the section on internationalization features in the mh(1) reference page.
(no default) Provides a default locale when the LANG or LC_ALL environment variable is not defined. One field in this locale name indicates the user application codeset, which is used for codeset conversion of mail messages. For more information on codeset conversion, see the section on internationalization features in the mh(1) reference page.
(no default)

The profile elements in the following example are used whenever an MH program invokes some other program, such as more. The example shows the programs used by default. You can specify alternative programs if you want.

fileproc: /usr/bin/mh/refile incproc: /usr/bin/mh/inc installproc: /usr/lib/mh/install-mh lproc: /usr/ucb/more mailproc: /usr/bin/mh/mhmail mhlproc: /usr/lib/mh/mhl moreproc: /usr/ucb/more mshproc: /usr/bin/mh/msh packproc: /usr/bin/mh/packf postproc: /usr/lib/mh/post rmmproc: none rmfproc: /usr/bin/mh/rmf sendproc: /usr/bin/mh/send showproc: /usr/ucb/more whatnowproc: /usr/bin/mh/whatnow whomproc: /usr/bin/mh/whom  

Context File Entries

Changes in context are made to the context file kept in the user's Mail directory. This includes, but is not limited to, the Current-Folder entry, and all private sequence information. Information kept in the context file is updated by MH programs as they are used; the .mh_profile contains only static information, which MH programs do not update.

The .mh_profile may override the path of the context file by specifying a context entry (this must be in lowercase). If the entry is not absolute (does not start with /), then it is interpreted relative to the user's Mail directory.

Private sequence information is kept in the context file. Public sequence information is kept in a file called .mh_sequences in each folder.

The context file may contain the following components: Keeps track of the current open folder.

(default: +inbox) Keeps track of the private sequence called seq in the specified folder.
(no default) Specifies the contents of the folder-stack for the folder command.
(no default) Tells forw the last issue of the last volume sent for the digest list.
(no default) Tells forw the last volume sent for the digest list.
(no default)
 

Environment Variables

In addition to the .mh_profile and context files, MH programs consult a number of environment variables.

If you define the environment variable $MH, you can specify a profile other than .mh_profile to be read by the MH programs that you invoke. If the value of $MH is not absolute, (that is, does not begin with /), it will be presumed to start from the current working directory. This is one of the very few exceptions in MH where non-absolute pathnames are not considered relative to the user's Mail directory.

Similarly, if you define the environment variable $MHCONTEXT, you can specify a context other than the normal context file (as specified in .mh_profile). Unless the value of $MHCONTEXT is absolute, it will be presumed to start from your Mail directory.

MH programs also consult the following environment variables: Tells inc the default maildrop. This supersedes the Maildrop profile entry. Tells send and post your mail signature. This supersedes the Signature profile entry. Tells all MH programs your home directory. Tells MH your terminal type. The $TERMCAP environment variable is also consulted. In particular, these two environment variables tell scan and mhl how to clear your terminal and how many columns wide your terminal is. These variables also tell mhl how many lines long your terminal screen is.

The following environment variables are set by MH programs for the whatnowproc program: The alternative message. Set by dist and repl during edit sessions so you can view the message being distributed or replied to. The message is also available through a link called @ in the current directory, as long as your current working directory has write permission. If your current working directory and the folder containing the message are on the same file system, this link is a hard link; otherwise, it is a symbolic link. The path to the working draft. Set by comp, dist, forw, and repl to tell the whatnowproc program which file to ask What now? questions about. In addition, dist, forw, and repl set $mhfolder, if appropriate. Set by dist and repl to tell the whatnowproc program about an alternative message associated with the draft (the message being distributed or replied to). Set by dist to tell the whatnowproc program that message redistribution is occurring. Set to tell the whatnowproc program your choice of editor (unless overridden by -noedit). May be set by comp. Set by dist, forw, and repl if annotations are to occur. The reason for setting these variables is so the MH user can select any application, including one of the standard shells, as the whatnowproc program. As a result, it is not possible to pass information by using an argument list. Specifies the folder containing the alternate message. Set by dist and repl during edit sessions so you can view other messages in the current folder, not just the one being distributed or replied to. The $mhfolder environment variable is also set by show, prev, and next for use by mhl.  

RESTRICTIONS

The shell quoting conventions are not available in .mh_profile. Use white space to separate each token.

It is recommended that you set up in your .mh_profile only those values that are associated with command line flags. Do not include values, such as file names, folders, and message sequences when these are independent command line arguments. In the following example, +project is an independent argument (that should not be set up in your .mh_profile) and +drafts is an argument associated with a flag (that can be set up in your .mh_profile):

% forw 3 +project -draftfolder +drafts

When conflicting options are given to MH commands, the option specified on the command line supersedes the one specified in .mh_profile. Therefore, you can always override an option you have set up in your .mh_profile by specifying a related flag on the command line. However, any independent arguments set up in .mh_profile cannot be superseded by using different arguments on the command line.

If you find that an MH program is being invoked again and again with the same arguments (and these are not values associated with flags), you can use one of the following methods to make command entry more efficient: Create a symbolic link in your $HOME/bin directory to the MH 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 MH command. Create a small shell script that calls the MH program of your choice with a particular set of parameters. Using links and an alternate profile entry is preferable to this solution. If you are a csh user, you can create an alias for the command as follows:

alias my_cmd /usr/bin/mh/cmd arg1 arg2 ..
You can then use the alias to avoid typing lengthy commands to the shell and still enter MH commands safely. Remember, however, that some MH commands invoke others, and that in all cases, the profile is read. Aliases are disregarded for commands that are indirectly invoked by the one that you enter.
 

FILES

The user profile The user's context file Public sequences for a particular folder  

RELATED INFORMATION

Commands: chmod(1), mh(1)

Variables: environ(5) delim off


 

Index

NAME
DESCRIPTION
Profile File Entries
Context File Entries
Environment Variables
RESTRICTIONS
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:08 GMT, October 02, 2010