It is not a very good idea to mess with the input of your MTA except when the messages to be converted is sent through a channel only used by those messages. This could for example be when you need to do message conversion for a site connected with an UUCP channel or if you do conversion only for users on the local host.
There are two methods of doing this: (1) Replacing the sendmail binary or (2) replacing the program used to run sendmail. In both methods you move the original program to another location and put Emil at the old location instead. You then force Emil to call sendmail at the new location. This is easiest done using a script calling Emil with the "-m sendmail" flag. This refers to the sendmail mailer as defined in Emil's configuration file emil.cf. Thus, you need to have this mailer correctly defined in advance (it should be, if using the emil.cf provided with the source). Make extensive tests to insure that it works before you move sendmail.
If emil is invoked as sendmail, it will parse arguments according to:
sendmail -f sender recipient
This is the way sendmail is called by mailer agents. Emil will also run as if the arguments mxhost and mailer had been set to localhost and sendmail respectively.
The procedure for making all local programs call Emil instead of sendmail is:
On AIX the procedure would be:
mailer sendmail : /usr/sbin/sendmail.orig, sendmail.orig, -f, $s, $r ;
mv /usr/sbin/sendmail /usr/sbin/sendmail.orig
ln -s /usr/local/bin/emil /usr/sbin/sendmail
rm /usr/sbin/mailq; ln -s /usr/sbin/sendmail.orig /usr/sbin/mailq
rm /usr/lib/sendmail; ln -s /usr/sbin/sendmail.orig /usr/lib/sendmail
rm /usr/sbin/newaliases; ln -s /usr/sbin/sendmail.orig /usr/sbin/newaliases
ITS Uppsala university