This is a READ-ONLY mail file reader. It is not meant to be a general purpose mail tool (though it may evolve to that). It was intended to solve a particular problem -- I found myself often searching through lots of mail files (including saved news articles) for vaguely-remembered messages and I needed a convenient way to do it. grep only finds the files with your keyword -- you still have to hunt within those files for the desired message! tkmr lets you search and sort the messages in multiple mail files. Of course, tcl and tk are required. If you can type "wish" on your system and have a window pop up, you're all set. The versions I used were tk 3.6, tcl 7.3. Other versions working would be coincidence :-) The main "engine" is called "mr" and is not really meant to be used from the command line, although it can be. It performs these major functions: - loads mail files (any number up to system resource limits) - searches for keywords and notes the number of matches in each message - outputs one line for each message containing various information about the message, sorted in various ways - outputs the text of messages One major missing piece of functionality is unloading all messages loaded from a particular mailbox. This is a distinct possibility for the future. tkmr is an implementation of a front-end to talk to the mr program. its job is simple: to display the received header summary, display article text for desired messages, and receive user input, sending appropriate commands to mr telling it what to do (load new file, sort, search, etc). It also interprets any error messages returned from 'mr' and displays them appropriately. I implemented the front-end in tcl because my attempts at straight "C" gui applications, even with fancy gui builders, have been frustrating experiences. A motif, athena, or open look interface might be built by someone else. Because I didn't know any tcl when I started, I implemented tkmr as a C program talking to a wish and mr through pipes. As work progressed, more and more of the "meat" was done in tcl, and since there isn't really a lot for it to do, more and more of it will be migrated to tcl until perhaps one day it is all a tcl script talking to an mr process (now that I am this far along, I see that that's how it should have been done from the beginning; I was also a little worried about performance but really the frontend has to do very little work, as I tended to put features into the backend instead of the frontend). Features which may work their way into tkmr (but not mr) are replying and sending and concatenating to a new file. The file TODO is my general to-do list. If you want to help please see it or mail me. The file INTERFACE gives the details of the mr command interface. Copyright (C) 1995 Andrew Tefft. I liked Henry Spencer's terms so: Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions: 1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from defects in it. 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Bug reports, comments, patches, enhancements are welcome. I hope this is as useful to you as it has been to me. If you put it on a CD, it would be a nice gesture to let me know, and even a nicer one to offer me a free copy of the CD (might also encourage me to work more on it). I can be reached by email (for now) at andy@dina.erie.ge.com. If that bounces try me at work: teffta@erie.ge.com. I hope GE's lawyers don't come after me. I worked on this at work and at home, to help myself out at work, and I thought I'd share it. It was not something that GE asked me to write. BUILDING mr ----------- Building is straightforward. It has been tested on Linux, sunos, hpux 9.x, and Solaris 2.3. Edit the toplevel Makefile CC and CFLAGS as necessary. Also set RFLAGS appropriately for your system (these options are used in building Henry Spencer's regexp code). Now type make and you should end up with the mr binary in the current directory. To test it, type "mr ~/mbox" (specify any valid mail file). After a second or so you should get a ":" prompt. Type "h" and you should get a list of headers. Type q to exit. (don't be alarmed if you get warnings about pointers and integers -- you will.) Building tkmr ------------- Edit client/tkmr.h to specify the location for wish on your system. You can also set MR_PATH and MRTCL_PATH. I suggest /usr/local/bin for everything. If you just want to test tkmr without having to install mr and mr.tcl in their permanent locations, add "-DKEEP_HERE" to CFLAGS in the top-level Makefile. Then when you test tkmr, you should be in the toplevel directory and execute "client/tkmr". You should not have to edit client/Makefile. Edit the top-level Makefile instead. Finally, type "make client" in the toplevel directory. If you defined KEEP_HERE, run tkmr only from the toplevel directory. Otherwise, copy mr, client/tkmr, and client/mr.tcl to their appropriate locations if you did not define KEEP_HERE in the Makefile. Copy the man page client/tkmr.1 if desired. It doesn't say much. CREDITS ------- Regexp code by Henry Spencer, University of Toronto. Inspiration, hints, and child.c code from Linux Journal article by Matt Welsh.