
   TkMail v1.6 -- A Tk/Tcl interface to Mail
	    		by Paul Raines (raines@bohr.physics.upenn.edu)

   TkMail is an X windows interface to the unix Mail command built
   using Tk/Tcl.  Reading, sending, and managing mail messages can
   almost all be done using only the mouse (except for the body of the
   message, of course).  TkMail depends on the unix 'Mail' and
   'sendmail' commands to do the real network mail work. It puts the X
   window interface on top and adds some additional features.

   Major Features:
	- listbox interface to messages for easy click and read
	- viewed messages are editable inside viewing widget so
	  one can add or delete text for printing or piping X selections
	- dynamic (at startup) menus for quick access to mail folders
	  for reading, copying, and moving messages
	- button bar for quick composing, replying to, and forwarding of
	  mail messages
	- built in 'biff' icon for notification of new mail
	- easy inclusion of files into message compositions with
	  automatic uuencoding and compression, if desired
	- access alternate editor for compositions to send
	- spell check compositions using a X windows interface
	  (must have the ispell program version 3.0.09, not 4.0!)
	- reads aliases from either standard .mailrc or elm aliases.txt
	- easy piping of message text through unix filters
	- emacs-like key-bindings for text editing

   Unfortunately, the Mail program is not standard across all
   platforms or even versions of operatings systems, so don't trust
   TkMail without testing!  Make a backup copy of your ~/mbox file and
   some of your folders and then test out the features on those files.

   See the USER SETTINGS section below to get a real feel for
   what TkMail can do.

COMPATIBILITY:
     I developed this app on Linux, Sun, and IBM workstations.  Please
     read the README file about the Mail tests that came with the
     tkmail distribution to see how to test compatiblity. This app
     depends on Mail accepting piped input as in the following:

         echo "h 1" | Mail -N -f folder

     This lists the headers of messages in folder to standard out. 
     The following

         echo "2" | Mail -N -f folder

     displays message 2 on stdout. Other mail commands used are
     folder, save, delete, new, size, top, from, set, x, and q.
     TkMail expects mail to be saved in files where the messages are
     denoted by lines beginning with the word From or >From.  The test
     target for the Makefile will perform a fairly exhaustive test to
     see if TkMail will work on your system.

     Also, TkMail depends on mail delivery program like 'sendmail'
     such that the following

         cat file | sendmail -bm -t

     mails file to users in To:, Cc:, and Bcc: fields. This bypasses
     the Mail command and therefore options such as 'record'.  I have
     created the mf(mail-record) user setting to account for this. It
     might be necessary to hack the mf_recordmsg procedure in
     compose.tk to make it fit your mail folder format.

     I you find other Mail options that are bypassed by sendmail and
     you want them included in TkMail, please mail me about it.  I
     need to use sendmail for arbitrary header definition.

     IMPORTANT: If you use the 'ignore' or 'retain' commands in your
     .mailrc file, please read the section HEADER FIELD STRIPPING
     below.

     Also, TkMail sets the 'append' variable in Mail to maintain
     sanity. If you prefer append to be unset, TkMail will still work,
     but will wrongly jump to the end of your ~/mbox listing when it
     incorporates new mail. There is a mf(headlist-reverse) variable
     for those who prefer their mail in reverse time order.

     TkMail calls the following standard UNIX programs that must be in
     your path: ls, cat, touch, whoami, sort, rm, uudecode, mkdir and
     date.
    
     You can change the name of the Mail and sendmail command in the
     user settings below, but it must support the structure above.  If
     you find that you have to make changes to the code to get it to
     work on your machine, please e-mail me and tell me what machine
     you are on and what changes you made.

