=================================
T h e   M i m e C o n v   Ver 2.0
=================================

Originally by Nobby N Hirano, nobby@din.or.jp
Rewritten by Ivo Truxa * http://truxoft.com * mime@truxoft.com

@(#) README 2.0 Sep 7 2000

Copyright Version 1.0 (c) 1996 Nobby N Hirano, nobby@din.or.jp
Copyright Version 2.0 (c) 2000 Ivo Truxa, Truxoft

Free for personal non-commercial use

Version 2.0 of Mimeconv was developed to enahnced functionality of 
applications written in Miva Script (http://miva.com), but may be
use standalone or in connection with other script languages or CGI
programs.

Changes made in the version 2.0 by Ivo Truxa
--------------------------------------------
 - changed styling (just for my convenience)
 - optimizing and code cleaning
 - more comments added
 - change of function headers to the recent standard
 - moving of the	qdec.c optimized functions into the base64.c
 - changes to be able to parse e-mails from Outlook
 - changes of the calling syntax (arguments) for CGI calls throgh an URL
 - changed help screen function	
 - fix of malfunctional quoted printable decoding
 - fix of eventually possible buffer owerflows (security fix)
 - added configuration file with working directoery (for security reasons)
 - error handling improved
 - multi-part messages - single or multiple attachments & mixed encoding


Known bugs, limitations and to-do's:
------------------------------------
 - more security checks to do
 - does not accept spaces in file names (in the e-mail headers)
 - please report bugs to mime@truxoft.com



CALLING SYNTAX:
---------------

 Syntax: http://domain/path/mimeconv?[mode+]source[+target]

   mode   = e   encode w/o MIME header (default)
   mode   = E   encode including MIME header
   mode   = d   decode
   source = path of file to decode/encode
   target = redirect output to a file (optional)\n
   
   Replace the '?' and '+' signes with blanks when calling from a shell
   (e.g. Telnet or DOS Window)


 Calling Examples:
 -----------------
   encoding a binary file to the stdout (browser):
     http://foobar.com/cgi-bin/mimeconv?subdir/order.dbf
     http://foobar.com/cgi-bin/mimeconv?e+order.dbf
   encoding to a file:
     http://foobar.com/cgi-bin/mimeconv?e+order.dbf+mime.tmp
   decoding a source file:
     http://foobar.com/cgi-bin/mimeconv?d+subdir/mail/MIVA_POP0000000A
	 
   In Telnet: mimeconv d subdir/somefile.mvx


Syntax for Miva programmers:
----------------------------
  See the attached  mimeconv.mv file
  

PACKING LIST
------------
 mimeconv.c    - C source for the MimeConv 2.x program
 mimeconv      - UNIX (PC Linux) binary
 mimeconv.exe  - Windows binary
 mimeconv.com  - 16 bit DOS binary
 makefile.unix - makefile for GCC
 makefile.win  - makefile for  MS C for Windows
 Readme.txt    - this file
 mimeconv.mv   - Miva sample script


 SECURITY NOTE - IMPORTANT, PLEASE READ:
 ---------------------------------------

 mimeconv.ini file must be present in the same directory
 as mimeconv and must contain temporary working directory
 path where you want to store files to encode/decode.
 These files should be removed after encoding/decoding, because
 with help of this program they could be read from outside.
 There should be only a single line containing the working 
 directory path with no leading nor traling whitespace. Please 
 keep a trailing slah in the directory. 

 Never set the working directory to root, to cgi-bin or to
 some directory that has subdirectories with sensitive data
 or containing scripts or programs!

 Also be aware, that if you keep the mimeconv.ini file empty,
 mimeconv will read and store fiels in the current directory
 - it means in the directory where it is installed. While it
 would be mostly your cgi-bin directory, it would mean a serious
 security hole in your configuration!

 File permissions of mimeconv.ini should be set to be readable
 by the owner only - chmod 0400

 Security of MimeConv was increased in version 2.0, but no exhaustive
 tests were made. Please be aware of potential security risks. Use
 the program only at own risk after carefully testing your configuration.

INSTALLATION
------------
 There are precompiled versions for PC Unix (compiled on Linux)
 and for Windows. There is no use of external libraries, and the
 binaries could work on most common systems.

 You may recompile the program - put the mimeconv.c, rename
 the respective makefile (makefile.win or makefile.nix) to 
 makefile, put it to the same directory and from the command
 prompt type 'make'.

 The file permissions of the binary should be set to 755 on
 Unix systems.

 
LEGAL NOTE:
===========
The authors (Nobby N Hirano and Ivo Truxa)  will not be liable for: 
(A) any bug, error, omission, defect, deficiency, or nonconformity in the product, 
(B) implied warranty of merchantability of fitness for a particular purpose, 
(C) implied warranty relating to course of performance, course of dealing, 
    or usage of trade or any other implied warranty of any type whatsoever, 
(D) claim of infringement, 
(E) claim in tort, whether or not arising in whole or part from authors' fault, 
    negligence, strict liability, or product liability, or (f) claim for any 
	direct indirect, incidental, special, or consequential damages, or loss of 
	data, revenue, customers goodwill, or use. in no case shall authors' 
	liability exceed the suggested retail price for product.

	


Enjoy,
Ivo Truxa

======================================================================
ORIGINAL README from Nobby N Hirano, nobby@din.or.jp:

1. Introduction
---------------

The mimeconv is binary mail encode/decode program that is running under
       1. Linux
       2. HP-UX
       3. MS-Windows95/NT

Mimeconv is free software. See the file LICENSE for the details.
Basically, you can do anything with it, except claim that you wrote it.

2. COMPILATION
--------------

You can install following OS:

      Linux version 1.2.13 or above
      HP-UX 9.05 or above
      Windows95 or Windows NT (only VC+ 2.x or 4.x)

  And you maybe work to other major OS.
  If you tried, please give me report !

To build mimeconv, 1st, Edit a Makefile. This Makefile is for GCC. If your
compile is not GCC, you must edit, and then a "make ; make install".
Makefile.win is Makefile for VC+'s nmake.exe. Makefile.win copy to Makefile,
and then a "nmake ; nmake install".


