Instructions for installing and compiling Emil, the message converter.

IMPORTANT

First of all, Emil uses TCL as a configuration language. Get TCL from
your local FTP-site and install it (it shouldn't be to hard to make it 
work) use version 7.0 or later. From now on the directory which holds 
libtcl.a will be called TCLLIB and the directory which hold tcl.h will 
be called TCLINCLUDE.

Emil has been successfully installed on the following systems:
AIX3.1, HPUX9, SunOS4, SunOS5, Ultrix4.3. If you're able to install IDA-
sendmail you shouldn't have much problems with Emil. I've managed to
keep it quite simple and not used to much system dependant code. It's
primarily just a lot of string manipulation.



CONFIGURATION

First set these correctly in $EMILDIR/Makefile:

RANLIB 		set this to `ranlib' if your system uses ranlib, 
		else set it to `empty'. 

TCLINCLUDE 	set to the directory where tcl.h is located if
		not in your include PATH.

TCLLIB 		set to the directory where libtcl.a is located
		if not in ld's search path.

DODEBUG		set to -DEMILDEBUG if you want debugging (which I
		recommend you do).

LOGFILE		set to the path of the file the logs should go.

LOGLEVEL	define EMILLOGLEVEL to `LOG_DEBUG' if you want copious 
		logging. A good choice is to start out with
		LOG_DEBUG and then change to LOG_ERR when everything
		seems stable. In fact those are the only two levels
		used by Emil so far.



EMIL LINKED INTO IDA-SENDMAIL OR EMIL STANDALONE

If using Emil linked into IDA-sendmail sendmail will be able to act as 
a MIME-gateway, converting messages to and from the MIME specification.
If using Emil without sendmail, it'll work as a filter, converting
messages as called. Beware that there is no way to use Emil as a mailer
with sendmail. 


IF COMPILING WITHOUT SENDMAIL (STANDALONE FILTER)

Begin with the strncnv-routines. Edit $EMILDIR/charset/makefile to fit your
system. Change LIBDIR to where you want to stock the character conversion
tables. Type `make' and then `make install'. This shouldn't cause any 
problems.

Uncomment DEFS without SENDMAIL if compiled standalone, also uncomment
LIBDIR and  CHARCNV. Also use the first of SYSTEM and EMILLIB if your system
is not Solaris2, else use the latter ones.

Type `make emil'. This will generate the Emil standalone filter.
Then type `make install' to install the TCL-routines used by Emil in
LIBDIR/emil. 


IF COMPILING WITH IDA-SENDMAIL

Unpack sendmail-5.67a+IDA-1.5. Put Emil-1.0a.tar in $SENDMAILSRC/ida
and type `tar xf Emil-1.0a.tar' to unpack it. Edit $SENDMAILSRC/ida/Makefile 
to your preference and type `make configure'. This will also make some 
changes in `emil/Makefile'.

Apply the included patchfile `sendmail.patch' to the sendmail source. 
In $SENDMAILSRC/src type `patch < sendmail.patch'. If you don't have
Larry Wall's patch program, get it!

Edit $SENDMAILSRC/src/conf.h according to sendmail's installation 
documentation and also define EMILLIB.

Edit `$SENDMAILSRC/ida/emil/Makefile': Uncomment DEFS with SENDMAIL. 
Type `make all'. This will generate the library that will be linked 
with IDA-sendmail and also install the TCL-routines in LIBDIR/emil.

Edit $SENDMAILSRC/src/Makfile according to sendmail's installation
documentation. 

APPEND `-I$TCLINCLUDE' to CFLAGS

APPEND `-L$TCLLIB -L../ida/emil' to LDFLAGS

( If using Solaris2, also append `-Bstatic on SUNOS4; -R/usr/lib:/usr/ucblib'
to LDFLAGS).



APPEND TO LIBS 

on HPUX9: `-lndbm -lEmil -tcl -lm'

on SunOS4: `-ldbm -lEmil -tcl'

on Ultrix4: `-ldbm -lEmil -tcl'

on Solaris2: `-lEmil -ltcl -lsocket -lnsl -lelf -lm'

Make the sendmail program by typing `make' in $SENDMAILSRC/src.

Continue by following the IDA sendmail installtion manual.