GENERAL USAGE:

     From your unix command line, type

     	tkmail [-i] [-l lib_dir] [-g set_file] [-p dot_file] [folder] &

	-i		Start TkMail in iconic mode
	-l lib_dir	Directory containing TkMail support files
	-s set_file	File to source for global settings
	-p dot_file	File to source for personal settings.
	folder		Initial mail folder to read

     If you do not specify a folder, your ~/mbox will be shown.

     Most things in the menu should be self evident (yeah...that is
     what they always say). A few menu items are also on the button
     bar. Many menu items can be accessed with accelerator characters
     using the Alt key or Alt-Shift keys.  Also F10 will let you do
     keyboard traversal of the menu.

     Because of the hassle of dealing with the system inbox, I have
     the app incorporate new mail into the ~/mbox instead of treating 
     it as just another folder. This will probably change in a future
     release.

     When you get new mail, just click the 'Incorp' button and you
     will be taken to the ~/mbox folder at the first new message.  The
     ~/mbox serves as the central place to dish out messages to your
     folders using the copy and move menu items. If you set
     mf(mail-auto-incorp) to '1', TkMail will automatically
     incorporate new mail if it is in the iconic state.

     If a ~/.tkmail or ~/tk/tkmail file exists, they are sourced so
     that the individual user can change the User Settings described
     below. This resource file name can be overridden with the -p
     option.  This file provides the ability to do powerful
     customization to TkMail for the knowledgable Tcl/Tk programmer.

     One can define a procedure called mf_compose_hook in these files
     that will be evaluated each time a compose message window is
     created. Another procedure called mf_viewer_hook can be defined
     which will be evaluated one the main viewer is built. See the
     included example.tkmail.

     The viewed message will always have the '>' character in front of
     it.  The Delete, Copy, Move, Save, and Print commands operate on
     all selected messages. The Reply and Forward operate on only the
     currently viewed one.

     For efficiency and undo ability, deletes are not done
     immediately.  Deletes are processed when changing folders or
     quitting. This means that if the something kills TkMail, any
     impending deletes are not done. This most often happens when
     someone quits their window manager without first quiting TkMail.
     At this point, I do not know how to trap this situation and would
     appreciate anyone who could show me how.

     For most mail operations, a check is made to make sure that the
     current folder has not been externally modified.  This often happens
     when someone runs two TkMail's or TkMail and a separate Mail session.

ALIASES:

     TkMail can parse either BSD or elm aliases files at startup. Which
     one is used depends on the settings of the mf(mail-alias-file) and
     mf(mail-alias-type) variables.  To use aliases in your ~/.mailrc
     file, put the following in your ~/.tkmail file
         set mf(mail-alias-file) $env(HOME)/.mailrc
	 set mf(mail-alias-type) bsd

     To use aliases in the elm alias file ~/.elm/aliases.text, put
     the following in your ~/.tkmail file
         set mf(mail-alias-file) $env(HOME)/.elm/aliases.text
	 set mf(mail-alias-type) elm

     Alias resolution is recursive, so aliases may contain other aliases.

     If you wish to have a default machine address appended to addresses
     that do not include one, use the mf(compose-addr-postfix) settings.
     For example, the following would append @slac.stanford.edu to addresses
     without a @machine part
         set mf(compose-addr-postfix) {@slac.stanford.edu}
     This is done after alias expansion so only true mail addresses will
     get appended.

     NOTE: sendmail will not send the mail to any of the users
     listed if any one of them is not valid.

MOUSE BINDINGS:

     Mouse bindings in the header list box are:
         B1 Click - view clicked message and make it the sole selection
         B1 Drag - select additional messages for later possible operations.
	 B2 Click - unselect message clicked
	 B2 Drag - do quick scan (scrolling) of list
         B3 Click - select message clicked with viewing.
         B3 Drag - select all messages dragged over.
         Shift B3 Click - unselect message clicked if not the viewed one.
         Shift B3 Drag - unselect messages dragged over

     Mouse bindings in the message and compose window are normal Text
     bindings.  B2 will insert the current selection and B3 will
     unselect it.  Alt-Shift-B2 will insert the current selection with
     the mail prefix. See the Tk 'text' man page for more info.

     Using B3 on the Reply button will cause the message to be
     automatically included in the compose text. Using B3 on the
     Compose button will do the same but leave the To: field blank
     (for Forwarding with editing). B2 on these buttons does the
     operation as B3 except that no prefixing of including text is
     done. This can be used to "bounce" mail.

