.mh_profile File

Purpose

Customizes the Message Handler (MH) package.

Description

Each user of the MH package is expected to have a $HOME/.mh_profile file in the home directory. This file contains a set of user parameters used by some or all of the MH programs. Each line of the file has the following format:

Profile-Entry: Value

Profile Entries

This table describes the profile entry options for the .mh_profile file. Only Path: is required. Each profile entry is stored in either the .mh_profile file or the UserMHDirectory/context file.

Table 1. Profile Entry Options for the .mh_profile File
Profile Entry and Description Storage File Default Value
Path:
The path for theUserMHDirectory directory. The usual location is $HOME/Mail.
mh_profile None
context:
The location of the MH context file.
mh_profile UserMHDirectory /context
Current- Folder:
Tracks the current open folder.
context inbox
Previous- Sequence:
The Messages or Message sequences parameter given to the program. For each name given, the sequence is set to 0. Each message is added to the sequence. If not present or empty, no sequences are defined.
mh_profile None
Sequence- Negation:
The string negating a sequence when prefixed to the name of that sequence. For example, if set to not, not seen refers to all the messages that are not a member of the sequence seen.
mh_profile None
Unseen- Sequence:
The sequences defined as messages recently incorporated by the inc command. For each name given, the sequence is set to 0. If not present, or empty, no sequences are defined.
Note: The show command removes messages from this sequence after viewing.
mh_profile None
.mh_sequences:
The file, in each folder, defining public sequences. To disable the use of public sequences, leave the value of this entry blank.
mh_profile .mh_sequences
atr- SequenceFolder:
Tracks the specified sequence in the specified folder.
context None
Editor:
The editor to be used by the comp, dist, forw, and repl commands.
mh_profile prompter
Msg-Protect:
Defines octal protection bits for message files. The chmod command explains the default values.
mh_profile 0644
Folder- Protect:
Defines protection bits for folder directories. The chmod command explains the default values.
mh_profile 0711
Program:
Sets default flags to be used when the MH program specified by the MH program field is started. For example, override the Editor: profile entry when replying to messages by entering: repl: -editor /usr/bin/ed
mh_profile None
LastEditor-next:
The default editor after the editor specified by the Editor: field has been used. This takes effect at the What now? field of the comp, dist, forw, and repl commands. If you enter the editor command without a parameter to the What now? field, the editor specified by the LastEditor-next: field is used.
mh_profile None
Folder-Stack:
The contents of the folder stack of the folder command.
context None
Alternate- Mailboxes:
Indicates your address to the repl and scan commands. The repl command is given the addresses to include in the reply. The scan command is informed the message originated from you. Host names should be the official host names for the mailboxes you indicate. Local nicknames for hosts are not replaced with their official site names. If a host is not given for a particular address, that address on any host is considered to be your current address. Enter an * (asterisk) at either end or both ends of the host mailbox to indicate pattern matching.
Note: Addresses must be separated by a comma.
mh_profile $LOGNAME
Draft-Folder:
Indicates a default draft folder for the comp, dist, forw, and repl commands.
mh_profile None
digest- issue- List:
Indicates to the forw command the last issue of the last volume sent for the digest List.
context None
digest- volume- List:
Indicates to the forw command the last volume sent for the digest List.
context None
MailDrop:
Indicates to the inc command your mail drop, if different from the default. This is superseded by the $MAILDROP environment variable.
mh_profile /usr/mail/$USER
Signature:
Indicates to the send command your mail signature. This is superseded by the $SIGNATURE environment variable.
mh_profile None

Profile Elements

The following profile elements are used whenever an MH program starts another program. You can use the .mh_profile file to select alternate programs.

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

Environment Variables

Variable Description
$MH Specifies a profile for an MH program to read. When you start an MH program, it reads the .mh_profile file by default. Use the $MH environment variable to specify a different profile.

If the file of the $MH environment variable does not begin with a / (slash), it is presumed to start in the current directory. The / indicates the file is absolute.

$MHCONTEXT Specifies a context file that is different from the normal context file specified in the MH profile. If the value of the $MHCONTEXT environment variable is not absolute, it is presumed to start from your MH directory.
$MAILDROP Indicates to the inc command the default mail drop. This supersedes the MailDrop: profile entry.
$SIGNATURE Specifies your mail signature to the send and post commands. This supersedes the Signature: profile entry.
$HOME Specifies your home directory to all MH programs.
$TERM Specifies your terminal type to the MH package. In particular, these environment variables tell the scan and mhl commands how to clear your terminal, and give the width and length of your terminal in columns and lines, respectively.
$editalt Specifies an alternate message. This is set by the dist and repl commands during edit sessions so you can read the distributed message or the answered message. This message is also available through a link called @ (at sign) in the current directory, if your current directory and the message folder are on the same file system.
$mhdraft Specifies the path name of the working draft.
$mhfolder Specifies the folder containing the alternate message. This is set by the dist and repl commands during edit sessions, so you can read other messages in the current folder besides the one being distributed. The $mhfolder environment variable is also set by the show, prev, and next commands for use by the mhl command.

Examples

The following example has the mandatory entry for the Path:field. The option -alias aliases is used when both the send and ali commands are started. The aliases file resides in the mail directory. The message protection is set to 600, which means that only the user has permission to read the message files. The signature is set to Dan Carpenter, and the default editor is vi.

Path:         Mail
send:        -alias aliases
ali:         -alias aliases
Msg-Protect: 600
Signature:    Dan Carpenter
Editor:       /usr/bin/vi

Files

Item Description
$HOME/.mh_profile Contains the user profile.
UserMHDirectory/context Contains the user context file.
Folder/.mh_sequences Contains the public sequences for the folder specified by the Folder variable.