MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

NAME
     mh-profile	-  user	 profile  customization	 for  MH  message
     handler

SYNOPSIS
     .mh_profile

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
     user parameters used by some or all of the	MH family of pro-
     grams.  Each line of the file is of the format

	 profile-component: value

     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 MH profile or	MH  context,  and
     indicates what the	default	value is.

     Path: Mail
	       Locates	MH  transactions  in  directory	  "Mail".
	       (profile, no default)

     context: context
	       Declares	the location of	the MH context file,  see
	       the HISTORY section below.  (profile, default: <mh
	       -dir>/context)

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

     Inbox:    inbox
	       Defines	the  name  of  your   inbox.	(profile,
	       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

[mh.6]		       Last change: MH.6.8			1

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

	       default)

     Unseen-Sequence: unseen
	       Names the sequences which  should  be  defined  as
	       those messages recently incorporated by inc.  Show
	       knows to	remove messages	from this  sequence  once
	       it thinks they have been	seen.  If not present, or
	       empty, no sequences are defined.	 Otherwise,  each
	       message	is  added  to  each  sequence name given.
	       (profile, 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-seq-folder: 172 178-181 212
	       Keeps track of the private sequence called seq  in
	       the specified folder.  (context,	no default)

     Editor: /usr/ucb/ex
	       Defines editor to be used by  comp (1),	dist (1),
	       forw (1),   and	 repl (1).    (profile,	 default:
	       /usr/bin/vi)

     Msg-Protect: 644
	       Defines octal protection	bits for  message  files.
	       See  chmod (1)  for  an	explanation  of	the octal
	       number.	(profile, default: 0644)

     Folder-Protect: 711
	       Defines protection bits	for  folder  directories.
	       (profile, default: 0711)

     program: default switches
	       Sets default switches to	be used	whenever  the  mh
	       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?" level 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)

[mh.6]		       Last change: MH.6.8			2

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

     bboards: system
	       Tells bbc which BBoards	you  are  interested  in.
	       (profile, default: system)

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

     mhe:
	       If present, tells inc to	compose	an MHE	auditfile
	       in  addition  to	 its  other  tasks.  MHE is Brian
	       Reid's Emacs front-end for MH.  An  early  version
	       is supplied with	the mh.6 distribution.	(profile,
	       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)

     Aliasfile:	aliases	other-alias
	       Indicates aliases files for ali,	whom,  and  send.
	       This  may  be  used  instead  of	the `-alias file'
	       switch.	(profile, no default)

     Draft-Folder: drafts
	       Indicates a default draft folder	for  comp,  dist,
	       forw, and repl.	(profile, no default)

     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  superceded	by  the	 MAILDROP
	       envariable.  (profile, default: /var/mail/$USER)

[mh.6]		       Last change: MH.6.8			3

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

     Signature:	RAND MH	System (agent: Marshall	Rose)
	       Tells send your mail signature.	 This  is  super-
	       ceded by	the SIGNATURE envariable.  On hosts where
	       MH was configured with the UCI option,  if  SIGNA-
	       TURE  is	 not  set  and	this profile entry is not
	       present,	the file $HOME/.signature  is  consulted.
	       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)

     The following profile elements are	used whenever an MH  pro-
     gram  invokes some	other program such as more (1).	 The .mh_
     profile can be used to select alternate programs if the user
     wishes.  The default values are given in the examples.

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

     If	you define the envariable 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, (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  MH	where non-absolute pathnames are not con-
     sidered relative to the user's MH directory.

     Similarly,	if you define the envariable MHCONTEXT,	 you  can
     specify  a	 context  other	 than the normal context file (as
     specified in the MH profile).  As always, unless  the  value
     of	 MHCONTEXT is absolute,	it will	be presumed to start from
     your MH directory.

     MH	programs also support other envariables:

     MAILDROP :	tells inc the default maildrop
	  This supercedes the "MailDrop:" profile entry.

[mh.6]		       Last change: MH.6.8			4

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

     SIGNATURE : tells send and	post your mail signature
	  This supercedes the "Signature:" profile entry.

     HOME : tells all MH programs your home directory

     SHELL : tells bbl the default shell to run

     TERM : tells MH your terminal type
	  The TERMCAP envariable is also consulted.  In	 particu-
	  lar,	these  tell scan and mhl how to	clear your termi-
	  nal, and how many columns wide your terminal is.   They
	  also	tell mhl how many lines	long your terminal screen
	  is.

     editalt : the alternate message
	  This is set by dist and repl 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 comp, dist, forw, and repl to	tell  the
	  whatnowproc  which  file  to	ask "What now?"	questions
	  about.  In addition, dist, forw, and repl set	 mhfolder
	  if appropriate.  Further, dist and repl set mhaltmsg to
	  tell the whatnowproc about an	alternate message associ-
	  ated	with  the draft	(the message being distributed or
	  replied to), and dist	sets mhdist  to	 tell  the  what-
	  nowproc  that	 message  re-distribution  is  occurring.
	  Also,	mheditor is  set  to  tell  the	 whatnowproc  the
	  user's  choice  of  editor  (unless  overridden  by  `-
	  noedit').   Similarly,  mhuse	 may  be  set  by   comp.
	  Finally,  mhmessages	is set by dist,	forw, and repl 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 MH user,	isn't it?
	  The reason for all this is that the MH 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.
	  If the WHATNOW option	was set	during	MH  configuration
	  (type	 ` - help'  to an MH command to	find out), and if
	  this envariable is set, if the commands  refile,  send,
	  show,	 or whom 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 whatnowproc.

     mhfolder :	the folder containing the alternate message

[mh.6]		       Last change: MH.6.8			5

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

	  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.   The
	  mhfolder envariable is also set by show, prev, and next
	  for use by mhl.

     MHBBRC :
	  If you define	the envariable MHBBRC, you can specify	a
	  BBoards information file other than .bbrc to be read by
	  bbc.	If the value of	MHBBRC is  not	absolute,  (i.e.,
	  does not begin with a	/ ), it	will be	presumed to start
	  from the current working directory.

     MHFD :
	  If the OVERHEAD option was set during	MH  configuration
	  (type	 ` - help' to an MH command to find out), then if
	  this envariable is set,  MH  considers  it  to  be  the
	  number  of a file descriptor which is	opened,	read-only
	  to the MH profile.  Similarly, if the	envariable MHCON-
	  TEXTFD  is set, this is the number of	a file descriptor
	  which	is opened read-only  to	 the  MH  context.   This
	  feature  of  MH is experimental, and is used to examine
	  possible speed improvements for MH startup.  Note  that
	  these	 envariables  must be set and non-empty	to enable
	  this feature.	 However, if OVERHEAD is  enabled  during
	  MH  configuration,  then when	MH programs call other MH
	  programs, this scheme	is used.  These	file  descriptors
	  are  not closed throughout the execution of the MH pro-
	  gram,	so children may	take  advantage	 of  this.   This
	  approach  is	thought	 to  be	 completely 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),	mh-sequence(5)

DEFAULTS
     None

CONTEXT
     All

[mh.6]		       Last change: MH.6.8			6

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

HISTORY
     In	previous versions of MH, the current-message value  of	a
     writable  folder  was  kept  in  a	 file called "cur" in the
     folder itself.  In	mh.3,  the  .mh	_ profile  contained  the
     current-message  values for all folders, regardless of their
     writability.

     In	all versions of	MH since mh.4, the .mh_	profile	 contains
     only  static information, which MH	programs will NOT update.
     Changes in	context	are made to the	context	file kept in  the
     users  MH	directory.  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
     .mh_sequences in each folder.

     To	convert	from the format	used in	releases of MH	prior  to
     the  format  used	in the mh.4 release, install-mh	should be
     invoked with the `-compat'	switch.	 This  generally  happens
     automatically  on	MH  systems  generated	with the "COMPAT"
     option during MH configuration.

     The .mh_profile may override the path of the  context  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	MH 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	 MH  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 MH 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	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.   Similarly, you could create a small
     shell script which	called the MH program of your choice with

[mh.6]		       Last change: MH.6.8			7

MH-PROFILE(5)	   Headers, Tables, and	Macros	    MH-PROFILE(5)

     an	 alternate  set	 of invocation line switches (using links
     and an alternate profile entry is preferable to  this  solu-
     tion).

     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 MH commands safely.	(Recall	that some
     MH	commands invoke	others,	and that in all	cases,	the  pro-
     file is read, meaning that	aliases	are disregarded	beyond an
     initial command invocation)

[mh.6]		       Last change: MH.6.8			8