KEY BINDINGS:

     Most menu item can be accessed through keystrokes by using the F1
     key followed by the letter in brackets next to the item. This
     prefix key can be changed using the mf(menu-key) setting. If the
     accelerator letter is in uppercase, the Shift key is required.
     Pressing F10 will let you traverse the complete menu with the
     arrow keys. See the example.tkmail file to on how to set your own
     key settings.

     The reason for the awkward use of F1 for this function is so that
     menu accelerator keys do not conflict with emacs key definitions.
     Set the mf(bind-emacs) variable to '1' to get the typical emacs
     bindings for Control a,e,f,b,n,p,o,d,k,w,y and space. Also, the
     Escape key as a prefix or the Alt key as a modifier for f,b,d,w,
     and y. Arguments are supported and along with Control u for
     univeral argument.  The kill ring contains a maxium of 10
     deletions.  If a region of the text is selected with the mouse,
     Control-w will cut it and Alt-w will copy it onto the kill-ring.
     Control-y will paste it and Control-Y will paste prefixed by
     the value of the mf(insert-prefix) setting.

     Very primitive auto-wrapping is supported with the emacs
     bindings.  Once you are at the column where you wish the text to
     wrap, type "Control-x f".  To return to no wrapping, do a
     "Control-x f" when the cursor is in column zero.  Setting for one
     text widget will set it for all text widgets. If you want
     wrapping always set to a certain column, put a line like the
     following in your ~/.tkmail file
	set btp(fillcol) 65

     If wish to have only the Escape bindings, you can put the
     following line in your ~/.tkmail file
	set btp(use-meta) 0
     to prevent bindings with the Alt key for emacs functions.
     This might be necessary for non-English keyboards to access
     special characters.

     If you choose not to set the emacs bindings, then Alt-x will cut
     the current mouse selection, Alt-c will copy it, and Alt-v will
     paste it.  Alt-V will paste the cut prefixed by the value of the
     mf(insert-prefix) setting.

     Control-Shift-S will pop up a window to enter a string for searching
     in the current Text widget. Control-s will search again. Only the
     forward direction is supported.

     Control-Home goes to top of text, Control-End to the
     end. Control-Left and Control-Right move by words. Home goes to
     the beginning of the line and End goes to the end.  PageUp,
     PageDown, and the arrow keys do their obvious operations.

VIEWER MENU:

     Folder:	Open...		Select new folder to view
		Quit		Quit TkMail (processes deletions)
		Main Box	View main mail box (usually ~/mbox)
		Incorporate	Incorporate new mail from system box
		Process Del	Process messages marked for deletion
		Rebuild Menu	Rebuilds dynamic folder menus
		Reread Alias	Reread your alias file
		Recent		A menu of recently accessed folders to view
		<Folders>	List of folders in folder directory to open
				  Directories will become pull right menus
		++chopped++	If presents, signals that there where more
				folders present that could not be put in menu

     Edit:	Cut		Cut selection into private buffer
		Copy		Copy selection into private buffer
		Paste		Paste private buffer at insert mark
		Search Mesg	Search the message for a string
		Search Header   Search the headers for a string
		Search Again	Repeat last search command
		Save X Sel	Select file to current X selection to
		Print X Sel	Select printer command to print X selection to
		Eval TCL X Sel	Evaluate the current X selection as Tcl
		Pipe UNIX X Sel	Pipe the current X selection through a UNIX cmd
				  and choose what to do with results

     Mesg:	Next		View next message in list
		Prev		View previous message in list
		Delete		Mark selected messages for deletion
		Undelete All	Unmark messages mark for deletion
		Copy =>		Show folders to copy selected messages to
		Move =>		Show folders to move selected messages to
		Save		Select file to save message to
		Print		Select printer command to print messages with
		Quick Decode    Search mesg for uuencode enclosures,
				 and decode them

     Mail:	Compose		Popup window to compose new message
		Reply		Popup window to reply to current message
		Forward		Forward selected messages to a user
		Gripe		Mail a gripe message to author
		Restore Last	Restore last composition window 
		<Names>		List of addresses in mf(menu-quick-send)

     Options:   Reverse Order	    toggle mf(headlist-reverse)
		Format Headers      toggle mf(headlist-format)
		Auto Incorp	    toggle mf(mail-auto-incorp)
		Save Last Send      toggle mf(compose-save-send)
		Ask on Long Mesg    toggle mf(mail-read-ask)
		Full Addr for <S>   toggle mf(menu-sender-full)
		Strip Hdr on Ins    toggle mf(insert-strip)
	        Parse MIME:         toggle mf(header-mime) # not useful yet
		All Settings        popup text window to edit almost all 
				    settings in a Tcl script

     Help:	<Sections>	    popup window displaying section from help.txt
		Show Log	    popup window showing logging of actions

