MHOOK(1)		      [mh.6] (MH.6.8)		      MHOOK(1)

     NAME
	  mhook, rcvdist, rcvpack, rcvtty  - MH	receive-mail hooks

     SYNOPSIS
	  /usr/local/lib/mh/rcvdist [-form formfile]
	       [switches for postproc] address ...  [-help]

	  /usr/local/lib/mh/rcvpack file [-help]

	  /usr/local/lib/mh/rcvtty [command] [-form formatfile]
	       [-format	string]	[-bell]	[-nobell] [-newline]
	       [-nonewline] [-biff] [-help]

     DESCRIPTION
	  A receive-mail hook is a program that	is  run	 whenever  you
	  receive  a  mail  message.   You  do	NOT  invoke  the  hook
	  yourself, rather the hook is invoked on your behalf by  your
	  system's   Message  Transport	 Agent.	  See  slocal (1)  for
	  details on  how  to  activate	 receive-mail  hooks  on  your
	  system.

	  Four programs	are currently available	as part	of MH, rcvdist
	  (redistribute	 incoming  messages to additional recipients),
	  rcvpack (save	incoming messages  in  a  packf'd  file),  and
	  rcvtty  (notify  user	 of  incoming  messages).   The	fourth
	  program, rcvstore (1)	is  described  separately.   They  all
	  reside in the	/usr/local/lib/mh/ directory.

	  The rcvdist program will resend a copy of the	message	to all
	  of  the  addresses  listed on	its command line.  It uses the
	  format string	facility described in mh-format	(5).

	  The rcvpack program will append a copy of the	message	to the
	  file	listed	on  its	command	line.  Its use is obsoleted by
	  the file action of slocal.

	  The rcvtty program executes the named	file with the  message
	  as  its  standard  input, and	writes the resulting output on
	  your terminal.

	  If no	file is	specified, or is bogus,	etc., then rcvtty will
	  instead   write   a	one-line  scan	listing.   Either  the
	  `-form formatfile' or	`-format string' option	may be used to
	  override  the	 default output	format (see mh-format (5)).  A
	  newline  is  output  before  the  message  output,  and  the
	  terminal  bell  is  rung after the output.  The `-nonewline'
	  and `-nobell'	options	will inhibit these functions.

	  In addition to the standard  mh-format (5)  escapes,	rcvtty
	  also recognizes the following	additional component escapes:

     Page 1					     (printed 9/30/94)

     MHOOK(1)		      [mh.6] (MH.6.8)		      MHOOK(1)

	  Escape    Returns  Description
	  body	    string   the (compressed) first part of the	body
	  dtimenow  date     the current date
	  folder    string   the name of the current folder

	  Normally,  rcvtty  obeys  write  permission  as  granted  by
	  mesg (1).   With  the	 `-biff'  option, rcvtty will obey the
	  notification	status	set  by	 biff (1)  instead.   If   the
	  terminal  access  daemon (TTYD) is available on your system,
	  then rcvtty will give	its output to the  daemon  for	output
	  instead of writing on	the user's terminal.

     FILES
	  /usr/local/lib/mh/mtstailor	      tailor file
	  $HOME/.maildelivery		      The file controlling local delivery
	  /usr/local/lib/mh/maildelivery      Rather than the standard file

     SEE ALSO
	  rcvstore (1),	mh-format(5), slocal(1)

     BUGS
	  Only two return codes	are meaningful,	others should be.

     Page 2					     (printed 9/30/94)