MH-PROFILE(5mh)

NAME
mh-profile - user customization for the mmh message handler

DESCRIPTION
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

    Profile-Component: value

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.

Path: Mail
    Sets the user's mail storage to `Mail'. This is the only mandatory profile entry. (profile, no default)

Context: context
    Declares the location of the mmh context file. This is overridden by the environment variable $MMHC. See the HISTORY section below. (profile, default: $HOME/.mmh/context)

Current-Folder: inbox
    Keeps track of the current open folder. (context, default: folder specified by `Inbox')

Inbox: inbox
    Defines the name of your default inbox. (profile, default: inbox)

Previous-Sequence: pseq
    Names the sequence or sequences which should be defined as the `msgs' or `msg' argument given to any mmh command. If not present or empty, no such sequences are defined. Otherwise, for each name given, the sequence is first zero'd and then each message is added to the sequence. Read the mh-sequence(7) man page for the details about this sequence. (profile, no default)

Sequence-Negation: !
    Defines the string which, when prefixed to a sequence name, negates that sequence. Hence, `!foo' means all those messages that are not a member of the sequence `foo'. To deactivate this mechanism, define Sequence-Negation to an empty value. Read the mh-sequence(7) man page for the details. (profile, default: !)

Unseen-Sequence: u
    Names the sequence or sequences which shall contain any unread messages. The commands inc, rcvstore, and show will add or remove messages from these sequences when they are incorporated or read. If defined with an empty value, no such sequences are defined. Otherwise, each message is added to, or removed from, each sequence name given. Read the mh-sequence(7) man page for the details about this sequence. (profile, default: u)

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-seq-folder: 172 178-181 212
    Keeps track of the private sequence called `seq' in the specified folder. Private sequences are generally used for read-only folders. See the mh-sequence(7) man page for details about private sequences. (context, no default)

Editor: vi
    Defines the editor to be used by the commands comp, dist, forw, and repl. This profile entry overrides the $VISUAL and $EDITOR environment variables, but gets overridden by the $MMHEDITOR environment variabel. (profile, default: vi)

Pager: more
    This is the program used by mhl to page the mhl formatted message when displaying to a terminal. It is also the default program used by show to display message bodies (or message parts) of type text/plain. This profile entry overrides the $PAGER environment variable, but gets overridden by the $MMHPAGER environment variable. (profile, default: more)

Sendmail: /usr/sbin/sendmail
    The path name to the sendmail program, used by spost to send mail. (profile, default: /usr/sbin/sendmail)

Attachment-Header: Attach
    The (pseudo) header in draft messages, that contains files to be attached to the message on sending. If you like to type a lot, name it `X-MH-Attachment'. (profile, default: `Attach')

Sign-Header: Sign
    The (pseudo) header in draft messages, that requests the message to be signed automatically by send, using mhsign. If you like to type a lot, name it `X-MH-Sign-This-Message'. (profile, default: `Sign')

Enc-Header: Enc
    The (pseudo) header in draft messages, that requests the message to be signed and encrypted by send, using mhsign. If you like to type a lot, name it `X-MH-Encrypt-This-Message'. (profile, default: `Enc')

Mime-Type-Query: file -b --mime
    A command that prints the MIME type of a given file. The file name is appended to the command line. Note: Older versions of file(1) won't generate the desired output. file-4.26, for instance, omits a required semicolon. file-5.04 is known to work. Alternatively, you can use print-mimetype, which is part of mmh, but guesses MIME types by file name extensions only.

Msg-Protect: 0644
    An octal number which defines the permission bits for new message files. See chmod(1) for an explanation of the octal number. (profile, default: 0600)

Folder-Protect: 0750
    An octal number which defines the permission bits for new folder directories. See chmod(1) for an explanation of the octal number. (profile, default: 0700)

program: default switches
    Sets default switches to be used whenever the mmh program program is invoked. For example, one could override the `Editor:' profile component when replying to messages by adding a component such as:

        repl: -editor /bin/ed

    (profile, no defaults)

lasteditor-next: nexteditor
    Names `nexteditor' to be the default editor after using `lasteditor'. This takes effect at `What now?' prompt in 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 to `What now?', then `nexteditor' is used. (profile, no default)

Folder-Stack: folders
    The contents of the folder-stack for the folder command. (context, no default)