<Sender> MENU ITEM:

     The <Sender> menu item under Mesg:Copy and Mesg:Move will copy or
     move the message into a folder in the mf(mail-directory) with the
     a filename determined by the sender's email address. By default,
     the filename is the part of the address before the '@'. The whole
     address will be used if mf(menu-sender-full) is set to 1.  Also,
     all letters of the resulting string are convert to lowercase.

     This default can be overridden by setting mf(menu-sender-list) to a
     list of email address/filename pairs where the addresses can be regular
     expressions.  For example

	set mf(menu-sender-list) {{jerry@.*\.com jerryd} {jerry@.*\.edu jerryt}}

     will map the addresses with login name 'jerry' and machine names that 
     end in '.com' to the file jerryd, and addresses with the login name
     'jerry' and machine names that end in '.edu' to the file jerryt. 

     When a message is selected in the viewer, the status line will
     state the file which will be used for <Sender> operations after
     the word 'from'.  If multiple messages are selected, all messages
     will be saved to that file. Individual <Sender> processing is not
     done on each file.
     

COMPOSE MENU:

     File:	Insert File...	Select a file to insert into composition
				   - can encode, compress, and prefix
		Insert Mesg...  Select messages to insert into composition
		Send		Mail the composition
		Cancel		Kill the window and don't send
		Alt Editor	Bring up alternate editor

     Edit:	Cut		Cut selection into private buffer
		Copy		Copy selection into private buffer
		Paste		Paste private buffer at insert mark
		Expand Aliases  Do alias expansion on contents of entry widgets
		Ispell		Run tkispell on composition
		Eval TCL Sel	Evaluate the current X selection as Tcl
		Pipe UNIX Sel	Pipe the current X selection through a UNIX cmd
				  and choose what to do with results
		Show Cc/Bcc	Toggle on/off the Cc/Bcc entries
		Show Fcc	Toggle on/off the Fcc entry

     When you run the alternate editor, the Alternate Editor button on the
     bottom of the screen will change to say Finished AltEdit. If the
     send command does not work because of xauth security, you must press
     this button to get the changes from the alternate editor.

PRINTING:

     Note that there are two Print menu items. One prints the current
     X selection and the other prints the currently selected mail
     messages. Both prompt the user for a unix print command that can
     be used to print the temporary file to which text has been
     written.  In this command line, the following printf style
     substitutions will be made (evaluated in this order):

	   %F	the name of the temporary file for printing. If
		it is ommitted, the name fo the temporary file
		will be appended to the end of the command line.
	   %D   The send date of the currently selected message.
	   %W   The sender (From) of the currently selected message.
	   %S   The subject of the currently selected message.

     In order to account for Tcl style parsing of whitespace, you
     must surround the complete token where %S, %W and %D are used
     with curly braces. For example:

           enscript {-b%S} -plw2 %F

     It is important to understand Tcl syntax rules if you plan to
     use the $,{},"", or \ characters in your command line. In general,
     where at the unix shell, you would normally do

	   -b"A quoted string"

     you should use

           {-bA quoted string}

     If you make any edits in the window of the currently displayed
     message, they will be reflected in the print out.  The edits will
     not be saved in the mail folder.

