From: sources@anomaly.sbs.risc.net
Newsgroups: biz.sco.sources
Subject: v01i104 - ELM v2.3.11, Electronic Mail Reader - Part 04/20
Date: 13 Sep 92 17:38:35 GMT
Reply-To: sources@anomaly.sbs.risc.net
Followup-To: biz.sco.general
Organization: The Rhode Island Internet Systems Cooperative Network


#!/bin/sh
# this is part.04 (part 4 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file doc/Filter.guid continued
#
if test ! -r shar3_seq_.tmp; then
	echo "Please unpack part 1 first!"
	exit 1
fi
(read Scheck
 if test "$Scheck" != 4; then
	echo "Please unpack part $Scheck next!"
	exit 1
 else
	exit 0
 fi
) < shar3_seq_.tmp || exit 1
echo "x - Continuing file doc/Filter.guid"
sed 's/^X//' << 'SHAR_EOF' >> doc/Filter.guid &&
X> \f3echo processing message $message\f1
X> \f3readmsg -h $message | filter -n\f1
X> \f3echo " "\f1
X> \f3@ messages++\f1
X> \f3end\f1
X.in 0
X.fi
Xwhich will then hand each of the messages in your mailbox to the \f2filter\f1
Xprogram and display what action would have been taken with that message and
Xwhy.
X.sp
XFor example, if we do this for a few interesting messages in my mailbox,
Xwe'd end up with output like:
X.ft CW
X.zf
X.nf
X.in .5i
XMail from taylor about filter test
X.ti +\w'Mail 'u
XFORWARDED to hpldat!taylor by rule;
X.ti +\w'Mail   'u
Xsubject="filter test"  ? forward "hpldat!test"
XMail from bradley%hplkab@hplabsc about Re: AI-ED mailing address for HP
X.ti +\w'Mail 'u
XPUT in mailbox: the default action
XMail from taylor about display-to-console
X.ti +\w'Mail 'u
XEXECUTED "cat - > /dev/console"
X.ft 1
X.in 0
X.fi
X(sharp users will notice that this is exactly the same format as the longer
Xsummary listing)
X.ne 5
X.hu What Forwarded Messages Look Like
X.sp
XWhen a message is forwarded to another user by the \f2action\f1 being specified
Xas ``forward \f2address\f1'', then the program can generate one of two styles
Xof message.  If the message is to you, then it'll simply add it to your mailbox
Xin such a way as to ensure that the return address is that of the person who
Xsent the message and so on.
X.sp
XIf not, then the message is enclosed in a message of the form:
X.in \w'If 'u
X.ft CW
X.zf
X.nf
XFrom taylor Thu Oct  2 15:07:04 1986
XDate: Thu, 2 Oct 86 15:06:58 pdt
XSubject: "filter test"
XFrom: The filter of taylor@hpldat <taylor>
XTo: hpldat!taylor
XX-Filtered-By: filter, version 1.4
X-- Begin filtered message --
X
X.in +\w'-- 'u
XFrom taylor Thu Oct  2 15:06:41 1986
XDate: Thu, 2 Oct 86 15:06:33 pdt
XFrom: Dave Taylor <taylor>
XSubject: filter test
XJust a simple test.
X.in -\w'-- 'u
X-- End of filtered message --
X.ft 1
X.in 0
X.fi
XThe subject of the actual message is the same as the subject of the 
Xmessage being forwarded, but in quotes.  The `From:'  field indicates
Xhow the message was sent, and the `X-Filtered-By:' identifies what
Xversion of filter is being used.
X.ne 5
X.hu Areas to Improve
X.sp
XWhile the \f2filter\f1 program as presented herein is obviously a
Xnice addition to the set of tools available for dealing with electronic
Xmail, there are some key features that are missing and will be added in
Xthe future based on demand.
X.sp
XAs I see it, the main things missing are;
X.in .5i
X
X.ti -\n(TWu
X1. The ability to use regular expressions in the patterns.  
XThis would be a \f2very\f1 nice feature!
X
X.ti -\n(TWu
X2. Perhaps more \f2actions\f1 available (but what?)
X
X.ti -\n(TWu
X3. Certainly the ability to filter based on any field or combination of
Xfields.  
X.in 0
X.ne 5
X.hu Warnings and Things to Look Out For
X.sp
XSince this is a pretty simple program, there are a few pitfalls, some
Xof which have already been mentioned;
X.sp
X\f3Order\f1 counts in the rules.  Beware!
X.sp
X\f3Matching\f1 is pretty simple \(em make sure your patterns are sufficiently
Xexclusive before having any destructive rules.
X.sp 2
XFinally, as with the rest of the \f3Elm\f1 mail system, I welcome feedback
Xand suggestion on how to improve this program!!
SHAR_EOF
echo "File doc/Filter.guid is complete" &&
# ============= doc/Form.guide ==============
echo "x - extracting doc/Form.guide (Text)"
sed 's/^X//' << 'SHAR_EOF' > doc/Form.guide &&
X.\" @(#)$Id: Form.guide,v 4.1 90/04/28 22:41:05 syd Exp $
X.\"
X.\"  A guide to using the Elm Forms mode
X.\"  format with:
X.\"	'troff tmac.n - > Forms.format'
X.\"
X.\"  Elm is now in the public trust. Bug reports, comments, suggestions, flames
X.\"  etc. should go to:
X.\"	Syd Weinstein		elm@DSI.COM (dsinc!elm)
X.\"
X.\"  (C) Copyright 1986, 1987 Dave Taylor
X.\"  (C) Copyright 1988, 1989, 1990 Usenet Community Trust
X.\"
X.\"  $Log:	Form.guide,v $
X.\" Revision 4.1  90/04/28  22:41:05  syd
X.\" checkin of Elm 2.3 as of Release PL0
X.\" 
X.\"  
X.po 1i
X.ds h0
X.ds h1
X.ds h2
X.ds f0
X.ds f1
X.ds f2
X.nr Hy 1
X.nr Pt 1
X.nr Pi 0
X.lg 0
X.nf
X.na
X.rs
X.\"  Define the big box macro for troff
X.de eb
X.sp -1	
X.nf
X.ie t \{\
X\h'-.5n'\L'|\\nau-1'\l'\\n(.lu+1n\(ul'\L'-|\\nau+1'\l'|0u-.5n\(ul'
X.\}
X.el \{\
X\h'-.5n'\l'\\n(.lu+1n'
X.\}
X.fi
X..
X.sv |3.0i
X.ce 99
X.ps 20
X.ss 18
X.vs 12
X\f3Elm Forms Mode Guide\f1
X.sp 3
X.ps 12
X.ss 14
X.vs 14
X\f2What Forms Mode is, how to use it to create
Xcustom forms, how to reply to forms, and how to
Xuse it for AT&T Mail messages\f1
X.sp 2
XDave Taylor
X.sp
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp 3
Xemail: taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
X.sp 3
X>>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
X.sp
XSyd Weinstein
XDatacomp Systems, Inc.
X3837 Byron Road
XHuntingdon Valley, PA 19006-2320
X.sp
Xemail: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
X.sp 3
X.ps 18
X\f3\(co\f1\s12 Copyright 1986, 1987 by Dave Taylor
X.ps 18
X\f3\(co\f1\s12 Copyright 1988, 1989, 1990 by The USENET Community Trust
X.ps 10
X.ss 12
X.vs 12
X.fi
X.ad
X.bp 1
X.sv 5v
X.ps 14
X\f3A Guide to Forms Mode in Elm\f1
X.ds h0 "Forms Mode Guide
X.ds h1
X.ds h2 "Version 2.3
X.ds f0 "May 1, 1990
X.ds f1 "Page %
X.sp
X.ps 10
X(Version 2.3)
X.sp 
XDave Taylor
X.sp
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp 
Xemail: taylor\s-1@\s+1hplabs.HP.COM  or  hplabs\s-1!\s+1taylor
X.sp 2
X>>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
X.sp
X.sp
XSyd Weinstein
XDatacomp Systems, Inc.
X3837 Byron Road
XHuntingdon Valley, PA 19006-2320
X.sp
Xemail: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
X.sp
XMay 1, 1990
X.ce 0
X.sp 2
XWhile there are a lot of mail systems that allow the transmission 
Xof text and primitive pictures, to send and reply to more complex
Xforms is simply not possible.  \f3Elm\f1, however, took
Xthe forms mode implemented as part of the AT&T Mail package and has
Xexpanded on it to be a smoothly fit part of the overall mail system.
X.sp
XForms mode gives you the ability to send `template' files to people 
Xand receive the filled-in replies.\s-2\u1\d\s0
X.fn
X\f21. note that this feature assumes that the person on the other end
Xis also using the Elm mail system.\f1
X.ef
XLet's look at an example right off.
X.sp
XSay we were going to use computer mail as a way to file defects with
Xsoftware.  There is a certain amount of information we want to be able
Xto collect when each report is made, and if it is in a specific format
Xwe can use programs to file the defects upon receipt.
X.sp
XThe form we'll try to emulate starts out looking like:
X.\" A manual page break has been done because the 'sd' macro doesn't like
X.\" coming up right after the footer or just doesn't like going to a new
X.\" page by itself.  The bug has been reported.
X.bp
X.ft CW
X.zf
X.sd c
X.mk a
X.sp
X.tl ''Defect Reporting Form''
X.sp
X.tl 'Program:\ \l'2.3i-\w'Program:\ 'u'''Version:\ \l'1.7i-\w'Version:\ 'u''
X.tl 'Operating\ System:\ \l'2.3i-\w'Operating\ System:\ 'u'''Version:\ \l'1.7i-\w'Version:\ 'u''
X.sp
X.tl 'Defect\ Type:\ \l'2.3i-\w'Defect\ Type:\ 'u'''
X.sp
X.tl 'Date\ Found:\ \l'2.3i-\w'Date\ Found:\ 'u'''By\ Whom:\ \l'2.3i-\w'By\ Whom:\ 'u'\h'.2i''
X.tl 'Date\ Reported:\ \l'2.3i-\w'Date\ Reported:\ 'u'''Phone:\ \l'2.3i-\w'Phone:\ 'u'\h'.2i''
X.sp
X.tl 'Description:\ \l'6.4i-\w'Description:\ 'u''
X.tl '\l'6.4i''
X.tl '\l'6.4i''
X.sp
X.eb
X.ed
X.ft 1
X.sp
XThis form can actually be created almost exactly as listed above in 
Xthe \f3Elm\f1 mail system by using your standard editor and can then
Xbe mailed about as needed.
X.sp
XLet's say that we want a bit more information, however, especially with 
Xfields like ``Defect Type'', we want to list all the recommended answers.
XTo create the actual form, we need merely to replace the underlines in
Xthe above form with spaces.  The multi-line comments can simply be 
Xindicated by a `:' by itself on a line;
X
X.ft CW
X.zf
X.sd c
X.mk a
X.sp
X.tl ''Defect Reporting Form''
X.sp
X.tl 'Program:''Version:\h'1.7i-\w'Version:'u''
X.tl 'Operating System:''Version:\h'1.7i-\w'Version:'u''
X.sp
X.tl '(Valid Defect Types are: user-error, doc-error, fatal, other)'
X.tl 'Defect Type:''
X.sp
X.tl 'Date Found:''By\ Whom:\h'2.3i-\w'By\ Whom:'u''
X.tl 'Date Reported:''Phone:\h'2.3i-\w'Phone:'u''
X.sp
X.tl 'Description'
X.tl ':'
X.sp
XThank you for filling in this form.
X.sp 2
X.eb
X.ed
X.ft 1
X.sp
XAs we can see, it is quite simple to create forms!!  
X.sp 2
XNow that we have an idea what we're talking about, let's actually officially
Xdefine the system...
X.br
X.ne 5
X.hu Forms Mode Specification
X
X[Note that this is all taken from the document \f2Standard for Exchanging
XForms on AT&T Mail\f1, Version 1.9 of 6/7/86, from AT&T]
X.sp
XThe forms mode is really quite simple.  Simple enough that it is amazing
Xthat it hadn't been implemented before AT&T Mail came along!!
X.sp
XIn a nutshell, each field is delimited by a `:' followed by a number of
Xblank spaces or tabs that represent the valid size for that field.  That
Xis, if we have a line in the form like;
X.nf
X.ti .5i
X``Phone (area-code):\0\0\0\0\0Number:\0\0\0\0\0\0\0\0\0\0'' 
X.fi
XThe area-code field will be limited to three characters and the number to nine.
X(this is kind of hard to see with the proportionally spaced formatted copy,
Xalas).
XThe only exception to the rule is that a `:' by itself on a line represents
Xa field that is as large as the user entering the data desires.
X
XThe actual form that is transmitted, in AT&T Mail parlance, is a ``SIMPLE''
Xforms handler message (as opposed to the ``ADVANCED'' handler).  This means
Xthat it contains three sections;
X.br
X.ne 8
X.nf
X.in .5i
X.ft 2
XThe Message Header
X.ft CW
X.zf
X[\&OPTIONS-SECTION]
X***
X[\&FORMS-IMAGE]
X***
X[\&RULES-SECTION]\f1
X.in 0
X.fi
X\f3Elm\f1 generates form messages with the ``options'' section filled out,
Xbut ignores it when receiving mail.  The filled out section is:
X.ft CW
X.zf
X.nf
X.in .5i
XWIDTH=80
XTYPE=SIMPLE
XOUTPUT=TEXT\f1
X.in 0
X.fi
XThe FORMS-IMAGE section is that described above.  The RULES-SECTION can
Xcontain explicit rules about the possible values of each field, but 
Xthis is currently ignored by \f3Elm\f1, being a ``SIMPLE'' forms mode
Xmail system.
X.sp
XForms also have the header ``Content-Type: mailform'' to indicate to the
Xmail system (either \f3Elm\f1 or AT&T Mail) that a form is being sent.
X.sp
X\f3Elm\f1 further indicates that a form has been received by having an
X``F'' as the status character in the header display section (instead of
X``N'' for new, etc).
X.br
X.ne 5
X.hu Composing and Sending a Form
X
XThe first step to enable sending forms is to change the setting of
Xthe variable \f2forms\f1 in your \f2.elm/elmrc\f1 file to ``ON''.  E.g.:
X.nf
X.ti .5i
Xforms = ON
X.fi
XThe next step is to send the message to someone using the `m' (\f2mail\f1)
Xcommand.  This then will drop you into an editor.  Type in the form as
Xindicated above, with appropriate colons and comments, and end the entry
Xby leaving the editor.
X.sp
XThe prompt is now;
X.nf
X.ft CW
X.zf
X.tl ''Choose: E)dit msg, edit H)eaders, M)ake form, S)end or F)orget : @''
X.ft 1
X.fi
Xso we choose `m' \(em \f2Make form\f1.  The program then will either
Xrewrite the prompt without the M)ake form option, indicating that
Xthe form has been accepted, or will indicate the problem and give you
Xa chance to correct it.
X.sp
XOnce it has been accepted, simple use the `s' \(em \f2send message\f1 -
Xcommand and it's off!
X.sp 
X\f2Note that you cannot reply to a message with a Form.\f1
X.br
X.ne 6
X.hu Replying to a Form
X
XLet's reply to the form message we generated now.  The header page of the
X\f3Elm\f1 mail system will indicate that the message is a form by having
Xan `F' next to it.  So we use `r' to reply and the screen is immediately
Xcleared and we're prompted, field by field, for the data requested.
XEach field has underscores in the input area to indicate the size field that
Xis expected.
X.sp
XAfter answering all the questions we'll have a screen that looks like;
X
X.ft CW
X.zf
X.sd c
X.mk a
X.sp
X.tl ''Defect Reporting Form''
X.sp
X Program:  \f3The Elm Mail System\f1\l'3i-\w'\f3The Elm Mail System'u'
X Version:  \f31.5\f1\l'3i-\w'\f31.5'u'
X Operating System:  \f3HP-UX\f1\l'3i-\w'\f3HP-UX'u'
X Version:  \f35.141 C\f1\l'3i-\w'\f35.141 C'u'
X.sp
X (Valid Defect Types are: user-error, doc-error, fatal, other)
X Defect Type:  \f3fatal\f1\l'5i-\w'\f3fatal\f1'u'
X.sp
X Date Found:  \f310/9/86\f1\l'3i-\w'\f310/9/86\f1'u'
X By Whom:  \f3Dave Taylor\f1\l'3i-\w'\f3Dave Taylor\f1'u'
X Date Reported:  \f310/9/86\f1\l'3i-\w'\f310/9/86\f1'u'
X Phone:  \f3(415) 857-6887\f1\l'3i-\w'\f3(415) 857-6887\f1'u'
X.sp
X Description
X (Enter as many lines as needed, ending with a `.' by itself on a line)
X   \f3When running it on a CPM system I cannot compile successfully.\f1
X   \f3.\f1
X Thank you for filling in this form.
X.tl ''Choose: E)dit form, edit H)eaders, S)end or F)orget : @''
X.sp 
X.eb
X.ed
X.ft 1
X.sp
XQuite simple.  Notice, however, that the order of prompting is left to
Xright on each line, so the fields that on the form are placed in what
Xseems like a logical place, ``By Whom:'' and ``Phone:'' turn out to be
Xconfusing when filling in the actual form since it isn't clear what
X``Phone:'' is being asked for because of the intervention of the
X``Date Reported:'' field.
X.sp 
XThe message that will actually be sent out from this will have the
Xfields in a more acceptable format;
X.\" Force page break, as there seems to be a bug in the .sd macro
X.bp
X.\"
X.ft CW
X.zf
X.mk a
X.sp
X WIDTH=80
X TYPE=SIMPLE
X OUTPUT=TEXT
X ***
X.tl ''Defect Reporting Form''
X.sp
X.tl ' Program: The Elm Mail System''Version: 1.5\h'1.5i-\w'Version: 1.5'u''
X.tl ' Operating System: HP-UX''Version: 5.141 C\h'1.5i-\w'Version: 5.141 C'u''
X.sp
X.tl ' (Valid Defect Types are: user-error, doc-error, fatal, other)'
X.tl ' Defect Type: fatal''
X.sp
X.tl ' Date Found: 10/9/86''By Whom: Dave Taylor\h'2.3i-\w'By Whom: Dave Taylor'u''
X.tl ' Date Reported: 10/9/86''Phone: (415) 857-6887\h'2.3i-\w'Phone: (415) 857-6887'u''
X.sp
X.tl ' Description'
X.sp
X    When running it on a CPM system I cannot compile successfully.
X.sp 
X.tl ' Thank you for filling in this form.'
X ***
X.sp
X.eb
X.ft 1
X
X.hu Comments on Forms Mode
X
XAs was said at the beginning, this way of sending about forms could
Xprove to be very helpful and useful in a variety of contexts.  On the
Xother hand, until a more sophisticated forms language is used for the
Xforms, this should be sufficient to embody the power of the idea.
X.sp
XI welcome any comments and thoughts on this system and also welcome
Xpossible enhancements.
X.sp
XI also gratefully thank Dale DeJager of AT&T Information Systems 
Xfor sending me more
Xinformation on AT&T Mail than I could possibly digest in any finite
Xamount of time.
SHAR_EOF
# ============= doc/Makefile.SH ==============
echo "x - extracting doc/Makefile.SH (Text)"
sed 's/^X//' << 'SHAR_EOF' > doc/Makefile.SH &&
Xcase $CONFIG in
X'')
X    if test ! -f config.sh; then
X	ln ../config.sh . || \
X	ln ../../config.sh . || \
X	ln ../../../config.sh . || \
X	(echo "Can't find config.sh."; exit 1)
X    fi
X    . ./config.sh
X    ;;
Xesac
Xcase "$0" in
X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
Xesac
X
Xecho "Extracting doc/Makefile (with variable substitutions)"
Xcat >Makefile <<!GROK!THIS!
X#
X# $Id: Makefile.SH,v 4.1.1.1 90/10/24 15:42:13 syd Exp $
X#
X#  Makefile for the documentation of the ELM mail system
X#
X#         (C) Copyright 1989, 1990, USENET Community Trust
X#
X#  $Log:	Makefile.SH,v $
X# Revision 4.1.1.1  90/10/24  15:42:13  syd
X# Add uninstall target
X# From: Rusty Haddock
X# 
X# Revision 4.1  90/04/28  22:41:07  syd
X# checkin of Elm 2.3 as of Release PL0
X# 
X#
X# Variables
X#	Variables established by Configure
XCHMOD		=	$chmod
XCP		=	$cp
XDEST		=	$bin
XECHO		=	$echo
XFORMATTER	=	$roff
XLIB		=	$lib
XLN		=	$ln
XMAN		=	$mansrc
XMANEXT		=	$manext
XRM		= 	$rm -f
XTBL       	=	$tbl
X!GROK!THIS!
X
Xcat >>Makefile <<'!NO!SUBS!'
X
X#	Other variables
XSHELL		=	/bin/sh
X
X# List of installed man pages (except for wnemail.1 - handled differently)
XMAN_LIST		=	$(MAN)/answer.$(MANEXT)		\
X				$(MAN)/autoreply.$(MANEXT)	\
X				$(MAN)/checkalias.$(MANEXT)	\
X				$(MAN)/elm.$(MANEXT)		\
X				$(MAN)/fastmail.$(MANEXT)	\
X				$(MAN)/filter.$(MANEXT)		\
X				$(MAN)/frm.$(MANEXT)		\
X				$(MAN)/listalias.$(MANEXT)	\
X				$(MAN)/messages.$(MANEXT)	\
X				$(MAN)/newalias.$(MANEXT)	\
X				$(MAN)/newmail.$(MANEXT)	\
X				$(MAN)/printmail.$(MANEXT)	\
X				$(MAN)/readmsg.$(MANEXT)
X
X# List of remotely installed man pages (except for wnemail.1 - handled
X# differently)
XREMOTE_MAN_LIST		=	$(REMOTE)$(MAN)/answer.$(MANEXT)	\
X				$(REMOTE)$(MAN)/autoreply.$(MANEXT)	\
X				$(REMOTE)$(MAN)/checkalias.$(MANEXT)	\
X				$(REMOTE)$(MAN)/elm.$(MANEXT)		\
X				$(REMOTE)$(MAN)/fastmail.$(MANEXT)	\
X				$(REMOTE)$(MAN)/filter.$(MANEXT)	\
X				$(REMOTE)$(MAN)/frm.$(MANEXT)		\
X				$(REMOTE)$(MAN)/listalias.$(MANEXT)	\
X				$(REMOTE)$(MAN)/messages.$(MANEXT)	\
X				$(REMOTE)$(MAN)/newalias.$(MANEXT)	\
X				$(REMOTE)$(MAN)/newmail.$(MANEXT)	\
X				$(REMOTE)$(MAN)/printmail.$(MANEXT)	\
X				$(REMOTE)$(MAN)/readmsg.$(MANEXT)
X
X# List of files installed in LIB directory
XLIB_LIST		=	$(LIB)/elm-help.0	\
X				$(LIB)/elm-help.1	\
X				$(LIB)/elm-help.2	\
X				$(LIB)/elm-help.3	\
X				$(LIB)/elmrc-info
X
X# List of files installed in remote LIB directory
XREMOTE_LIB_LIST		=	$(REMOTE)$(LIB)/elm-help.0	\
X				$(REMOTE)$(LIB)/elm-help.1	\
X				$(REMOTE)$(LIB)/elm-help.2	\
X				$(REMOTE)$(LIB)/elm-help.3	\
X				$(REMOTE)$(LIB)/elmrc-info
X
X# List of formatted guides
XFORMATTED_LIST		=	Alias.fmtd	\
X				Config.fmtd 	\
X				Cover.fmtd	\
X				Filter.fmtd	\
X				Form.fmtd	\
X				Ref.fmtd	\
X				Users.fmtd
X
X# Targets
X#	The following are no-ops
Xall:
Xlint:
Xclean:	
X
Xinstall:	$(LIB_LIST) $(MAN_LIST) $(MAN)/wnewmail.$(MANEXT)
X
Xuninstall:
X		$(RM) $(LIB_LIST) $(MAN_LIST) $(MAN)/wnewmail.$(MANEXT)
X
X#	Dependencies and rules for installing man pages and lib files
X#	taken from a remote system
X#	This is the only target that gets installed even if not out-of-date
X#	with respect the files from which it is installed.
Xrmt-install:	rmt-defined
X		$(RM) $(MAN)/newmail.$(MANEXT) $(MAN)/wnewmail.$(MANEXT)
X		$(CP) $(REMOTE_MAN_LIST) $(MAN)
X		$(CHMOD) u+w,a+r $(MAN_LIST)
X		$(LN) $(MAN)/newmail.$(MANEXT) $(MAN)/wnewmail.$(MANEXT)
X		$(CP) $(REMOTE_LIB_LIST) $(LIB)
X		$(CHMOD) u+w,a+r $(LIB_LIST)
X
Xrmt-defined:
X	@(if [ "$(REMOTE)" = "" ];\
X	  then\
X	    $(ECHO) "You need to define 'REMOTE' as the remote file system";\
X	    $(ECHO) "for this particular command. The easiest way to do this";\
X	    $(ECHO) "to type:";\
X	    $(ECHO) "        make REMOTE=<remote file system> rmt-install";\
X	    exit 1;\
X	  fi);
X
X#	Dependencies and rules for installing man pages and lib files
X$(MAN)/answer.$(MANEXT):	answer.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/autoreply.$(MANEXT):	autoreply.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/checkalias.$(MANEXT):	chkalias.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/elm.$(MANEXT):		elm.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/fastmail.$(MANEXT):	fastmail.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/filter.$(MANEXT):	filter.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/frm.$(MANEXT):		frm.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/listalias.$(MANEXT):	listalias.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/messages.$(MANEXT):	messages.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/newalias.$(MANEXT):	newalias.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/newmail.$(MANEXT):	newmail.1
X				$(RM) $@
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/printmail.$(MANEXT):	printmail.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/readmsg.$(MANEXT):	readmsg.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(MAN)/wnewmail.$(MANEXT):	$(MAN)/newmail.$(MANEXT)
X				$(RM) $@
X				$(LN) $? $@
X
X$(LIB)/elm-help.0:		elm-help.0
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(LIB)/elm-help.1:		elm-help.1
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(LIB)/elm-help.2:		elm-help.2
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(LIB)/elm-help.3:		elm-help.3
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X$(LIB)/elmrc-info:		elmrc-info
X				$(CP) $? $@
X				$(CHMOD) u+w,a+r $@
X
X#	Dependencies and rules for formatting guides
Xdocumentation:	$(FORMATTED_LIST)
X
XAlias.fmtd:	Alias.guide
X		$(TBL) $? | $(FORMATTER) tmac.n - > $@
X
XConfig.fmtd:	Config.guid
X		$(TBL) $? | $(FORMATTER) tmac.n - > $@
X
XCover.fmtd:	Elm.cover
X		$(FORMATTER) tmac.n $? > $@
X
XFilter.fmtd:	Filter.guid
X		$(TBL) $? | $(FORMATTER) tmac.n - > $@
X
XForm.fmtd:	Form.guide
X		$(FORMATTER) tmac.n $? > $@
X
XRef.fmtd:	Ref.guide
X		$(FORMATTER) tmac.n $? > $@
X
XUsers.fmtd:	Users.guide
X		$(TBL) $? | $(FORMATTER) tmac.n - > $@
X!NO!SUBS!
SHAR_EOF
# ============= doc/Ref.guide ==============
echo "x - extracting doc/Ref.guide (Text)"
sed 's/^X//' << 'SHAR_EOF' > doc/Ref.guide &&
X.\" @(#)$Id: Ref.guide,v 4.1.1.1 90/06/09 22:49:11 syd Exp $
X.\"
X.\"  Reference guide to the Elm mail system.
X.\"  format with 
X.\"      troff tmac.n Ref.guide > Ref.format
X.\"
X.\"  Elm is now in the public trust. Bug reports, comments, suggestions, flames
X.\"  etc. should go to:
X.\"	Syd Weinstein		elm@DSI.COM (dsinc!elm)
X.\"
X.\"  (C) Copyright 1986, 1987 Dave Taylor
X.\"  (C) Copyright 1988, 1989, 1990 Usenet Community Trust
X.\"
X.\"  $Log:	Ref.guide,v $
X.\" Revision 4.1.1.1  90/06/09  22:49:11  syd
X.\" Droped obsolete control Q command from list
X.\" From: Joe Wasik
X.\" 
X.\" Revision 4.1  90/04/28  22:41:08  syd
X.\" checkin of Elm 2.3 as of Release PL0
X.\" 
X.\"
X.po 1i
X.ds h0
X.ds h1
X.ds h2
X.ds f0
X.ds f1
X.ds f2
X.nr Hy 1
X.nr Pt 1
X.nr Pi 0
X.lg 0
X.nf
X.na
X.rs
X.za
X.sv |3.0i
X.ce 99
X.ps 20
X.ss 18
X.vs 12
X\f3The Elm Reference Guide\f1
X.sp 3
X.ps 12
X.ss 14
X.vs 14
X\f2A comprehensive list of all commands, 
Xoptions and such to the \f3Elm\fP mail system\f1
X.sp 2
XDave Taylor
X.sp
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp 3
Xemail: taylor@hplabs.HP.COM or hplabs!taylor
X.sp 3
X>>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
X.sp
XSyd Weinstein
XDatacomp Systems, Inc.
X3837 Byron Road
XHuntingdon Valley, PA 19006-2320
X.sp
Xemail: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
X.sp 3
X.ps 18
X\f3\(co\f1\s12 Copyright 1986, 1987 by Dave Taylor
X.ps 18
X\f3\(co\f1\s12 Copyright 1988, 1989, 1990 by The USENET Community Trust
X.ce 0
X.ps 10
X.ss 12
X.vs 12
X.fi
X.ad
X.bp 1
X.sv 5v
X.ce 99
X.ps 14
X\f3The Elm Reference Guide\f1
X.ds h0 "Elm Reference Guide
X.ds h1
X.ds h2 "Version 2.3
X.ds f0 "May 1, 1990
X.ds f1 "Page %
X.sp
X.ps 10
X(Version 2.3)
X.sp 2
XDave Taylor
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp
Xemail: taylor@hplabs.HP.COM or hplabs!taylor
X.sp 2
X>>> Elm is now in the public trust. Bug reports, comments, etc. to: <<<
X.sp
XSyd Weinstein
XDatacomp Systems, Inc.
X3837 Byron Road
XHuntingdon Valley, PA 19006-2320
X.sp
Xemail: elm\s-1@\s+1DSI.COM  or  dsinc\s-1!\s+1elm
X.sp 2
XMay 1, 1990
X.ce 0
X.sp 3 
X.hn 1 Introduction
X
XThere are many parts to a complex software system and \f3The Elm
XMail System\f1
Xis no different.  This document describes fully all the options 
Xavailable in the mailer, including the command line options,
Xthe commands (in considerably more detail than
Xin \f2The Elm Users Guide\f1) and 
Xthe \f2.elm/elmrc\f1 file.
X
XTo be more explicit, this document covers:
Xa discussion of 
Xthe \f2.elm/elmrc\f1 file,
Xcommand line options of \f2elm\f1, 
Xoutgoing mail processing,
Xresponses of various commands,
Xmail archive folders,
Xthe Alias system,
Xsystem aliases etc,
Xmore on the \f3Elm\f1 utilities,
Xand a section for expert mail users.
X
XWithout any further ado, then, let's get this show on the road!!
X.sp
X.hn 1 "The .elm/elmrc File"
X
XElm, like lots of other software on the
XUnix\v'-.3'\s5TM\s10\v'.3' system, has the ability to automatically read 
Xin a configuration file at each invocation.  The file must be
Xcalled \f2elmrc\f1 and reside in the \f2.elm\f1 directory located
Xin your home directory.  It can have any of the entries below, in any order.
XIf you are missing any entries, or if you don't have an \f2.elm/elmrc\f1
Xfile, the default values (listed below for each option) will be used.
XNote that those options below designated with * can be altered
Xusing elm via the o)ptions screen.
XAlso note that when you save a new \f2.elm/elmrc\f1 file via the `>' command
Xof the options
Xscreen, it will be (re)created including even those options that
Xhave default values.
X.br
X.sp 
X.ne 8
X.hu String Variables
X
X.lp alternatives 1.0i
XThis is a list of other machine/username combinations
Xthat you receive mail from (forwarded).  This is used 
Xwhen the \f2group reply\f1 feature is invoked to ensure that
Xyou don't send yourself a copy of the outbound message.
X(The default is a list of no alternatives.)
X
X.lp calendar* 1.0i
XThis is used in conjunction with the `<' \f2scan message for
Xcalendar entries\f1 command, as the file to append any found
Xcalendar entries to.  (The default is \f2calendar\f1 in your home directory.)
X
X.lp editor* 1.0i
XThe editor to use when typing in new mail.  If you select
X``none'' or ``builtin'' you'll get a Berkeley Mail style
Xinterface for all mail that doesn't already have text
Xin the buffer (e.g. a reply, mail with a ``signature'', etc).
X(The default is to use the value of $EDITOR in your
Xcurrent environment, and if not set, an editor selected by
Xthe person who configured \f2elm\f1 for your system.)
X
X.lp escape 1.0i
XThe character used with the ``builtin'' editor (see above)
Xto escape from text entry to input a command.
XWhen a line begins with this character, the editor interprets it
Xas a command rather than as text to add.
X(The default is ``~''.)
X
X.lp fullname* 1.0i
XThis is the name the mailer will use in messages
Xyou send.  It is highly recommended that you use your
Xfull name and nothing strange or unusual, as that can
Xappear extremely rude to people receiving your mail.
X(The default is to use the ``gcos'' field from the \f2/etc/passwd\f1 file
Xon systems that use this field to store full names, and to use the contents
Xof \f2.fullname\f1 in your home directory on other systems.)
X
X.lp maildir* 1.0i
XThis is your folder directory.
XWhen you specify a folder name beginning with the `=' metacharacter\s-2\u1\d\s0,
X.fn
X1. Note that `%' and `+' are synonymous with `=' throughout \f2elm\f1
X.ef
Xit stands for this directory name.  That is,
Xif you save a message to folder \f2=stuff\f1
Xthe `=' will be expanded to the current value of \f2maildir\f1.
X(The default is the directory \f2Mail\fP in your home directory.)
X
X.lp tmpdir* 1.0i
XUse this if you want to define your own directory for the temporary
Xfile Elm creates while running.  This is only necessary if using the
Xsystem temporary directory could cause problems, such as when not all
XNFS clients mount the common temporary directory, or when the temporary
Xdirectory is prone to being cleared periodically.  The default entry
Xof the system temporary directory is normally ok.
X
X.lp pager 1.0i
XThis is the program to be used to display messages.  You can
Xspecify ``builtin'' or the name of any standard pager.  If you
Xuse ``builtin+'', each screenfull of displayed message is
X``paged'' from the top of your screen with a title line,
Xwhile ``builtin'' simply ``scrolls up'' subsequent screenfulls once
Xit has ``paged'' the first screenfull.
X(The default is to use the value of $PAGER in your
Xcurrent environment, and if not set, a pager selected by
Xthe person who configured \f2elm\f1 for your system, quite likely ``builtin+''.)
X
X.lp attribution 1.0i
XWhen you \f2forward\f1 a message or \f2reply\f1 to it, you can
Xoptionally attribute the quoted text to its original author.
XDefining the attribution string here allows you to indicate the
Xform that the attribution should take.  The sequence `%s' in the
Xattribution will be replaced by the name of the original author.
XExamples are:
X.nf
X.ft CW
X.zf
X	attribution = According to %s:
X	attribution = %s writes:
X.ft 1
X.fi
X
X.lp prefix 1.0i
XWhen you \f2reply\f1 to a message or \f2forward\f1 a message to another person,
Xyou can optionally include the original message.  Defining the
Xprefix value here allows you to indicate what the prefix of 
Xeach included line should be.  (The default is ``>\ '' and is
Xstandard in the Unix community.)
X
X.lp print* 1.0i
XThis is the command used for printing messages.  There are two
Xpossible formats for it, either a command that
Xcan have a filename affixed to (as a suffix) before being
Xexecuted, or a string that 
Xcontains the meta-sequence `%s' which will be replaced
Xby the name of the file before being executed.  Examples of each are:
X.nf
X.ft CW
X.zf
X	print = print -formfeed
X	print = pr %s | lpr
X.br
X.ft 1
X.fi
X(The default is set by the person who configured \f2elm\f1 for your system.)
X
X.lp receivedmail 1.0i
XThis is the folder to which incoming mail is saved after you've read it.
XWhen you answer \f2no\f1 (`n') to the ``keep unread messages in 
Xyour incoming mailbox?'' prompt or \f2yes\f1 (`y') to the ``store read
Xmessages in your "received" folder?'', this is where the messages go.
X(The default is "=received", that is,
Xa folder called \f2received\f1 in your \f2maildir\f1 directory).
X
X.lp sentmail* 1.0i
XThis is the folder to which a copy of outgoing mail is automatically
Xsaved.  This will only be done if the \f2copy\f1 flag
Xis turned on (see below).  Also note that if the \f2savename\f1 feature
X(see below) is enabled then this folder may be ignored since the program
Xmay save to a folder that has the same name as the login
Xof the person you're sending to.
XWhether or not a copy is saved, and to what folder, can be changed just
Xprior to sending a message, see below.
X(The default is "=sent", that is,
Xa folder called \f2sent\f1 in your \f2maildir\f1 directory).
X
X.lp shell 1.0i
XThis defines the shell to use when doing ``!'' escapes and
Xsuch.  (The default is to use the value of $SHELL in your
Xcurrent environment, and if not set, a shell selected by
Xthe person who configured \f2elm\f1 for your system.)
X
X.lp signature 1.0i
XThis file, if defined, will be automatically appended to all
Xoutbound mail before the editor is invoked.  Furthermore, 
Xif you'd like a different ``.signature'' file for \f2local\f1
Xmail and \f2remote\f1 mail (remote being via other hosts), 
Xyou can alternatively define two variables, \f2localsignature\f1
Xand \f2remotesignature\f1, to have the same functionality.
X(The default is "localsignature" and "remotesignature"
Xin your home directory.)
X
X.lp sortby* 1.0i
XYou can have your folder sorted by any of the following ways:
X.sp
X.ta 1i
Xfrom	This will sort according to whom each message is \f2from\f1.
X
Xlines	This will sort \f2shortest\f1 to \f2longest\f1 by message.
X
Xmailbox	This will leave the messages in the order found in the folder.
X
Xreceived	This will sort \f2least recently received\f1 to 
X\f2most recently received\f1.
X
Xsent	This will sort \f2least recently sent\f1 to \f2most recently sent\f1.
X
Xstatus	This will sort by priority, action, new, tagged, then deleted.
X
Xsubject	This will sort according to the \f2subject\f1 of each message.
X.sp
XEach of these fields can also optionally be prepended with the
Xsequence ``reverse-'' to reverse the order of the sort.  This doesn't
Ximply anything about the order of the message in the folder
Xitself and affects only their order on the index screen.  (The
Xdefault is \f2mailbox\f1 order.)
X
X.lp weedout 1.0i
XWhen specifying this option, you can list headers that
Xyou \f2don't\f1 want to see when you are displaying a message.
XThis list can continue for as many lines as desired, as 
Xlong as the continued lines all have leading indentation.
X(The default is ``Received:'' and others.)
X.br
X.ne 8
X.hu Numeric Variables
X
X.lp bounceback 1.0i
XThis is a hop count threshold value and allows you to
Xset up the mailer so that when you send mail more than
X\f2n\f1 machines away, it'll automatically include a
X``Cc:'' to you through the remote machine.  In practice
Xthis should be very rarely used.  (Note: this refuses to
Xbounce mail off an Internet address.  The default is to
Xhave it set to zero, which disables the function)
X
X.lp timeout 1.0i
XOn more advanced systems, it's nice to start up the 
Xmailer in a window and let it sit in background 
Xunless new mail arrives (see \f2wnewmail\f1 for
Xanother window based program) at which point
Xit can be brought up to the forefront of the system 
Xand read.  In this case, it would be quite convenient
Xto have the mailer internally resynchronize every
Xso often.  This option specifies the number of seconds that this occurs.
X.sp
XThis is also useful for normal terminals, for example you can
Xleave \f2elm\f1 running at night (I usually do) and when you
Xcome in in the morning it'll be all ready to read your mail!
X.sp
X(The default is a 300 second (5 minute) timeout period).
X
X.lp userlevel* 1.0i
XThis is what the program uses to determine the relative level of
Xsophistication of the user \(em the values are 0 for a new user (the
Xdefault), 1 for someone familiar with \f2elm\f1 
Xuser, and 2 for experts.  Some advanced features are hidden from novice
Xusers, while experts get less verbose prompt messages.
X.br
X.ne 8
X.hu Boolean Variables
X
X.lp alwaysdelete 1.0i
XWhen set, this changes the default answer
Xof the prompt ``Delete messages?'' to the indicated value.  (The default is
Xto have the answer be \f2No\f1 (i.e. alwaysdelete = OFF).)
X
X.lp alwaysstore 1.0i
XThis sets the default
Xanswer on the ``store read mail in "received" folder'' prompt
Xto the value indicated.  (The default is to have the default
Xanswer be \f2No\f1 (i.e., alwaysstore = OFF).)
X
X.lp alwayskeep 1.0i
XThis sets the default answer
Xon the ``keep unread mail in incoming mailbox''
XHowever, if you answered \f2No\fP to the ``store read
Xmail in "received" folder''
Xit is presumed that you'd also want to keep your unread mail in the
Xincoming mailbox, too, and the value of alwayskeep is ignored.
X(The default is to have the
Xdefault answer be \f2Yes\f1 (i.e., alwayskeep = ON).)
X
X.lp arrow* 1.0i
XSometimes you are forced to use a slow, or ``dumb'' terminal.  In this
Xcase, you can force the current message pointer to be the ``->''
Xsequence rather than the inverse bar.  (Note that this is
Xoverridden by the similar `-a' command line option,
Xsee below.)  (The default is OFF.)
X
X.lp ask 1.0i
XThis allows you to tell the \f2elm\f1 system that 
Xyou'd rather not be asked ``Delete Mail?'' and such each time you 
Xquit, resynchronize a folder or change folders,
Xand instead it should just use the values of
X``alwaysdelete'', ``alwaysstore'', and ``awayskeep'' without prompting.
X(Note that when you quit \f2elm\fP, if you use `Q' instead of `q', you will
Xnever be questioned, regardless of how you have \f2ask\f1 set.)
X(The default is ON, i.e. to ask the questions.)
X
X.lp askcc 1.0i
XIf turned off, this will allow you to send mail without being
Xpresented the ``Copies to:'' prompt for each message. This
Xstill allows you to explicitly include addresses in the ``cc''
Xlist via either ``~c'' in the builtin editor, or via using the
Xheader editor.  (The default is ON, i.e. to ask about copies.)
X
X.lp autocopy 1.0i
XIf turned on, this will automatically copy
Xthe text of each message being replied to into the edit
Xbuffer.  Otherwise you will be prompted as to whether you want
Xthe message included in yours. (See the \f2prefix\f1 
Xoption above.)  (The default is OFF.)
X
X.lp copy 1.0i
XThis, in combination with the \f2sentmail\f1 folder, will
Xallow you to have silent copies of all outgoing mail
Xmade on the outbound step.  
XWhether a copy is saved and to which folder can be set prior to sending
Xa message, see below.
X(The default is OFF.)
X
X.lp forcename 1.0i
XThis, in combination with the \f2savename\f1 option, governs
Xhow a copy of an outgoing message will be saved.  (See \f2savename\f1 below
Xfor details.)  (The default is OFF.)
X
X.lp keep 1.0i
XThe mail system has a habit of deleting folders when you've
Xremoved everything from them.  With this option turned on, it will
Xinstead preserve them as zero-byte files.
XThis option does not apply to your incoming mailbox.
X(The default is OFF.)
X
X.lp keypad 1.0i
XIf on, this tells \f2elm\f1 that you have an HP terminal and enables
Xthe <NEXT>, <PREV>, <HOME> and <SHIFT-HOME> keys.  (The default is OFF.)
X
X.lp menu* 1.0i
XIf turned off, this will inhibit the Menu display on all of the 
Xscreen displays within the \f2elm\f1 program.  (Note that this is
Xoverridden by the similar `-m' command line option,
Xsee below.)  (The default is ON.)
X
X.lp names* 1.0i
XIf turned off, the primary recipients' address is displayed on your
Xscreen with their full names when you send a message.  Otherwise,
Xonly the full names are given.  (The default is ON.)
X
X.lp movepage 1.0i
XIf this is enabled then commands that move through the
Xfolder by pages (the `+', `-', <right-arrow>, and <left-arrow> keys)
Xwill also move the current message pointer to the
Xtop of that page of messages.  If this is turned off 
Xthen moving through the pages doesn't alter the
Xcurrent message pointer location.
X(The default is OFF.)
X
X.lp noheader 1.0i
XThis boolean flag tells the mailer not to include the 
Xheaders of messages when copying a message into a file
Xbuffer for replying to or forwarding.
X(The default is ON.)
X
X.lp promptafter 1.0i
XIf this flag is ON and you use an external pager,
Xwhen the pager exits, you will be prompted for a command rather
Xthan returned directly to the index screen.
XIf the external pager you are using exits when it reaches end of file
X(i.e. end of the message), you should have this flag ON,
Xotherwise the last screen of the displayed message will not be held
Xbut instead be immediately replaced by the index screen.
XIf the external pager you are using does not exit until you command it to exit,
Xyou have a choice.
XIf you usually want to see the index screen before issuing a command,
Xhaving the flag OFF will cut down out the extra keystroke needed to return
Xto the index screen.
XIf you usually don't need to see the index screen to before issuing the
Xnext command,
Xhaving the flag ON will allow you to proceed with your next command without
Xhaving to wait for the redrawing of the index screen.
X(The default is ON.)
X
X.lp pointnew 1.0i
XIf this is turned on, the mailer will be automatically 
Xpointing to the first new message in your folder when started, instead
Xof at message #1.  This will only be effective for the incoming mailbox since
Xother folders are not expected to have `new' mail.  (The default is ON.)
X
X.lp resolve 1.0i
XThis is a boolean flag that defines the behaviour of the
Xprogram for such actions as deletion, saving a message 
Xand so on.   Specifically, with this option enabled, as
Xsoon as mail is `dealt with' the program moves you to the
Xnext message in the folder, with deletion, undeletion,
Xsaving a message and forwarding a message all being treated as
Xdealing with email in this manner.
X(The default is ON.)
X
X.lp savename 1.0i
XOne of the problems with electronic mail systems is that one
Xtends to get very large, one-dimensional (flat) files that
Xcontain lots of completely unrelated mail.  If this option
Xis turned on, \f2elm\f1 will use a more intelligent 
Xalgorithm \(em on incoming mail, when you \f2save\f1 or \f2copy\f1 it,
Xthe default mailbox to save to (changeable by pressing anything other than
X<return> of course) is a folder that is the \f2login name\f1 of the
Xperson who sent you the message.  Similarly, when sending mail out,
Xinstead of just blindly saving it to the \f2sentmail\f1 folder, \f2elm\f1
Xwill save it to a folder that is the login name of the 
Xperson who is to receive the mail\s-2\u2\d\s0.
X.fn
X2. When sending to a group, it's saved to the first person in the 
Xlist only.
X.ef
X
XIf \f2forcename\f1 is off (see above), the copy will be saved to
Xthat folder only if the folder already exists.  In practice,
Xthis means that important people that you communicate
Xwith (those that you tend to save mail from) have folders that are
Xactually \f2a recorded log of the discussion in both directions\f1
Xand those others (random mailings) are all stuffed in the \f2sentmail\f1
Xfolder for easy perusal and removal.
X
XOtherwise, if you always want to save copies of outgoing messages
Xin separate folders by recipient login name,
Xyou'll want to set \f2forcename\f1 to on.  (The
Xdefault for \f2savename\f1 is ON.)
X
X.lp sigdashes 1.0i
XIf on, this tells \f2elm\f1 that you wish to follow the convention of prefixing
Xyour signature with newline dash dash blank newline.  This will be placed in
Xyour message before your signature file.  If off, the signature file is placed at
Xthe end of the message without any prefix.
X
X.lp softkeys 1.0i
XIf on, this tells \f2elm\f1 that you have an HP terminal with the
XHP 2622 function key protocol and that you'd like to have them available
Xwhile in the program.  (The default is OFF.)
X
X.lp titles 1.0i
XThis flag allows you to have the first line of a message
Xtitled with:
X.sp
X.ft CW
X.zf
X.ps 9
X.nf
X.tl '           Message \f2N/M\fP from \f2username\fP''\f2date\fP at \f2time\f1      '
X.fi
X.ps 10
X.ft 1
X.sp
Xwhere all the information has been previously extracted
Xfrom the message.
XThis is especially useful if you weed out all the headers of each
Xmessage with a large `weedout' list...
X(The default is ON.)
X
X.lp warnings 1.0i
XThe mailer likes to warn you when you send mail to a machine that cannot
Xbe directly accessed.  In some situations, however, the system is set up so
Xthat mail is automatically forwarded to another machine that might then
Xhave better connections.  Setting this flag to OFF will allow you to effectively
Xshut off all the warning messages.  Use of this flag requires support of the
Xuuname command on your system.  Without this command, the flag will be cleared
Xto OFF automatically. (The default is ON.)
X
X.lp weed 1.0i
XThis is a boolean flag that, in combination with the
X``weedout'' list, allows you to custom define the set of
Xheaders you would like to not have displayed while reading
Xmessages.  
X(The default is ON.)
X.in 0
X.sp
XOne more thing: the format for each of the lines is:
X.nf
X.ft CW
X.zf
X.ti .5i
Xvariable = value\f1
X.fi
Xand for boolean variables, \f2value\f1 can be `ON' or `OFF' only.
X.sp
XFor a better idea of how this all works, here's 
Xmy \f2.elm/elmrc\f1 file.
XWhile looking through it, notice that you can have lots of comments
Xand blank lines for readability and that you can also use `shell
Xvariables' and the `~' metacharacter for your home directory, 
Xand they are expanded accordingly when read in by the mailer.
X(Note that this was automatically saved by the \f2elm\f1 program
Xon the fly from the o)ptions screen)
X.ft CW
X.zf
X.nf
X  #
X  # .elm/elmrc - options file for the ELM mail system
X  #
X  # Saved automatically by ELM 2.2 for Dave Taylor
X  #
X
X  # For yes/no settings with ?, ON means yes, OFF means no
X
X  # where to save calendar entries
X  calendar = ~/.Agenda
X
X  # what editor to use ("none" means simulate Berkeley Mail)
X  editor = none
X
X  # the character to use in the builtin editor for entering commands
X  escape = ~
X
X  # the full user name for outbound mail
X  fullname = Dave Taylor
X
X  # where to save received messages to, default file is "=received"
X  receivedmail = $HOME/Mail/received
X
X  # where to save my mail to, default directory is "Mail"
X  maildir = /users/taylor/Mail
X
X  # program to use for displaying messages ('builtin' is recommended)
X  pager = builtin
X
X  # prefix sequence for indenting included message text in outgoing messages...
X  prefix = >_
X
X  # how to print a message ('%s' is the filename)
X  print = lpr -Plw2 %s
X
X  # where to save copies of outgoing mail to, default file is "=sent"
X  sentmail = /users/taylor/Mail/mail.sent
X
X  # the shell to use for shell escapes
X  shell = /bin/csh
X
X  # local ".signature" file to append to appropriate messages...
X  localsignature = localsig
X
X  # remote ".signature" file to append to appropriate messages...
X  remotesignature =  remotesig
X
X  # do we want dashes above signatures? (News 2.11 compatibility and convention)
X  sigdashes = ON
X
X  # how to sort folders, "Mailbox" by default
X  sortby = Reverse-Received
X
X  # should the default be to delete messages we've marked for deletion?
X  alwaysdelete = ON
X
X  # should the default be to store read messages to the "received" folder?
X  alwaysstore = ON
X
X  # should the default be to keep unread messages in the incoming mailbox?
X  alwayskeep = ON
X
X  # should we use the "->" rather than the inverse video bar?
X  arrow = OFF
X
X  # should the message disposition questions be displayed(ON) or
X  # auto-answered(OFF) with the default answers when we resync or change folders?
X  ask = ON
X
X  # would you like to be asked for Carbon-Copies information each msg?
X  askcc = ON
X
X  # automatically copy message being replied to into buffer? 
X  autocopy = OFF
X
X  # threshold for bouncing copies of remote uucp messages...
X  # zero = disable function.
X  bounceback = 0
X
X  # save a copy of all outbound messages?
X  copy = ON
X
X  # do we want to be able to mail out AT&T Mail Forms?
X  forms = OFF
X
X  # should we keep folders from which all messages are deleted?
X  keepempty = OFF
X
X  # we're running on an HP terminal and want HOME, PREV, NEXT, etc...
X  keypad = OFF
X
X  # should we display the three-line 'mini' menu?
X  menu = ON
X
X  # when using the page commands (+ - <NEXT> <PREV>) change the current
X  # message pointer...?
X  movepage = ON
X
X  # just show the names when expanding aliases?
X  names = ON
X
X  # when messages are copied into the outbound buffer, don't include headers?
X  noheader = ON
X
X  # start up by pointing to the first new message received, if possible?
X  pointnew = ON
X
X  # prompt for a command after the external pager exits?
X  promptafter = ON
X
X  # emulate the mailx message increment mode (only increment after something
X  # has been 'done' to a message, either saved or deleted, as opposed to 
X  # simply each time something is touched)?
X  resolve = ON
X
X  # save messages, incoming and outbound, by login name of sender/recipient?
X  savename = ON
X
X  # save outbound messages by login name of sender/recipient even if the
X  # associated folder doesn't already exist?
X  forcename = OFF
X
X  # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
X  # (this implies "keypad=ON" too)
X  softkeys = OFF
X
X  # set the main prompt timeout for resynching...
X  timeout = 60
X
X  # display message title when displaying pages of message?
X  titles = ON
X
X  # are we good at it?  0=beginner, 1=intermediate, 2+ = expert!
X  userlevel = 2
X
X  # tell us about addresses to machines we can't directly get to?
X  warnings = OFF
X
X  # enable the weedout list to be read?
X  weed = ON
X
X  # what headers I DON'T want to see, ever.
X  weedout = "Path:" "Via:" "Sent:" "Date" "Status:" "Original" "Phase" 
X	  "Subject:" "Fruit" "Sun" "Lat" "Buzzword" "Return" "Posted" 
X	  "Telephone" "Postal-Address" "Origin" "X-Sent-By-Nmail-V" "Resent" 
X	  "X-Location" "Source" "Mood" "Neuron" "Libido" "To:" "X-Mailer:" 
X	  "Full-Name:" "X-HPMAIL" "Cc:" "cc:" "Mmdf" "Network-" "Really-" 
X	  "Sender:" "Post" "Message-" "Relay-" "Article-" "Lines:" 
X	  "Approved:" "Xref:" "Organization:" 	"*end-of-user-headers*"
X
X  # alternative addresses that I could receive mail from (usually a
X  # forwarding mailbox) and don't want to have listed...
X  alternatives = hplabs!taylor  hpldat!taylor  taylor@hplabs  taylor%hpldat  
X.fi
X.br
X.ne 5
X.sp
X.hn 1 The Command Line Options
X
XThere are a number of command line options to the \f2elm\f1
Xprogram, with only one that needs to be remembered: ``-?''or ``-h'' for help.
X
XThe flags are:
X
X.lp \h'24p'-a 66p
XArrow.  This allows you to have the ``->'' arrow pointer
Xrather than the inverse bar.  This can also be set in
Xthe \f2.elm/elmrc\f1 
Xfile \(em check the boolean variable \f2arrow\f1).
X
X.lp \h'24p'-c 66p
XCheck only.  This is useful for expanding aliases 
Xwithout sending any mail.  The invocation is similar to
Xinvoking \f2elm\f1 in send-only mode:
X.ft CW
X.zf
Xelm -c\f2  list-of-aliases\f1
X
X.lp "\h'24p'-d \f2n\f1" 66p
XSet debug level to \f2n\f1.  Useful for debugging the \f2elm\f1
Xprogram, this option will create a file in your home
Xdirectory called \f2ELM:debug.info\f1, then
Xoutput a running log of what is going on with
Xthe program.  Level \f2n\f1 can be 1 through 11,
Xwhere the higher numbers generate more output.
XThis option might be disabled by the the person who configured
X\f2elm\f1 for your system.
X
X.lp "\h'24p'-f \f2folder\f1" 66p
XFolder.  Read specified folder rather than the default incoming mailbox.
XNote that you can use the same metacharacters (e.g. `=') as when 
Xyou \f2change folders\f1 from within the program.  You can also use the
Xsame abbreviatory symbols (`!', `>' and `<'),
Xbut remember to ``single quote'' them
Xin case they have special meaning in the shell you use.
X
X.lp "\h'24p'-h or -?" 66p
XHelp.  Gives a short list of all these options and exits.
X
X.lp \h'24p'-k 66p
XKeypad \(em This option, when used, lets the \f2elm\f1 program
Xknow that you're on an HP terminal, and it can then interpret
Xthe <PREV>, <NEXT> and <HOME>/<SHIFT>-<HOME> keys accordingly.  If you
Xare not on an HP terminal, it is recommended that you do
XNOT use this option. (See the \f2keypad\f1 option in
Xthe \f2.elm/elmrc\f1 section.)
X
X.lp \h'24p'-K 66p
XKeypad + softkeys.  The \f2elm\f1 mailer can
Xuse the HP softkeys as an alternative form of
Xinput.  If you specify this option be sure that you're on
Xan HP terminal that can accept the standard 2622 terminal
Xescape sequences! (See the \f2softkeys\f1 option in
Xthe \f2.elm/elmrc\f1 section for more information.)
X
X.lp \h'24p'-m 66p
XInhibit display of the 3-line menu when using the mailer.  This,
Xof course, gives you three more message headers per page instead.
X(See also the 
X.ft CW
X.zf
Xmenu\f1 option in
Xthe \f2.elm/elmrc\f1 section.)
X
X.lp "\h'24p'-s \f2subject\f1" 66p
XIn send-only and batch mode, this is how to indicate the subject of the
Xresulting message.  Please see the section on ``Non-Interactive
XUses of Elm'' in \f2The Elm Users Guide\f1 for more information.
X
X.lp \h'24p'-z 66p
XZero.  This causes the mailer not to be started if you don't
Xhave any mail.   This emulates the behaviour of programs
Xlike \f2Berkeley Mail\f1.
X
X.in 0
XAll the above flags default to reasonable options, so there is
Xusually no need to use them.  Furthermore, the most used flags
Xare available through the \f2.elm/elmrc\f1 file.  See above.
X.br
X.ne 5
X.sp
X.hn 1 Special Outgoing Mail Processing
X
XThere are a few extra features that the mailer offers on
Xoutgoing mail that are worthy of mention:
X
XThe first, and probably the most exciting feature\s-2\u3\d\s0, is the
X.fn
X3. Unfortunately, at many non-US sites, it's quite probable that
Xyou won't be able to use this feature since you won't have
Xthe \f2crypt()\f1 library available due to licensing restrictions.
X.ef
Xability to send \f2encrypted\f1 mail! To do this is 
Xextremely simple:  You need merely to have two key lines
X.ft CW
X.zf
X[\&encode]\f1 and 
X.ft CW
X.zf
X[\&clear]\f1 in the message body.
X
XConsider the following outgoing message:
X.nf
X.ps 9
X.in .5i
X.ft CW
X.zf
XJoe,
XRemember that talk we had about Amy?  Well, I talked to my manager 
Xabout it and he said...
Xuhh...better encrypt this...the usual `key'...
X[\&encode]
XHe said that Amy was having family problems and that it had been 
Xaffecting her work.
XGiven this, I went and talked to her, and told her I was sorry for 
Xgetting angry.  She said that she understood.
XWe're friends again!!
X[\&clear]
XExciting stuff, eh?   
X\h'3i'Mike
X.ps 10
X.ft 1
X.in 0
X.fi
XWhile this is obviously quite readable while being typed into 
Xthe editor, as soon as the message is confirmed as wanting
Xto be sent, the \f2elm\f1 mailer prompts with:
X.nf
X.ft CW
X.zf
X.ps 9
X.ti .5i
XEnter encryption key: @
X.ps 10
X.ft 1
X.fi
Xand accepts a key (a series of 8 or less characters) without
Xechoing them to the screen.  After entry, it will ask for the
Xsame key again to confirm it, then *poof* it will encrypt and
Xsend the mail.
X
XIf you have the \f2copy\f1 option enabled, the program will save
Xyour copy of the message encrypted too.  (This is to ensure
Xthe privacy and security of your mail archive, too.)
X
XIf the mailer doesn't ask for the encryption key, it's because
Xyou don't have the 
X.ft CW
X.zf
X[\&encode]\f1 entered as the first 8 characters
Xof the line.  It MUST be so for this to work!!
X
XOn the other end, a person receiving this mail (they must also
Xbe using \f2elm\f1 to receive it, since this mailer has a
Xunique encryption program) will be reading the
Xmessage and then suddenly be prompted:
X.nf
X.ft CW
X.zf
X.ps 9
X.ti .5i
XEnter decryption key: @
X.ft 1 
X.ps 10 
X.fi 
Xand will again be asked to re-enter it to confirm.  
XThe program will then on-the-fly decrypt the mail 
Xand display each line as it is decoded.  The 
X.ft CW
X.zf
X[\&clear]\f1 
Xline signifies that the block to encrypt is done.  
X
XNote that it is not possible currently to \f2pipe\f1 or \f2print\f1
Xencrypted mail.
X.sp 2
XThe other option on outgoing mail is the ability to
Xspecify what section of the message you want to have
Xarchived (assuming \f2copy\f1 is enabled) and what section
Xyou don't.  This is most useful for sending out source
Xfile listings and so on.
X
XTo indicate the end of the section that should be
Xsaved in the archive, you need merely to have the
Xline
X.nf
X.ft CW
X.zf
X.ti .5i
X[\&nosave]
X.ft 1
Xor
X.ft CW
X.zf
X.ti .5i
X[\&no save]
X.ft 1
X.fi
Xappear by itself on a line.  This will be removed from 
Xthe outgoing mail, and will indicate the last line of
Xthe message in the saved mail.
XOther than this, the saved mail is identical to the outgoing mail.
X.br
X.ne 5
X.sp
X.hn 1 Customized header lines
X
XThe mailer provides a facility for including customized
Xheader lines in the messages you send.
XIf you have an \f2.elm/elmheaders\f1 file,
Xthe mailer will include its contents
Ximmediately after the regular headers of all outbound  mail.
XThe mailer supports use of the backquote convention in this file.
XHere's a typical \f2.elm/elmheaders\f1 file.
X.ft CW
X.zf
X.nf
X  Organization: Hewlett-Packard Laboratories
X  Phone: (415)-555-1234
X  Operating System: `uname -srv`
X.fi
X.ft 1
XThese lines will appear after all other header lines in the message.
X.br
X.ne 5
X.sp
X.hn 1 Commands
X.sp
X
XThis section will discuss each command in the \f2elm\f1
Xprogram in more detail than above, including the 
Xprompts the user can expect upon executing the
Xcommand, the meaning of different options, etc.
X
X.lp \h'24p'? 66p
XHelp.  This command used once puts you in the \f2help\f1
Xmode, where any key you press will result in a one-line description
Xof the key.  Pressed again at this point will produce a two page
Xsummary listing each command available.
X<escape> or `.' will leave the help mode and return you to the
Xmain menu level.
X
X.lp \h'24p'<space> 66p
XDisplay the current message.
X<space> is useful for reading through a mail folder.
XWhen issued from the index screen,
Xit will display the first screen of the current message;
Xand then when issued while in the builtin pager,
Xit will page through the message to the end;
Xand then when issued at the end of a message
X(with either the builtin pager or an external pager),
Xit will display the first screen of the next message not marked for deletion.
X
X.lp \h'24p'<return> 66p
XDisplay the current message.
X<return> behaves somewhat differently from <space>.
XWhen issued while in the builtin pager,
Xit will scroll the current message forward one line,
Xand then when issued at the end of a message
X(with either the builtin pager or an external pager),
Xit will redisplay the first screen of the the \f2current\fP message.
XThe latter is useful in case you have issued a non-pager
Xcommand while in the builtin pager and want to restart the display
Xof the current message.
X
X.lp \h'24p'! 66p
XShell.  This allows you to send a command to the shell without
Xleaving the program. 
X
X.lp \h'24p'| 66p
XPipe.  This command allows you to pipe the current message
Xor the set of \f2tagged\f1 messages
Xthrough other filters as you desire.  The shell used for
Xthe entire command will be either the one specified in
Xyour \f2.elm/elmrc\f1 file, or the default shell (see above).
X
X.lp \h'24p'\/ 66p
XPattern match.  This command, on the top level, allows the
Xuser to search through all the \f2from\f1 and \f2subject\f1 lines of
Xthe current folder starting at the current message and
Xcontinuing through the end.  If the first character of the
Xpattern is a `/', then the program will try to match the
Xspecified pattern against \f2any\f1 line in the folder.  Again,
Xthis works from one after the current message through the
Xend.  Both searches are case insensitive.
X
X.lp "\h'24p'- or <left>" 66p
XDisplay the next page of the message index.
X
X.lp "\h'24p'+ or <right>" 66p
XDisplay the previous page of the message index.
X
X.lp \h'24p'<number><return> 66p
XSpecify new current message.  When you type in any digit key \f2elm\f1 will
Xprompt ``Set current to : n'', where `n' is
Xthe digit entered.  Enter the full number
Xand terminate with <return>.  Note that changing the
Xcurrent message to a message not on the 
Xcurrent page of headers will result in a new page
Xbeing displayed.
X
X.lp \h'24p'< 66p
XScan message for calendar entries.  A rather novel feature of 
Xthe \f2elm\f1 mailer is the ability to automatically incorporate
Xcalendar/agenda information from a mail message into the users
Xcalendar file.  This is done quite simply; any line that has
Xthe pattern
X
X.ti +.5i
X-> \f2calendar entry\f1
X
Xwill be automatically added to the users \f2calendar\f1 file (see
Xthe \f2calendar\f1 option of the \f2.elm/elmrc\f1 file) if the `<'
Xcommand is used.
X.sp
XFor example, let's say we had a message with the text:
X
X.ft CW
X.zf
X.ps 9
X.ti +.5i
XRegardless of that meeting, here's the seminar stuff:
X.br
X.ti +.5i
X-> 8/03 3:00pm: AI Seminar with Ira Goldstein of HP Labs
X.ft 1
X.ps 10
X
Xthen using the `<' command would add the line:
X
X.ft CW
X.zf
X.ps 9
X.ti +.5i
X8/03 3:00pm: AI Seminar with Ira Goldstein of HP Labs
X.ps 10
X.ft 1
X
Xto the users \f2calendar\f1 file.
X
X.lp \h'24p'a 66p
XAlias.  The alias system is a way by which more complex mail addresses
Xcan be shortened for the mail user.  For example:
X.nf
X.ps 9
X.ft CW
X.zf
X.ti +.5i
Xjoe, bleu   =  Joe Bleu  =   joe@hpfcla.SSO.HP.COM
X.ft 1
X.ps 10
X.fi
Xwhich allows mail to `joe' or `bleu' with the system expanding
Xthe address properly.  As is obvious, this not only saves remembering
Xcomplex addresses, it also allows the address to be optimized to
Xgo through the minimum number of machines without anyone having to
Xbe informed of the change.  A more detailed discussion can
Xbe found in either the section entitled \f2The Alias System\f1 in
Xthis document or \f2The Elm Alias System Users Guide\f1.
X
X.lp \h'24p'b 66p
XBounce mail.  This ``remails'' mail to someone else in such a
Xway as to make the return address the original sender rather
Xthan you.  (The \f2forward\f1 command is similar, but it makes
Xthe return address \f2you\f1 rather than the original sender.)
X
X.lp \h'24p'C 66p
XCopy to folder.  This command copies the current message or set of
Xtagged messages to
Xa folder.  If there is anything in the folder currently the
Xmessage or messages are appended to the end, otherwise the folder is created
Xcontaining only the newly copied message.  The prompt for this command
Xis `Copy to folder: '.  A response of <return> cancels the command
Xand returns the user to the system prompt.  The usual filename
Xmetacharacters are available, too.  That is, this command expands filenames
Xwith `~' being your home directory and `=' being your
X\f2maildir\f1 directory, if defined.  This command also allows you to
Xuse `>' for your \f2receivedmail\f1 folder and
X`<' for your \f2sentmail\f1 folder.  You can also enter `?' at the prompt
Xto list the names of your folders.
X
X.lp \h'24p'c 66p
XChange folder.  Specifying this command allows the user to change
Xthe folder that is currently being read.  This is intended 
Xfor perusal and reply to previously archived messages.
XThe prompt is `Name of new folder: ' and entering <return>
Xcancels the operation, while entering a filename causes the program
Xto read that file as the new folder,
Xif possible.  This command expands filenames
Xwith `~' being your home directory and `=' being your
X\f2maildir\f1 directory, if defined.  This command also allows you to
Xuse `!' as an abbreviation for you incoming mailbox,
X`>' for your \f2receivedmail\f1 folder, and
X`<' for your \f2sentmail\f1 folder.  You can also enter `?' at the prompt
Xto list the names of your folders.
X
X.lp "\h'24p'd, u" 66p
XDelete and Undelete.  Neither of these two commands have any prompts
Xand indicate their action by either adding a `D' to the current
Xmessage index entry (indicating deletion pending) or removing
Xthe `D' (indicating that the message isn't set for deletion).
X
X.lp \h'24p'<control>-D 66p
XThis command allows you to easily mark for deletion all messages 
Xthat have a specific pattern.  After <control>-D is pressed,
Xthe program will prompt for the string to match (currently it
Xonly matches either the \f2from\f1 or \f2subject\f1 lines of
Xthe message).
X
X.lp \h'24p'<control>-U 66p
XThis is the direct opposite command to the previous \(em all messages
Xthat match the specified pattern can have any mark for deletion 
Xremoved by using this command.
X
X.lp \h'24p'e 66p
XEdit mailbox.  This allows you to modify the current mail file at
Xa single keystroke.  This is mostly useful for editing down messages
Xbefore saving them.  Modifying headers should be done with extreme
Xcaution, as they contain routing information and other vital stuff
Xfor full functionality.
X
X.lp \h'24p'f 66p
XForward.  Allows the user to forward the current message to another user.
XThis copies the message into the edit buffer and allows the user to add
Xtheir own message too.  The prompt is `Forward to:' and will expand an alias
SHAR_EOF
echo "End of  part 4"
echo "File doc/Ref.guide is continued in part 5"
echo "5" > shar3_seq_.tmp
exit 0
Newsgroups: biz.sco.sources