1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
Here is a C code extension to Tcl for efficient and safe manipulation
of BSD and MMDF format mail folders. MH folders are 90% supported. I
have successfully run it on SunOS 4.1.3, AIX 3.2, IRIX 5.3 and Linux
(Slackware 2.3 a.out & Slackware 3.0 ELF).
Read the top of the mfv.c file to see the new Tcl commands
defined. Then edit the Makefile and run make. If you do not have TclX
installed, you will need to also edit tclXconf.h so that at least the
signal handling part can be compiled in. Other features of TclX that I
plan to use (such as TCP/IP server access for fetching external-body
MIME parts) will require the full TclX version, but will be
optional. If everything compiles and links okay, then run the
'mfv_wish' program and test it out with some COPIES of your mail
folders.
If it doesn't compile please email me the error output. Please make
a reasonable effort to find a fix yourself that you can send me.
Yes, I will move to autoconf when I find the time.
NOTES:
1) Only the headers and message position are stored in memory so
message body retrieval requires rereading the folder. This should
not be a major problem and is a major savings in memory usage.
2) Each folder can only be opened once. This will not prevent
multiple viewer from being opened on a single folder once the Tk
code is written.
3) Note that the 'check' and 'save' commands will close the
folder (and thus remove its associated command) if it finds
the file in a corrupted or inaccessible state.
4) I am "sure" I have found a bug in Tcl with respect to its
caching of regular expressions. The regtest.c file demonstrates
this bug. Test it on your system.
5) This package can be made into a loadable extension under tcl7.5
and I have done so under SunOS, Linux (ELF), and IRIX 5.3.
6) Last time I said this package would not contain a locking
mechanism but I lied. It now has one. The separate program
dotlock included in this package can be safely made setuid/setgid
(please check me on this).
Again, read the top of the mfv.c file for details of the new commands
added by the mfv package.
TODO (if I have the time):
threading
IMAP and POP support
auto-archiving of incoming mail
glimpse index support(?)
|