HEADER FIELD STRIPPING:

     Header stripping can be done using the Mail 'ignore' or 'retain'
     commands in your .mailrc file. The 'ignore' command lists headers
     fields (no colons) that you want stripped from displays and
     printings. The 'retain' command lists headers fields (no colons)
     that are they only ones you wish to see in displays and
     printings. To get the 'ignore' or 'retain' commands to affect
     saves, you need to set the alwaysignore variable. Below are
     example lines from my .mailrc file.

	  retain Date From Subject To Cc MIME-Version Content-Type \
	      Content-Transfer-Encoding Content-Id Content-Description
	  set alwaysignore

     The mf(header-strip) variable can be used in addition to 'ignore'
     or 'retain'. It is need for when TkMail needs to see the header
     fields but you would rather it be stripped out. Right now, TkMail
     needs to see every field in the retain line above.

     If one of these fields is not in your 'retain' line in your
     .mailrc, please put it there. If it is in your 'ignore' line,
     remove it. Then use the mf(header-strip) setting to remove it
     again.  The format of this variable requires that the field name
     be in all LOWERCASE and NO COLON. The mf(header-strip) variable
     is used for displaying only. The current message will print with
     these headers stripped but additional messages selected for
     printing will only be affected by the 'retain' and 'ignore'
     settings.

     Some Mail programs do not support a 'retain' command so you
     will have to make do with 'ignore'.

CC:, BCC: and FCC:

     The mf(compose-show-cc) variable controls whether two extra entry
     boxes appear in the compose window when writing messages. This
     also controls whether CC: and BCC: will be used or not. If the
     entry boxes are shown in the compose window when the message is
     sent, then they will be used if non-blank.  If they are not
     shown, what ever was put in them before will be ignored.

     When Reply is choosen for a message, the Cc: field is copied.  If
     the To: field in a Reply message appears to have multiple
     address, all of the addresses (including yours) will be added to
     the Cc: list.

     The button on the right side of the entry widgets can be used to
     popup a text window for easier editing of long address lists. Any
     newline characters inserted into the text widget will be replaced
     with spaces.  You must click the Accept button on the text window
     before sending for your changes to be used.

     The mf(compose-alternates) variable can be used to prevent mail
     from being sent to any address in the Cc: listing. It is a list
     in which the elements must be an exact match or regular
     expression (e.g. raines[a-zA-Z@\.]* ) of the address to
     ignore. Be careful that the regular expression excludes spaces
     and commas to prevent mangling of two or more addresses.

     The FCC: entry contains the name of the file to which a copy of
     the message will be recorded. This is always set to the value of
     mf(mail-record) when first mapped, but can be changed.  Whether
     this file is used or not depends on whether the Fcc: entry is
     shown or not at send time. Multiple files can be specified if
     separated by commas. The button at the side of the entry widget
     will popup a file selection box.

     The button on the side of the Subject entry widget has no command
     associated with it and is only there for symmetry. If anyone has a
     good idea about what this button should do, drop me a line.