Alternate-Mailboxes: mh@uci-750a, bug-mh*
    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 hostnames listed should be the `official' hostnames for the mailboxes you indicate, as local nicknames 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 matching. (profile, default: your user-id)

Default-From: Philipp Takacs <philipp@bureaucracy.de>
    Tells spost which address to use, if the draft dosn't contain a `From' Header or the draft is not from the user. (profile, no default)

Aliasfile: aliases other-alias
    Indicates aliases files for ali, send. and spost. (profile, no default)

Draft-Folder: drafts
    Changes the default draft folder. Read the mh-draft(7) man page for details. (profile, default: +drafts)

Trash-Folder: trash
    Changes the default folder for removed messages. Read the rmm(1) man page for details. (profile, default: +trash)

digest-issue-list: 1
    Tells forw the last issue of the last volume sent for the digest list. (context, no default)

digest-volume-list: 1
    Tells forw the last volume sent for the digest list. (context, no default)

MailDrop: .mail
    Tells inc your maildrop, if different from the default. This is superseded by the environment variable $MAILDROP. (profile, default: /var/mail/$USER)

Signature: RAND MH System (agent: Marshall Rose)
    Tells send your mail signature. This is superseded by the environment variable $SIGNATURE. If $SIGNATURE is not set and this profile entry is not present, the `gcos' field of the /etc/passwd file will be used. Your signature will be added to the address send puts in the `From:' header; do not include an address in the signature text. (profile, no default)

Metafile-Extention: .meta
    This extions will be used to store meta information about a mail or a draft. Currently only implemented by whatnow2. (profile, no default)

  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.

listproc: show
    This program is used to list the contents of a message in response to the list and display directive at the `What now?' prompt. The absolute pathname of the message to list will be appended to the command line given.

whatnowproc: /usr/bin/mh/whatnow
    This is the program invoked by comp, forw, dist, and repl to query about the disposition of a composed draft message.

  Environment Variables
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.

$MMH
    With this environment variable, you can specify an alternative mmh directory. Personal mmh configuration files are located relative to the mmh directory. Non-absolute values are relative to the home directory. This is one of the very few exceptions in mmh where non-absolute pathnames are not considered relative to the user's mmh directory.

$MMHP
    With this environment variable, you can specify a profile other than $HOME/.mmh/profile to be read by the mmh programs that you invoke. If the value of $MMHP is not absolute, it will be presumed to start from the mmh directory.

$MMHC
    With this environment variable, you can specify a context other than the normal context file (as specified in the profile). As always, unless the value of $MMHC is absolute, it will be presumed to start from your mmh directory.

$MM_CHARSET
    With this environment variable, you can specify the native character set you are using. You must be able to display this character set on your terminal.

    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).

$MAILDROP
    This variable tells inc the default maildrop. This supersedes the `MailDrop' profile entry.

$SIGNATURE
    This variable tells send and post your mail signature. This supersedes the `Signature' profile entry.

$HOME
    This variable tells all mmh programs your home directory

$SHELL
    This variable tells bbl the default shell to run

$MMHEDITOR
$VISUAL
$EDITOR
    These variables (in descending priority) define the default editor to use.

$MMHPAGER
$PAGER
    These variables (in descending priority) define the default pager to use.

$TERM
    This variable tells mmh your terminal type.

    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.

$mhdraft
    This is the path to the working draft.

    This is set by comp, dist, forw, and repl to tell the whatnowproc which file to ask `What now?' questions about.

$mhaltmsg
    dist and repl set $mhaltmsg to tell the whatnowproc about an alternate message associated with the draft (the message being distributed or replied to). It is also set during edit sessions so you can peruse the message being distributed or replied to. This variable replaces the older $editalt variable. There used to be a link named `@' in the working directory, pointing to the alternate message, there is no such link anymore.

$mhdist
    dist sets $mhdist to tell the whatnowproc that message re-distribution is occurring.

$mheditor
    This is set by comp, repl, forw, and dist to tell the whatnowproc the user's choice of editor (unless overridden by -noedit).

$mhuse
    This may be set by comp.

$mhmessages
    This is set by dist, forw, and repl if annotations are to occur.

$mhannotate
    This is set by dist, forw, and repl if annotations are to occur.

$mhfolder
    This is the folder containing the alternate message.

    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.

FILES
^$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>

SEE ALSO
nmh(1), environ(5), mh-sequence(7)

HISTORY
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.

BUGS
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:

    alias cmd 'cmd arg1 arg2 ...'

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)