
                               M A I L _ E D I T

                               -by Harry Flowers


Mail_Edit provides stripping internal foreign mail headers, quoting, spelling
correction (not for captive users), and appending a signature file.  It must
be installed by the system manager, though you can edit the build and startup
to run for a single user.


           Files        Description
---------------------	-----------------------------------------------------

     MAIL_EDIT.README -	This text file.
        MAIL_EDIT.TPU -	Source TPU program
MAIL_EDIT_MASTER.FILE - Input for EVE$BUILD
MAIL_EDIT_VERSION.DAT - Input for EVE$BUILD
       MAIL_EDIT.INIT - Created by EVE$BUILD
       MAIL_EDIT.LIST - Created by EVE$BUILD
  BUILD_MAIL_EDIT.COM - Command file to build the system from sources, copy
			the files to their target directories, and execute
			the startup.
MAIL_EDIT_STARTUP.COM -	Startup command file for MAIL_EDIT.

-----------------------------------------------------------------------------

The setup:

 1) Install Vassar (a.k.a. DECUS) spelling corrector.  The version on
    ftp.spc.edu in [.MACRO32.SAVESETS] will do nicely.  If you already
    have DECspell, you may use it instead.  If you use the Vassar package,
    make sure and create a logical LNGSPLCOR that points to (any) file, or
    create a dummy SYS$COMMON:[SYSEXE]LNGSPLCOR.EXE file.  Doing this will
    also allow you to use the EVE SPELL command on any file you edit in a
    non-captive account (it also checks for this file).

 2) Edit MAIL_EDIT.TPU and make any site-specific changes to the constants
    that are necessary.  The constants that you may wish to change are all
    together near the top of the file, and are defined like this by default:

	Quote_Prefix	 := ">",			! Quoting
	Mailer_Prefix	 := "IN%",			! Mailer
	Signature_File	 := "SYS$LOGIN:MAIL_EDIT.SIG",	! Sig file
	Ignore_Signature := "/NOSIG"			! Don't append
	! the signature if this occurs on the last line (line is deleted)

    For example, if you're using MX, you'll want to change "IN%" to "MX%".
    If you're already stripping internal mail headers or moving them to the
    bottom of the mail message, then change it to something like "NoWay%".
    If the signature file isn't found, no error is given, it just doesn't
    get appended.

 3) View BUILD_MAIL_EDIT.COM and make sure you don't have any problems with
    what it does, then execute it.  It copies MAIL_EDIT.TPU$SECTION to
    SYS$SHARE, and copies the startup command file MAIL_EDIT_STARTUP.COM to
    SYS$STARTUP and executes it.

 4) Add MAIL_EDIT_STARTUP.COM to your site-specific startup command file.

 5) Here there are several options.  If your users are running mail
    from a command file, you can put the commands described later in the
    command file, and MAIL_EDIT will only effect that one function.
    Alternately, you can uncomment the system-wide definition in the
    SYS$STARTUP:MAIL_EDIT_STARTUP.COM defining TPU$SECTION as MAIL_EDIT.
    Then, whenever someone uses TPU, they'll get the new MAIL_EDIT version
    of EVE.  All the regular EVE commands are still there, so this shouldn't
    cause any problems.  Each time a file is edited, MAIL_EDIT checks to see
    if it looks like a VMS MAIL or ANU NEWS file before it does anything
    different.  It's possible, of course, to fake it out by using similar
    file names, but not likely by accident (most people don't even use the
    /OUTPUT qualifier).

    Basically, you'll want the equivalent of the following to be done before
    the user invokes mail:

    a) Probably in your system-wide login command file, you'll want the
       following symbol definition:

       $ MAIL = "MAIL/EDIT=(SEND,REPLY=EXTRACT,FORWARD)" ! (FORWARD optional)

       This tells VMS MAIL to invoke the editor for these commands, and to
       place the original text in the message for replies as well.  The
       "FORWARD" part may not be desired; I often use "MAIL> FORWARD/NOEDIT"
       when I wish to suppress the quoting and editing of messages I forward.

    b) You need to define TPU$SECTION to be MAIL_EDIT at some point, whether
       at boot time with a system logical, or before they use MAIL with a
       process logical.  You'd use something like *one* of the following:

       [In SYS$MANAGER:SYLOGICALS.COM or SYS$STARTUP:MAIL_EDIT_STARTUP.COM]
       $ DEFINE/SYSTEM TPU$SECTION MAIL_EDIT ! Use MAIL_EDIT system-wide
       
       [In SYS$LOGIN:LOGIN.COM or equivalent]
       $ DEFINE        TPU$SECTION MAIL_EDIT ! Use MAIL_EDIT for this process

       [In a command file that invokes mail]
       $ DEFINE/USER   TPU$SECTION MAIL_EDIT ! Use MAIL_EDIT now invoking MAIL
       $ DEFINE/USER   SYS$INPUT   SYS$COMMAND
       $ MAIL
       
    c) If you want to make TPU the preferred editor (primarily for VMS
       V5.5-2 or earlier versions), you might wish to define MAIL$EDIT
       to be CALLABLE_TPU

       $ DEFINE MAIL$EDIT CALLABLE_TPU ! Use TPU instead of EDT, etc.

       If you define this system-wide, then any SET EDITOR commands within
       MAIL will only apply to the current session, which you may not wish
       to do.

-----------------------------------------------------------------------------

BTW, if you're an EDT fan, you can create an EVE$INIT.EVE file with the
    following lines in it, and define a logical EVE$INIT to point to it:

    SET KEYPAD EDT
    TPU SET(MOUSE,OFF)

    which will give you the EDT keypad, and turn off TPU's annoying
    DECterm "feature" of not letting you copy text out of it, but just
    moving the cursor to where the mouse is.  Of course, you're on your
    own for reprogramming commands in EDTINI.EDT... ;-)

-----------------------------------------------------------------------------

Harry Flowers                           Internet: FLOWERS@NARNIA.MEMPHIS.EDU
The University of Memphis, 112 Administration Bldg., Memphis, TN 38152 (USA)