SETTINGS:

     Below are settings you may want to customize in the ~/.tkmail file.
     The contents of this file are sourced by TkMail as normal Tcl code.
     Settings that were most likely set to the proper defaults during
     installation are marked with an (*).  These should only be set by
     the knowledgable individual user.

      * mf(mail-mbox) 		- main mail box for messages to incorporate to
				  ( this is usually ~/mbox )
				  ( should match corresponding .mailrc value)
      * mf(mail-command) 	- BSD style mail command
      * mf(mail-deliver) 	- mail delivery command
      * mf(mail-system) 	- system mail box where mail is received
      * mf(mail-tmpdir)		- temporary file directory to use
	mf(mail-interval)	- number of milliseconds between mail checks
	mf(mail-directory) 	- directory containing mail folders
				  ( hidden files will be ignored )
				  ( should match corresponding .mailrc value)
	mf(mail-record)		- file to record outgoing messages in
				  ( set to {} for none )
				  ( should match corresponding .mailrc value)
	mf(mail-record-swap)	- whether or not when recording outgoing messages
				  to record them as being "sent" by the addressee
	mf(mail-record-forward)	- whether or not to record forwarded messages
	mf(mail-auto-incorp)	- whether to incorporate new mail automatically
				  ( only when TkMail is iconized )
	mf(mail-flush)		- number of bytes between flushes to I/O
				  ( needed to handle large messages > 15000 bytes )
	mf(mail-read-ask)	- whether TkMail should pause and ask to continue
				  when reading in large messages
	mf(mail-read-max)	- maximum number of lines to read before asking (when
				  mf(mail-read-ask) is true)
        mf(mail-alias-file)	- name of file containing alias definitions
        mf(mail-alias-type)	- format of alias file: bsd or elm

	mf(disp-left-scroll)	- set to 1 for scroll bar on left side of text widget

      * mf(viewer-bitmap-nomail) - bitmap to use to signal no mail
      * mf(viewer-bitmap-mail)	- bitmap to use to signal mail
	mf(viewer-print)	- UNIX commmand for printing (with %F subst for file)
	mf(viewer-geom)		- initial geometry for main mail window
	mf(viewer-beep-new)	- Tcl command to run when mail received
				  ( set to {} for no beep )
	mf(viewer-beep-empty)	- Tcl command to run when system mail is emptied
	mf(viewer-beep-error)	- Tcl beep command to run on error or notification
	mf(viewer-state)	- 'normal' or 'disabled' to allow mesg window editing
	mf(viewer-pipe-dir)	- directory to run piped UNIX commands

	mf(menu-folders-max)	- maximum number of folders displayed in menu
				   at one level
	mf(menu-depth-max)	- maximum depth of pull-right menus
	mf(menu-quick-send)	- list of common addresses for composing mail
				  ( can include aliases )
	mf(menu-folders-ignore) - files to ignore in mf(mail-directory) directory when adding
			  	   to menus at startup ( subdirectory path required )
	mf(menu-sender-full)	- whether to use full address or just the name before
				   the '@' as a file name for <Sender> menu
	mf(menu-recent-max)	- maximum number of folders to keep track off in the
				  Recent menus
	mf(menu-key)		- key pressed to access menu key accelerators
				  Example: set mf(menu-key) {<F5>}

	mf(headlist-reverse)	- set to 1 so that most recent message at top
	mf(headlist-height)	- number of messages visible in top list at one time
	mf(headlist-format)	- format message header list in pretty way

	mf(compose-geom)	- initial geometry of compose window
	mf(compose-show-cc)	- whether to show Cc and Bcc entries in compose
	mf(compose-save-send)	- whether to save text of last compose window
        mf(compose-alt-editor)	- command to run alternate editor for compositions
				  ( must be an X-window command )
	mf(compose-alt-auto) 	- whether to automatically call up alternate editor
	mf(compose-alternates)  - list of email address that you want stripped
			  	  stripped from Cc: since they are yours
      * mf(compose-icon-bitmap)	- bitmap to use for compose window
        mf(compose-addr-postfix) - a string of form @machine to add to addresses
				    that lack it
        mf(compose-quick-forward) - whether Forward should bring up a compose window
        mf(compose-require-subject) - whether a subject should be required
					 or not on outgoing messages

	mf(header-strip)	- see HEADER FIELD STRIPPING above
				  ( use this cautiously as it can delete body )
	mf(header-mime)		- whether to do MIME header parsing. This isn't
			  	  really implemented yet so it is best set off.
        mf(header-config)	- a text tag config argument to apply to the header
				  lines of a mail message

        mf(bind-emacs)		- whether to put in emacs bindings
				  ( see key bindings above )

	mf(insert-prefix)	- prefix for included messages
        mf(insert-headers)	- text to automatically put at top of all compositions
	mf(insert-signature)	- file to include at end of compostions
	mf(insert-encoder)	- program to use for encoding inserted files
	mf(insert-compress)	- program to use for compressing inserted files
	mf(insert-compress-suffix) - suffix used by compress program
	mf(insert-strip)	- whether or not the header of inserted messages should
				  be completely stripped
	mf(insert-prefix-sig)	- text to insert before contents of signature file

      * mf(ispell-present)	- whether your site has ispell or not

     The site adminstrator only has to modify the mfp(globalset)
     variable at the top of the tkmail source file and can put the
     rest of the settings in the pointed to file.

     An example line in the .tkmail file is shown below (note that
     you must use $env(HOME) instead of ~ for your home directory).
     Tcl does not do automatic globbing!

	set mf(mail-directory) $env(HOME)/Mail

