home *** CD-ROM | disk | FTP | other *** search
- Subject: v22i063: ELM mail syste, release 2.3, Part04/26
- Newsgroups: comp.sources.unix
- Approved: rsalz@uunet.UU.NET
- X-Checksum-Snefru: d6cbfae8 e6d661e1 0483ed69 01e32cf2
-
- Submitted-by: Syd Weinstein <syd@dsinc.dsi.com>
- Posting-number: Volume 22, Issue 63
- Archive-name: elm2.3/part04
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # this is part 4 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file doc/Alias.guide continued
- #
- CurArch=4
- if test ! -r s2_seq_.tmp
- then echo "Please unpack part 1 first!"
- exit 1; fi
- ( read Scheck
- if test "$Scheck" != $CurArch
- then echo "Please unpack part $Scheck next!"
- exit 1;
- else exit 0; fi
- ) < s2_seq_.tmp || exit 1
- echo "x - Continuing file doc/Alias.guide"
- sed 's/^X//' << 'SHAR_EOF' >> doc/Alias.guide
- Xtake the Usenet articles in the group ``comp.mail.maps'' and change
- Xthem into a file of the form;
- X
- X \f2hostname\f1 <tab> \f2address\f1
- X
- Xwhich then must be sorted alphabetically and stored in the file
- Xpointed to by \f2pathfile\f1 for \f3Elm\f1 (and other
- Xprograms) to use.
- X.pg
- XIf you don't have the program, or don't want to use it, you can
- Xsimulate this file by listing machines in the same format. The
- Xexact format expected is;
- X
- X \f2hostname\f1<tab>\f2machine-address\f1
- X
- Xwhere \f2hostname\f1 is a limited identifier (no special characters) and
- Xmachine-address MUST contain the sequence `%s' (and consequently
- Xany other percent signs that appear in the address must be paired)
- Xso that the call in the program ``sprintf(buffer, machine-address, username)''
- Xwill generate a valid return address. This file must be sorted alphabetically
- Xfor Elm to use it properly.
- X.pg
- XBy way of example, here are a few entries from my own file;
- X
- X.ft CW
- X.zf
- X.in .5i
- X.TS
- Xl l.
- XHPL %s@hplabs
- XPARC %s%%Xerox.PA.COM@hplabs
- Xamc-hq %s%%AMC-HQ.ARPA@hplabs
- Ximsss %s%%IMSSS%%AI.STANFORD.EDU@hplabs
- Xinfopro hplabs!infopro!%s
- Xinterleaf sun!interleaf!%s
- X.TE
- X.ft 1
- X
- X.in 0
- XAs you can see, the addresses can get pretty complicated. In fact
- Xit's due purely to the complexity of addresses that this file
- Xis so useful.
- X.sp
- X.ne 5
- XSome brief examples:
- X
- X.in .5i
- X.ft CW
- X.zf
- X.nf
- X$ \f3elm joe@HPL\f1
- X.ft CW
- X.zf
- XTo: joe@hplabs
- X$ \f3elm michelle@imsss\f1
- X.ft CW
- X.zf
- XTo: michelle%IMSSS%AI.STANFORD.EDU@hplabs
- X$ \f3elm fiedler@infopro\f1
- X.ft CW
- X.zf
- XTo: hplabs!infopro!fiedler
- X.ft 1
- X.fi
- X
- X.in 0
- XIf you'd like further information on the \f2pathalias\f1 program, try
- Xkeeping track of the entries in the netnews group \f2comp.sources.unix\f1 \(em
- Xit's posted about once a year or so...
- X.sp
- X.hn 1 The Domain Routing Database
- X
- XAnother interesting feature of the
- X\f3Elm\f1 system is the shorthand domain routing database.
- XThis is the same database (in the same strange format) as used by
- Xthe publically available \f2uumail\f1 program.
- X.pg
- XIn a nutshell, the file contains information of the form;
- X
- X.in .5i
- X\f2domain, path-to-gateway, rewrite-template\f1
- X.in 0
- X
- XThe \f2domain\f1 field must begin with a leading `.' and
- Xis usually ordered in the same way as the standard
- Xdomain entries (that is, ``\s8.HP.COM\s10'' not ``\s8.COM.HP\s10'').
- X.pg
- X\f2Path-to-gateway\f1 is routing information on how to get
- Xto the particular gateway that this domain expects, and
- Xalways is a machine/host name (to be found in the pathalias
- Xdatabase, see the previous section) preceded by a `>'
- Xcharacter.
- X.pg
- X\f2Rewrite-template\f1 is the most interesting of the
- Xthree, and is akin to a printf string for C. The
- Xchanges are that instead of `%s' `%d' and so on, the
- Xactual ``percent'' values represent various parts of
- Xthe address, namely;
- X
- X.in .5i
- X.TS
- Xc l.
- X\f3Symbol Represents\f1
- X%U The username in the To: address
- X%N The remote machine name
- X%D %N + domain information
- X%R path to %N from pathalias
- X%P \f2path-to-gateway\f1 entry
- X%% The `%' character
- X.TE
- X.in 0
- X
- Xwith this very un-intuitive setup, let's look at a few entries
- Xfrom the domains database and then see how they work:
- X
- X.nf
- X.ft CW
- X.zf
- X.in .5i
- X\&.EUR.UUCP, , , %R!%U
- X\&.ATT.COM, >att, , %P!%D!%U
- X\&.HP.COM, , , %R!%U
- X\&.UUCP, , , %R!%U
- X\&.COM, >hplabs, , %P!%U@%D
- X\&.CSNET, >hplabs, , %P!18:12:00%%D@CSNET-RELAY.ARPA
- X\&.EDU, >hplabs, , %P!%U@%D
- X.ft 1
- X.fi
- X.in 0
- X
- X(Note the presence of a third field that is always null.
- XThis is for compatibility with the \f2uumail\f1 program.
- XAlso notice that there is a space after each and every comma,
- Xeven if that field has an entry.)
- X.pg
- XTo see how it all works, let's suppose that we want to send a message
- Xto `jad@cs.purdue.edu'. This would break down into the following fields:
- X
- X.nf
- X.in .5i
- X%U = \f2jad\f1
- X%N = \f2cs\f1
- X%D = \f2cs.purdue.edu\f1
- X.in 0
- X
- X.fi
- XWhen the \f3Elm\f1 program matches the \f2.edu\f1 entry
- X
- X.nf
- X.in .5i
- X.ft CW
- X.zf
- X\&.EDU, >hplabs, , %P!%U@%D
- X.ft 1
- X.in 0
- X
- X.fi
- Xthe other field instantiated would be:
- X
- X.nf
- X.in .5i
- X%P = \f2path to hplabs\f1
- Xtemplate = \f2%P!%U@%D\f1
- X.in 0
- X.fi
- X
- XIf, say, our path to \f2hplabs\f1 was \f2hpcnoe!hplabs\f1, then
- Xthe fully expanded address would be:
- X
- X.nf
- X.ft CW
- X.zf
- X.in .5i
- Xhpcnoe!hplabs!jad@cs.purdue.edu
- X.ft 1
- X.in 0
- X.fi
- X
- X\f1and so on.
- X.sp
- XWhat does this mean to the average user? It means that you can
- Xfor the most part send mail to people on different networks by
- Xsimply using their full address, including any domain information,
- Xso that mail to addresses like ``Jack@AI.MIT.EDU'' will work,
- Xa message to ``SueAnn@BBN.MAILNET'' will work and so on!
- X.sp
- X.hn 1 Other Stuff not Covered Yet
- X
- XProbably the biggest question you have in your mind right now
- Xis ``But how the heck does this relate to my existing \f2Berkeley Mail\f1
- Xaliases and the lower-level \f2sendmail\f1 alias system??'' Well,
- Xrest assured that if you \f2really\f1 want to have
- Xyour aliases down in the transport you can. No problem. All you'll
- Xneed to do is to turn off the address validation routine in \f3Elm\f1.
- X.pg
- XAnd for those ex-\f2Berkeley Mail\f1 fans, you can translate your
- Xaliases into the format that \f3Elm\f1 wants by running them
- Xthrough the \f2awk\f1 script listed in the appendix.
- X.pg
- XFinally, if you have any problems or questions, try looking in
- Xthe \f2newalias\f1 manual entry, or dropping me a line at the
- X``usual'' email address.
- X.bp
- X.ce 99
- X\f3Appendix One
- XAn AWK Script for Translating Aliases from
- Xa \f2Berkeley Mail\fP ``.mailrc'' File to an \f2Elm\fP ``.elm/aliases.text''
- XFile\f1
- X.ce 0
- X.sp
- X.nf
- X
- X.ta .5i
- X.ft CW
- X.zf
- XBEGIN { print "# Elm .elm/aliases.text file, from a .mailrc file..."
- X print ""
- X }
- Xnext_line == 1 {
- X next_line = 0;
- X group = ""
- X for (i = 1; i <= NF; i++) {
- X if (i == NF && $i == "\\\\") sep = ""
- X else sep = ", "
- X if ($i == "\\\\") {
- X group = sprintf("%s,", group)
- X next_line = 1;
- X }
- X else if (length(group) > 0)
- X group = sprintf("%s%s%s", group, sep, $i);
- X else
- X group = $i;
- X }
- X print "\\t" group
- X }
- X$1 ~ /[Aa]lias | [Gg]roup/ {
- X if ( NF == 3)
- X print $2 " = user alias = " $3;
- X else {
- X group = ""
- X for (i = 3; i <= NF; i++) {
- X if (i == NF && $i == "\\\\") sep = ""
- X else sep = ", "
- X if ($i == "\\\\") {
- X group = sprintf("%s,", group)
- X next_line = 1;
- X }
- X else if (length(group) > 0)
- X group = sprintf("%s%s%s", group, sep, $i);
- X else
- X group = $i;
- X }
- X print $2 " = group alias = " group;
- X }
- X }
- X
- X.ft 1
- X.fi
- XNote: this script is contained in the release under the name ``mailrc.awk''
- Xin the utilities directory ``utils''.
- SHAR_EOF
- echo "File doc/Alias.guide is complete"
- chmod 0444 doc/Alias.guide || echo "restore of doc/Alias.guide fails"
- echo "x - extracting doc/Config.guid (Text)"
- sed 's/^X//' << 'SHAR_EOF' > doc/Config.guid &&
- X.\" @(#)$Id: Config.guid,v 4.1 90/04/28 22:41:00 syd Exp $
- X.\"
- X.\" A guide to the ELM alias system and so on.
- X.\" format with:
- X.\" 'troff tmac.n Config.guid > Config.fmtd'
- X.\"
- X.\" (C) Copyright 1986, 1987 Dave Taylor
- X.\" (C) Copyright 1988, 1989, 1990 Usenet Community Trust
- 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.\" $Log: Config.guid,v $
- X.\" Revision 4.1 90/04/28 22:41:00 syd
- X.\" checkin of Elm 2.3 as of Release PL0
- X.\"
- X.\"
- X.tm Have we been run through "tbl" first?? I hope so!
- 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.sp |3.0i
- X.ce 99
- X.ps 20
- X\f3Elm Configuration Guide\f1
- X.sp 4
- X.ps 12
- X.ss 14
- X.vs 14
- X\f2How to install and customize the Elm 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\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\f3Elm Configuration Guide\f1
- X.ds h0 "Elm Configuration 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
- 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 2
- XMay 1, 1990
- X.ce 0
- X.sp 3
- X.pg
- XThis document is intended as a supplement to the \f2Elm Users Guide\f1
- Xand \f2Elm Reference Guide\f1
- Xand should be of interest mainly to people at a site either installing
- Xor maintaining the source code to the \f3Elm\f1 mail system, or
- Xmodifying the code.
- X.sp
- XIt is \f2required\f1 that installation be done by using the
- X\f2Configure\f1 script supplied with the system. Please see the
- Xfile \f2Instruct\f1 for further information on running \f2Configure\f1.
- X.sp
- XThe remainder of this document will discuss the various questions
- Xasked by the \f2Configure\f1 script and the
- Xoptions available via direct editing of various files and
- Xparameters. As indicated above, almost all of the sites that install
- X\f3Elm\f1 should find the \f2Configure\f1 script more than
- Xsufficient.
- X.hu Using Configure
- X.pg
- X\f2Configure\fP is a shell script that will automatically determine the
- Xtype of system it is running on and tune the parameters of Elm to fit
- Xthat system and its environment. Where the installer has a choice, it
- Xasks questions of the installer. \f2Configure\fP provides its own
- Xinstructions when run, so they are not repeated here. However, when
- Xthe installer is presented with a choice, this next section explains
- Xsome of the options available. Not all the questions or options to
- Xthose questions are explained.
- X.sp 2
- X.pg
- XEnable calendar feature?
- X.sp
- XElm has a feature to take specially marked lines within mail messages
- Xand add them to a file for use by the system calendar program. The
- Xcommand to do this extraction needs to be enabled to work. There is
- Xalso a follow on question regarding the name of the calendar file:
- X.pg
- XDefault calendar file?
- X.sp
- Xwhich is usually calendar on most systems. This file will reside in the
- Xusers home directory, not their .elm directory.
- X.pg
- XDoes your /etc/passwd file keep full names in Berkeley/V7 format (name
- Xfirst thing after ':' in GCOS field)?
- X.sp
- XElm uses the full name from the password file if it is available.
- XThere are two major ways this name is stored. Berkeley/V7 systems
- Xplace the name as the entire GCOS field string, that is it starts
- Xdirectly after the ':' that delimits the fields. USG
- X.ux " Systems" (
- XGroup, or AT&T) systems put the users name after a department number
- Xand separate it from that number by a '-'. The end of the users full
- Xname in these systems is a '('. Look at your /etc/password file and if
- Xeither version applies, answer yes to that version. If neither
- Xapplies, answer no. Elm can still get the users name from the
- X".fullname" file in their home directory.
- X.pg
- XEvery now and then someone has a (gethostname, uname) that lies about
- Xthe hostname but can't be fixed for political or economic reasons.
- XWould you like to pretend (gethostname, uname) isn't there and maybe
- Xcompile in the hostname?
- X.sp
- XElm needs to know the correct name of the host on which it is executing
- Xto be able to create the proper headers for the outbound mail. Some systems
- Xuse one name for uucp and another name for the system and others just don't
- Xreply to the subroutines with the proper name. In this case it will be
- Xnecessary to compile in the name. In all other cases this should not
- Xbe needed. It is provided just in case there is a problem with your
- Xsystem.
- X.pg
- XDoes your mailer understand INTERNET addresses?
- X.sp
- XElm will work with systems that can process the `@' character of INTERNET
- Xformat addresses or with the `!' format of uucp addresses. If your
- Xmail delivery agent understands the `@' format addresses, they should be
- Xused and this question is answered yes. If when you send mail with the
- X`@' format addresses (such as elm@dsi.com), they bounce, then answer this
- Xquestion no.
- X.pg
- XAm I going to be running as a setgid program?
- X.sp
- XOn USG type systems and many other types,
- Xaccess to the mailboxes and the mailbox directory
- Xis via the group permissions. The mail user agents, such as Elm, need
- Xwrite access into this directory to be able to move the mailbox around
- Xdue to internal editing and to create lock files. If the permissions
- Xon your mailbox directory are drwxrwxr-x, then Elm needs to be a setgid
- Xprogram.
- X.pg
- XWhat is the default editor on your system?
- X.sp
- XIf no editor is specified in the users \f2.elm/elmrc file,\f1 this is which
- Xeditor to use. The editor is used to compose outbound mail messages.
- X.pg
- XWhat pager do you prefer to use with Elm?
- X.sp
- XThis is the standard pager to use for reading messages.
- XBesides the usual system pagers, two Elm specific internal options
- Xexist: builtin and builtin+. The built-in pager is faster to execute
- Xbut much less flexible than the system provided pagers. The + version
- Xjust clears the page before displaying the next page. Otherwise the
- Xtwo versions are identical.
- X.hu Other Configurable Parameters
- X.pg
- XThe following parameters rarely need to be changed, but are provided if
- Xyou need them. \f2Configure\fP does not prompt for their values. To
- Xchange them, edit the \f2hdrs/sysdefs.h\f1 file directly after running
- XConfigure.
- X.lp FIND_DELTA 1.0i
- XThis is the delta that the binary search of the pathalias database
- Xwill use to determine when it's slicing up a single line, rather than
- Xa multitude of lines. Ideally, this should be set to 1 byte less
- Xthan the shortest line in the file...the default is 10 bytes.
- X.lp MAX_IN_WEEDLIST 1.0i
- XThe maximum number of headers that can be specified in the weedout
- Xlist of the \f2.elm/elmrc\f1 file. A suggested alternative approach if this
- Xnumber is too small is to specify initial substrings in the file
- Xrather than increasing the number. For example, say you want to
- Xweedout the headers ``Latitude:'' and ``Latitudinal-Coords:'', you
- Xcould simply specify ``Latitud''" and match them both! Furthermore
- Xyou could also specify headers like ``X-'' and remove all the user
- Xdefined headers!
- X.lp MAX_HOPS 1.0i
- XWhen replying to a G)roup, this is the maximum number of hops that
- Xa message can have taken. This is used to try to optimize the
- Xreturn address (remove cyclic loops and so on) and regular use
- Xshould show that the default of 35 is plenty more than you'll
- Xever need!
- X.lp system_text_file 1.0i
- XThis is the source text file for the system level aliases.
- XSee either the \f2newalias(1L)\f1 man page, or \f2The Elm
- XAlias System Users Guide\f1 for further details.
- X.lp system_hash_file 1.0i
- XThis is the file that contains the hashed version of the system
- Xaliases.
- X.lp system_data_file 1.0i
- XThis is the other file the \f2newalias\f1 command installs in the system
- Xalias area and contains the actual addresses for each of the aliases
- Xcontained in the hashed data file.
- X.lp ALIAS_TEXT 1.0i
- XThis is where the individual users alias text file lives.
- X.lp ALIAS_HASH 1.0i
- XWhere the hashed aliases are stored,
- X.lp ALIAS_DATA 1.0i
- Xand where the alias address data itself is kept.
- X.lp DEBUGFILE 1.0i
- XThe name of the file to put in the users home directory if they choose to
- Xuse the `-d' debug option.
- X.lp OLDEBUG 1.0i
- XThe name of the file to save the previous debug output as. (this feature
- Xwas added to ensure that users wanting to mail bug reports wouldn't
- Xautomatically overwrite the debug log of the session in question)
- X.lp temp_lock_dir 1.0i
- XDirectory for lock files for XENIX.
- X.lp temp_file 1.0i
- XTemporary file for sending outbound messages.
- X.lp temp_form_file 1.0i
- XA place to store temporary forms (for Forms Mode) while answering them.
- X.lp temp_mbox 1.0i
- XPlace to keep copy of incoming mailbox to avoid collisions with newer
- Xmail.
- X.lp temp_print 1.0i
- XFile to use when creating a printout of a message.
- X.lp temp_edit 1.0i
- XFile to use when editing the mailbox file on XENIX.
- X.lp temp_uuname 1.0i
- XWhere to redirect output of the \f2uuname(1M)\f1 command.
- X.lp mailtime_file 1.0i
- XFile to compare date to to determine if a given message is New
- Xsince the last time the mail was read or not.
- X.lp readmsg_file 1.0i
- XFile to use when communicating with the \f2readmsg\f1 program (see
- Xthat program for more information)
- X.lp smflags 1.0i
- XDefines the flags to hand to \f2sendmail\f1 if and when the program
- Xchooses to use it.
- X.lp smflagsv 1.0i
- XDefines the flags to hand to \f2sendmail\f1 in verbose voyuer mode.
- X.lp mailer 1.0i
- XIf you don't have \f2sendmail\f1, this is the mailer that'll be used.
- X.lp helpfile 1.0i
- XThe help file name prefix.
- X.lp ELMRC_INFO 1.0i
- XThe file containing textual messages associated with each
- X\f3Elm\f1 variable setting in the users \f2``.elm/elmrc''\f1
- Xfile. This is used when the user chooses to auto-save the
- Xoptions from within the main program.
- X.lp elmrcfile 1.0i
- XThe name of the automatic control file within the \f2.elm\f1
- Xdirectory. (currently \f2elmrc\f1)
- X.lp old_elmrcfile 1.0i
- XWhen a new elmrc file is saved, the old one is also saved, being
- Xrenamed to whatever this identifier is set to.
- X.lp mailheaders 1.0i
- XThe name of the optional file that users may have that will be
- Xincluded in the headers of each outbound message.
- X.lp dead_letter 1.0i
- XIf the user decides not to send a message it will instead be saved
- Xto this filename in their home directory.
- X.lp unedited_mail 1.0i
- XIn the strange case when the mailer suddenly finds all the directories
- Xit uses shut off (like \f2/usr/mail\f1 and \f2/tmp\f1)
- Xthen it'll put the current
- Xmailbox into this file in the users home directory.
- X.lp newalias 1.0i
- XHow to install new aliases..(note: you MUST have the '-q' flag!)
- X.lp readmsg 1.0i
- XWhat the \f2readmsg(1L)\f1 program is installed as.
- SHAR_EOF
- chmod 0444 doc/Config.guid || echo "restore of doc/Config.guid fails"
- echo "x - extracting doc/Elm.cover (Text)"
- sed 's/^X//' << 'SHAR_EOF' > doc/Elm.cover &&
- X.\" @(#)$Id: Elm.cover,v 4.1 90/04/28 22:41:01 syd Exp $
- X.\"
- X.\" Cover sheet for the ELM mail system...
- X.\" format with
- X.\" troff tmac.n Elm.cover > Coversheet.fmtd'
- 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: Elm.cover,v $
- X.\" Revision 4.1 90/04/28 22:41:01 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 8
- X.lg 0
- X.nf
- X.na
- X.rs
- X.za
- X.sv |3.0i
- X.ce 99
- X.ps 25
- X\fBThe \s26Elm\s25 Mail System\fR
- X.sp 2
- X.ps 14
- X.ss 16
- X.vs 16
- X\fIA Replacement Mailer for All Unix Systems\fR
- X.sp 3
- XDave Taylor
- X.sp
- XHewlett-Packard Laboratories
- X1501 Page Mill Road
- XPalo Alto CA
- X94304
- X.sp
- Xemail: taylor\s12@\s14hplabs \ or \ hplabs!taylor
- X.sp 4
- 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
- SHAR_EOF
- chmod 0444 doc/Elm.cover || echo "restore of doc/Elm.cover fails"
- echo "x - extracting doc/Filter.guid (Text)"
- sed 's/^X//' << 'SHAR_EOF' > doc/Filter.guid &&
- X.\" @(#)$Id: Filter.guid,v 4.1 90/04/28 22:41:03 syd Exp $
- X.\"
- X.\" A guide to the Elm Filter program
- X.\" format with:
- X.\" 'tbl tmac.n Filter.guid | troff > Filter.format'
- X.\"
- X.\" (C) Copyright 1986, 1987 Dave Taylor
- X.\" (C) Copyright 1988, 1989, 1990 Usenet Community Trust
- 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.\" $Log: Filter.guid,v $
- X.\" Revision 4.1 90/04/28 22:41:03 syd
- X.\" checkin of Elm 2.3 as of Release PL0
- X.\"
- X.\" Revision 3.8 90/03/26 15:12:06 syd
- X.\"
- X.tm Have we been run through "tbl" first?? I hope so!
- 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 8
- X.lg 0
- X.nf
- X.na
- X.rs
- X.za
- X.sp |3.0i
- X.ce 99
- X.ps 20
- X.ss 18
- X.vs 12
- X\f3The Elm Filter System Guide\f1
- X.sp 4
- X.ps 12
- X.ss 14
- X.vs 14
- X\f2What the filter program is, what it does,
- Xand how to use it\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\f3The Elm Filter System Guide\f1
- X.ds h0 "Elm Filter Guide
- 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
- 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
- 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.pg
- XOne of the greatest problems with the burgeoning electronic mail
- Xexplosion is that I tend to get lots of mail that I don't care about.
- XAmusingly, perhaps, I have the equivalent of electronic junk mail.
- XNot amusing, however, is the fact that this can rapidly
- Xaccumulate and end up taking over my mailbox.
- X.pg
- XAt the same time I often get mail that, while it is interesting
- Xand important, can easily be filed to be read later, without ever
- Xactually having to cluttering up my incoming mailbox.
- X.sp 2
- XThis, then, is what \f2filter\f1 does! The \f2filter\f1 program
- Xallows you to define a set of rules by which all incoming mail should
- Xbe screened, and a subsequent set of actions to perform based on whether
- Xthe conditions were met or not. \f2Filter\f1 also has the ability to mail
- Xa summary of what actions it performed on the incoming mail as often as
- Xyou'd like.
- X.ne 5
- X.hu Writing the Rules
- X.sp
- XThe language for writing \f2filter\f1 rules is pretty simple, actually.
- XThe fundamental structure is;
- X.nf
- X.ti .5i
- Xif (\f2condition\f1) then \f2action\f1
- X.fi
- XWhere \f2condition\f1 is constructed by an arbitrary number of
- Xindividual conditions of the form ``\f2field\f1 \f2relation\f1 \f2value\f1''.
- X(an optional further type of rule is of the form ``always \f2action\f1''
- Xbut should only be used as the last rule in the ruleset, for obvious
- Xreasons).
- XThe \f2field\f1 value can be;
- X.nf
- X.in .5i
- Xsubject
- Xfrom
- Xto
- Xlines
- Xcontains
- X.in 0
- X.fi
- Xwhere, if ``lines'' is chosen, the \f2relation\f1 can be any of the
- Xstandard relationships (`>', `<', `>=', `<=', `!=' and `=').
- XIf another action is
- Xchosen, ``contains'' can be used as the relation, ``='', or, if you'd
- Xlike, you can skip the relationship entirely (e.g. `subject "joe"').
- XThe \f2value\f1 is any quoted string that is to be matched against
- Xor number if ``lines'' is the field being considered.
- X.sp
- XIndividual conditions are joined together by using the word ``and'',
- Xand the logic of a condition can be flipped by using ``not'' as the
- Xfirst word (e.g. `not subject "joe"'). We'll see more examples of
- Xthis later.
- X.sp
- XNote that the ``or'' logical conjunction isn't a valid part of the
- X\f2filter\f1 conditional statement.
- X.sp
- XFinally, <\f2action\f1> can be any of;
- X.nf
- X.in .5i
- Xdelete
- Xsave \f2foldername\f1
- Xsavecopy \f2foldername\f1
- Xforward \f2address\f1
- Xexecute \f2command\f1
- Xleave
- X.in 0
- X.fi
- Xwhere they result in the actions; \f3delete\f1 deletes the message;
- X\f3save\f1 saves a copy of the message in the specified foldername;
- X\f3savecopy\f1 does the same as save, but also puts a copy in your mailbox;
- X\f3forward\f1 sends the message to the specified address;
- X\f3execute\f1 feeds the message to the specified command (or complex
- Xsequence of commands) as standard input;
- Xand \f3leave\f1 leaves the message in your mailbox.
- X.sp
- XFoldernames can contain any of a number of macros, too, as we'll see in
- Xthe example ruleset below. The macros available for the string fields are;
- X.ft CW
- X.zf
- X.TS
- Xcenter;
- Xlf3 lf3
- Xl l.
- XMacro Meaning
- X.ft CW
- X.zf
- X%d day of the month
- X%D day of the week (0-6)
- X%h hour of the day (0-23)
- X%m month of the year (0-11)
- X%r return address of message
- X%s subject of original message
- X%S ``Re: \f2subject of original message\fP''
- X.ft CW
- X.zf
- X%t current hour and minute in HH:MM format
- X%y year (last two digits)
- X.TE
- X.ft 1
- X.sp
- XThe rules file can also contain comments (any line starting with a `#')
- Xand blank lines.
- X.sp
- XThe file itself needs to reside in your .elm directory off your home directory and be
- Xcalled \f2.elm/filter-rules\f1. Here's an example:
- X.nf
- X.ft CW
- X.zf
- X # $HOME/.elm/filter-rules
- X #
- X # Filter rules for the Elm Filter program. Don't change without some
- X # serious thought. (remember - order counts)
- X #
- X # (for Dave Taylor)
- X # rule 1
- X if (from contains "!uucp") then delete
- X # rule 2
- X to "postmaster" ? save "/tmp/postmaster-mail.%d"
- X # rule 3
- X if (to "culture" and lines > 20) ? save "/users/taylor/Mail/culture"
- X # rule 4
- X subject = "filter test" ? forward "hpldat!test"
- X # rule 5
- X if [ subject = "elm" ] savecopy "/users/taylor/Mail/elm-incoming"
- X # rule 6
- X subject = "display-to-console" ? execute "cat - > /dev/console"
- X.fi
- X.ft 1
- X(notice the loose syntax \(em there are lots of valid ways to specify a
- Xrule in the \f2filter\f1 program!!)
- X.sp
- XTo translate these into English;
- X.sp
- X.nr TW \w'1. 'u
- X.in .5i
- X.ti -\n(TWu
- X1. All messages from uucp should be summarily deleted.
- X
- X.ti -\n(TWu
- X2. All mail to postmaster should be saved in a folder (file) called
- X/tmp/postmaster-mail.\f2numeric-day-of-the-week\f1
- X
- X.ti -\n(TWu
- X3. All mail addressed to `culture' with at least 20 lines
- Xshould be automatically appended to the folder
- X/users/taylor/Mail/culture.
- X
- X.ti -\n(TWu
- X4. All messages that contain the subject `filter test' should be forwarded to
- Xme, but via the address `hpldat!test' (to force a non-user forward)
- X
- X.ti -\n(TWu
- X5. All messages with a subject that contains the word `elm' should be saved in
- Xthe folder ``/users/taylor/Mail/elm-incoming'' and also dropped into my
- Xmailbox.
- X
- X.ti -\n(TWu
- X6. Any message with the subject ``display-to-console'' will be immediately
- Xwritten to the console.
- X.in 0
- X.sp
- XNotice that the \f2order\f1 of the rules is very important. If we, for
- Xexample, were to get a message from `uucp' that had the subject `filter test',
- Xthe \f2filter\f1 program would match rule 1 and delete the message. It
- Xwould never be forwarded to `hpldat!test'. It is for this reason that
- Xgreat care should be taken with the ordering of the rules.
- X.ne 5
- X.hu Checking the rules out
- X.sp
- XThe \f2filter\f1 program has a convenient way of check out the rules you
- Xhave written. Simply invoke it with the \f3-r\f1 (\f3r\f1ules) flag;
- X.nf
- X.in .5i
- X% \f3filter -r\f1
- X.ft CW
- X.zf
- X.in .5i+\w'Rule 1: 'u
- X.ti .5i
- XRule 1: if (from = "!uucp") then
- XDelete
- X.ti .5i
- XRule 2: if (to = "postmaster") then
- XSave /tmp/postmaster-mail.<day-of-week>
- X.ti .5i
- XRule 3: if (to = "culture" and lines > 20) then
- XSave /users/taylor/Mail/culture
- X.ti .5i
- XRule 4: if (subject = "filter test") then
- XForward hpldat!test
- X.ti .5i
- XRule 5: if (subject="elm") then
- XCopy and Save /users/taylor/Mail/elm-incoming
- X.ti .5i
- XRule 6: if (subject="display-to-console") then
- XExecute "cat - > /dev/console"
- X.ft 1
- X.in 0
- X.fi
- X.sp
- X.ft 1
- XThere are a few things to notice \(em first off, these are the parsed and
- Xrebuilt rules, so we can see that they are all in a
- Xconsistent format. Also, notice on the filename for rule 2 that the
- Xprogram has correctly expanded the ``%d'' macro to be the day of the
- Xweek.
- X.sp
- XIt is \f3highly\f1 recommended that you always check your ruleset before
- Xactually letting the program use it!
- X.ne 5
- X.hu Actually Using the Program
- X.sp
- XNow the bad news. If you aren't running \f2sendmail\f1 you cannot use
- Xthis program as currently written. Why? Because the \f2filter\f1
- Xprogram expects to be put in your \f2.forward\f1 file and that is something
- Xthat only \f2sendmail\f1 looks at!
- X.sp
- XThe format for the entry in the \f2.forward\f1 file (located in your
- Xhome directory) is simply;
- X.nf
- X.ti .5i
- X"| /usr/local/bin/filter"
- X.fi
- XAllright, it isn't quite \f2that\f1 simple! Since \f2filter\f1 will be invoked
- Xby processes that don't know where you are logged in, you need to have some
- Xway to trap the error messages. For ease of use, it was decided to have all
- Xthe messages written to the file specified by `-o' (or \f2stderr\f1)
- Xwhich means that you have two main
- Xchoices for the actual entry. Either;
- X.nf
- X.ti .5i
- X"| /usr/local/bin/filter -o /dev/console"
- X.fi
- Xwhich will log all errors on the system console (each error is prefixed with
- X``filter (\f2username\f1)'' to distinguish it), or;
- X.nf
- X.ti .5i
- X"| /usr/local/bin/filter -o /tmp/joe.filter_errors"
- X.fi
- XIf you want to have a copy saved to a file. Note that the quotes are a required
- Xpart of the line. A possible strategy would be
- Xto have the errors written to a file and to then have a few lines in
- Xyour \f2.login\f1 script like:
- X.nf
- X.ft CW
- X.zf
- X.in .5i+\w'if 'u
- X.ti .5i
- Xif ( -f /tmp/joe.filter_errors) then
- Xecho "\ \ "
- Xecho "Filter program errors;"
- Xcat /tmp/joe.filter_errors
- Xecho "\ \ "
- X.ti .5i
- Xendif
- X.ft 1
- X.in 0
- X.ft 1
- X.fi
- XYou can also use the \f3-v\f1 flag in combination with the above to have
- Xa more verbose log file saved by having
- Xyour \f2.forward\f1 file;
- X.nf
- X"| /usr/local/bin/filter -vo /tmp/joe.filter_errors"
- X.fi
- XSuffice to say, you can get pretty tricky with all this!!
- X.ne 5
- X.hu Summarizing the Actions Taken
- X.sp
- XThe \f2Filter\f1 program keeps a log of all actions performed, including
- Xwhat rules it matched against, in your .elm directory in a file
- Xcalled \f2.elm/filterlog\f1. You can either directly operate on this file,
- Xor, much more recommended, you can one of the two summarize flags to
- Xthe program and let \f2it\f1 do the work for you!
- X.sp
- XThe difference between the two is best demonstrated by example:
- X.nf
- X% \f3filter -s\f1
- X.ft CW
- X.zf
- X.in .5i
- X Summary of Filter Activity
- X \l'\w'Summary of Filter Activity'u-'
- XA total of 418 messages were filtered:
- XThe default rule of putting mail into your mailbox
- X.in .5i+\w'Rule #1: 'u
- Xapplied 364 times (87%)
- X.ti .5i
- XRule #1: (delete message)
- Xapplied 1 time (0%)
- X.ti .5i
- XRule #2: (save in "/users/taylor/Filtered-Mail/netnews.12")
- Xapplied 8 times (2%)
- X.ti .5i
- XRule #3: (save in "/users/taylor/Filtered-Mail/postmaster.12")
- Xapplied 14 times (3%)
- X.ti .5i
- XRule #5: (save in "/users/taylor/Filtered-Mail/risks.12")
- Xapplied 3 times (1%)
- X.ti .5i
- XRule #6: (save in "/users/taylor/Filtered-Mail/rays.12")
- Xapplied 28 times (7%)
- X.ft 1
- X.ti 0
- Xversus:
- X.ti .5i
- X% \f3filter -S\f1
- X.ti .5i
- X\f2the output as listed above, followed by:\f1
- X.ft CW
- X.zf
- X.ti .5i
- XExplicit log of each action;
- X.ti .5i
- XMail from taylor about Filter Summary
- XPUT in mailbox: the default action
- X.ti .5i
- XMail from news@hplabsz.hpl.hp.com about Newsgroup comp.editors created
- XPUT in mailbox: the default action
- X.ti .5i
- XMail from root about Log file: cleanuplog
- XPUT in mailbox: the default action
- X.ft 1
- X.ti .5i
- X[etc etc]
- X.in 0
- X.ft 1
- X.fi
- XTo actually use either of the summarizing options, there
- Xare two ways that are recommended;
- X.sp
- XThe preferred way is to have a line in either your \f2crontab\f1
- X(ask your administrator for help with this) that invokes the \f2filter\f1
- Xprogram as often as you desire with the \f3-s\f1 flag. For example, I
- Xhave a summary mailed to me every morning at 8:00 am:
- X.nf
- X.ft CW
- X.zf
- X 0 8 * * * "/usr/local/bin/filter -s | elm -s 'Filter Summary' taylor"
- X.fi
- X.sp
- X.ft 1
- XAn alternative is to have your \f2.login\f1 execute the command each time.
- X.sp 2
- XNote that if you want to have your log files cleared out each time the
- Xsummary is generated you'll need to use the '-c' flag too. Also,
- Xif you want to keep a long list of actions performed you can do this
- Xby saving it as you display it. A way to do this would be, if you were to
- Xhave the invocation in your \f2.login\f1 script, to use:
- X.nf
- X.in .5i
- X.ft CW
- X.zf
- Xecho "Filter Log;"
- Xfilter -c -s | tee -a PERM.filter.log\f1
- X.ft 1
- X.in 0
- X.fi
- Xwhich would append a copy of all the output to the file `PERM.filter.log'
- Xand would avoid you having to read larger and larger summaries of
- Xwhat the program had done.
- X.ne 5
- X.hu Further Testing of the Ruleset
- X.sp
- XWith the \f2readmsg\f1 command available, it is quite easy to test the
- Xrules you've written to see if they'll do what you desire.
- X.sp
- XFor example, we can use the \f3-n\f1 flag to \f2filter\f1, which means
- X`don't actually do this, just tell me what rule you matched, if any, and
- Xwhat action you would have performed' (you can see why a single letter
- Xflag is easier to type in!!), and feed it each message in our mailbox
- Xby using a command like;
- X.nf
- X.in .5i
- X% \f3set message=1\f1
- X% \f3set total_messages=`messages`\f1
- X% \f3while (1)\f1
- X> \f3if ($message > $total_messages) exit\f1
- 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
- chmod 0444 doc/Filter.guid || echo "restore of doc/Filter.guid fails"
- 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
- echo "End of part 4"
- echo "File doc/Form.guide is continued in part 5"
- echo "5" > s2_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
-