4.3BSD-UWisc/man/catl/mh-profile.l




MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



NAME
      .mh_profile - user customization for MH message system

SYNOPSIS
     any _M_H command
9     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 pro-
     grams.  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, (profile, default) indicates whether the infor-
     mation 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:
               <mh-dir>/context)

     Current-Folder: inbox
               Keeps track of the current open folder.  (context,
               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)

     Unseen-Sequence: unseen
               Names the sequences which should be defined as
               those messages 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



Printed 1/10/87                MH                               1


9


MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



               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.  (pro-
               file, 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.  (profile, default: 0644)

     Folder-Protect: 711
               Defines protection bits for folder directories.
               (profile, 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 "nexteditor".  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)

     Folder-Stack: _f_o_l_d_e_r_s



Printed 1/10/87                MH                               2






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



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

     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 super-
               ceded by the $SIGNATURE envariable.  On hosts
               where _M_H was configured with the UCI option, if
               $SIGNATURE is not set and this profile entry is
               not present, the file $HOME/.signature is con-
               sulted.  (profile, no default)




Printed 1/10/87                MH                               3






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



     The following profile elements are used whenever an _M_H pro-
     gram 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/misc/mh/refile
          incproc:      /usr/misc/mh/inc
          installproc:  /usr/misc/mh/lib/install-mh
          lproc:        /usr/ucb/more
          mailproc:     /usr/misc/mh/mhmail
          mhlproc:      /usr/misc/mh/lib/mhl
          moreproc:     /usr/ucb/more
          mshproc:      /usr/misc/mh/msh
          packproc:     /usr/misc/mh/packf
          postproc:     /usr/misc/mh/lib/post
          rmmproc:      none
          rmfproc:      /usr/misc/mh/rmf
          sendproc:     /usr/misc/mh/send
          showproc:     /usr/ucb/more
          whatnowproc:  /usr/misc/mh/whatnow
          whomproc:     /usr/misc/mh/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 con-
     sidered 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 particu-
          lar, these tells _s_c_a_n and _m_h_l how to clear your termi-
          nal, and how many columns wide your terminal is.  They



Printed 1/10/87                MH                               4






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



          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 message 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 message being distri-
          buted 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 occurring.
          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 information 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



Printed 1/10/87                MH                               5






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



          from the current working directory.

     $MHFD :
          If the OVERHEAD option was set during _M_H configuration
          (type `-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 pro-
          grams 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 com-
          pletely safe and does result in some performance
          enhancements.


FILES
     $HOME/.mh_profile                  The user profile
     or $MH                             Rather than the standard profile
     <mh-dir>/context                   The user context
     or $CONTEXT                        Rather than the standard context
     <folder>/.mh_sequences             Public sequences for <folder>

PROFILE COMPONENTS
     All

SEE ALSO
     mh(1), environ(5)

DEFAULTS
     None

CONTEXT
     All

HISTORY
     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



Printed 1/10/87                MH                               6






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



     users MH _d_i_r_e_c_t_o_r_y.  This includes, but is not limited to:
     the "Current-Folder" entry and all private sequence informa-
     tion.  Public sequence information 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 format 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 systems 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 interpreted relative to the user's _M_H direc-
     tory.  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
     .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 pro-
     grams: 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 _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 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 _M_H command.  Similarly, you could create a small
     shell script which called the _M_H program of your choice with
     an alternate set of invocation line switches (using links
     and an alternate profile entry is preferable to this solu-
     tion).

     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



Printed 1/10/87                MH                               7






MH-PROFILE(5)       UNIX Programmer's Manual        MH-PROFILE(5)



     shell, and still give _M_H commands safely.  (Recall that some
     _M_H commands invoke others, and that in all cases, the pro-
     file is read, meaning that aliases are disregarded beyond an
     initial command invocation)



















































Printed 1/10/87                MH                               8