WIDGET CONFIGURATION:

     All widget configuration options can be accessed through your
     .Xdefaults file in the normal Tk way.  See the 'options' and
     individual widget man pages for more info. A few examples are:

        tkmail*Button.foreground:       blue
	tkmail*Text.font:	   	fixed
	tkmail*Scrollbar.background:	grey42

     These can also be set inside the ~/.tkmail file using the following
     Tcl code lines

	option add tkmail*Button.foreground blue
	option add tkmail*Text.font fixed
	option add tkmail*Text.background seashell2
	option add tkmail*Scrollbar.background grey42

     Note that there is no colon used with this command.

IMPLEMENTATION NOTES:

     The header list box is not a Tk Listbox but a text widget I
     hacked up so it could support non-contiguous selection. However,
     because it is a text widet, there is no horizontal scrolling.

     As of version 1.4, instead of making each Mail operation a
     separate call to the Mail command, a single Mail pipeline is
     opened at startup and written to and read from for the rest of
     the life of the program. This is possible by send Mail and
     invalid command, "xxx", after every real command causing a
     'Unknown command: "xxx"' message to be written which signals the
     end of input.

     When reading the stdout from the Mail command:
       Any ending lines that doesn't begin with a space in the header
       are interpreted as Mail information and discarded.
       All lines at the bottom of a message until the first blank
       (moving up from the end) are interpreted as Mail information.

BUGS:
     
     The bell doesn't work when the shell TkMail was run from is
     killed. This is because the normal way of sounding the bell in
     Tcl is writing a '\007' to standard out. So until Tk supports a
     bell command, you must either make sure not to quit the shell
     TkMail was run from, or get one of the many patches to Tk that
     implement a bell (i.e. blt_wish). I have created the user setting
     of mf(viewer-beep-new) to put an alternate bell command if you
     have one.

     I am sure there are plenty of other bugs in this, so mail me
     about them (raines@bohr.physics.upenn.edu)

TODO:
     rewrite this help file into something readable
     encryption (PGP)
     better record features
     MIME
     incoming mail filtering
     handle unshar similar to uudecode
     compressed folder support
     better emacs bindings
     user setable header format and sorting
     a true bounce
     use toms searchbox.tcl
     better customization interface
     global mail searching
     mail response tracking

COPYRIGHT:
     Copyright 1993 by Paul Raines (raines@bohr.physics.upenn.edu)

     Permission to use, copy, modify, and distribute this
     software and its documentation for any purpose and without
     fee is hereby granted, provided that the above copyright
     notice appear in all copies.  The University of Pennsylvania
     makes no representations about the suitability of this
     software for any purpose.  It is provided "as is" without
     express or implied warranty.

DISCLAIMER:
     UNDER NO CIRCUMSTANCES WILL THE AUTHOR OF THIS SOFTWARE OR THE
     UNIVERSITY OF PENNSYLVANIA BE RESPONSIBLE FOR ANY DIRECT OR
     INCIDENTAL DAMAGE ARISING FROM THE USE OF THIS SOFTWARE AND ITS
     DOCUMENTATION. THE SOFTWARE HEREIN IS PROVIDED "AS IS" WITH NO
     IMPLIED OBLIGATION TO PROVIDE SUPPORT, UPDATES, OR MODIFICATIONS.

 Please mail any suggestions, bugs, whines to raines@bohr.physics.upenn.edu
 The latest version is always available by anonymous ftp at
	bohr.physics.upenn.edu:pub/tk/tkmail.tk.Z

