1.5 GPL (GNU General Public License)    
  not rated
MIME-tool is a little mime encoding tool.




MIME-tool is a little mime encoding tool I slapped together when I needed something on a production box at work (productions = no C development environment, only the ancient K&R compiler required for god-knows-what sys-admin task).

The resulting program will compile happilly on both the crippled C compilers bundled with some commercial *nix distributions, and on full ANSI/ISO C compilers like gcc.

I wrote this program when I needed a tool to construct MIME encoded emails with file attachments in job scripts on a production box. Being a production box it didn't have any development tools installed. However, the box DID have a K&R C compiler that appears to be necessary for some administrative task or another (configuring the kernel?). If you tried to compile even fairly simple ANSI/ISO C source the compiler bitched and moaned about all the stuff it didn't support, which will stop most folk (at least those who don't know anything about the history of the C programming language) from building their own binaries.

Since I'm old enough to actually have written C code back before we had the ANSI/ISO standard and all the accompanying niceties, I was not stymied by a the lack of ANSI/ISO support. It's really not all that hard to write K&R compliant code, so long as you don't need the compiler to check your function calls for you. For a program this small, however, that's not much of a concern.

Since the program is meant to be compiled on systems with minimal support (there is no telling what unrestrained IT staff will decide must be removed in the interest of system security) I didn't bother to include a makefile. On every system I have tried, however, the program compiled with the simple incantation

cc -o mime mime.c

but your selected target system may require extra special magics.

The program supports the basic MIME standard: The caller can select the content type (application/octet-stream, text/plain, or user specified), content type encoding (7bit, 8bit, binary, base64 or auto-detected) and the boundry string (defaults to "=_MIME_CONTENT_BREAK_="). Further, the caller may specify the e-mail subject, to address, from address, carbon copy address and text for a prolog and epilog. The content type and encoding may be specified separately for each attached file.

The program's calling format is:

mime [-dDvV] [-S subject] [-F from-address] [-T to-address]
[-C carbon-copy address] [-P prolog-text] [-E epiplogue-text]
[-B boundry] {[-78abqux] [-t content-type] filename}

-d low detail debugging
-D high detail debugging
-v verbose messages
-V very verbose messages

-7 7-bit ASCII encoding
-8 8-bit ASCII encoding
-a application/octet-stream content type
-b binary encoding
-q quoted-printable encoding
-t text/plain content type
-u unknown encoding, auto-detect
-x base64 encoding

There's really not much to this program. Once you know how the MIME messages are constructed you could do most of it manually (except for the base64 encoding, which would require a program like this), but if there are any problems with it, I would like to know about them.

What's New in This Release:

A typo in the online help message was fixed.
A known bugs section was added to the manpage.
Proper quoting and folding were added to the filename header.
Last updated on June 5th, 2006

0 User reviews so far.