Written by Martin Wendel, ITS, Uppsala university.


Output conversion is the recommended way of using Emil. When setting up output conversion you modify the delivery agent definitions in to call Emil instead of other delivery agents. You also supply Emil with mailer arguments to make Emil invoke these delivery agents.

Normally you'll need to modify the local mailer (if you have local mail recipients on your system), the TCP mailer (if you use SMTP to send messages) and the UUCP or other kinds of mailers if you use any of them.

Local mailer

To get instructions on how to modify sendmail's local mailer, run the program helper. It will parse your and print the necessery changes. You will also get an idea on how to change other mailers to use Emil. One important thing to remember is to supply a "-m " argument to Emil in and include the definition of mailer in

Running helper on my workstation yields this:

# helper /etc/

This program will help you to set up Emil as a filter to the
local mailer of sendmail.

Locate the following line in /etc/

        Mlocal,         P=/bin/bellmail, F=lsDFMmn, S=10, R=20/40,
        A=mail -F $g $u

Modify it to look like this:

        Mlocal, P=/usr/local/bin/emil, F=lsDFMmn, S=10, R=20/40, 
	A=emil -s $g -r $u -m local -u

Also, add the following line to your /usr/local/lib/

        mailer local : /bin/bellmail, mail, -F, $s, $r ;

Restart sendmail and try it out.

As you can see helper provides the necessery changes to both and In the mailer definition in Emil is called instead of bellmail. Emil is called with the argument "-m local" (mailer local in In mailer local is defined, for a description of the syntax check the man page on

TCP mailer

Emil has a builtin SMTP client interface that is invoked by the "-n" argument. You do not have to define anything in to make it work (and you cannot either). Remember to supply Emil with the three arguments "-r <recipient>", "-s <sender>" and "-x <recipient host>".

To get conversion on the TCP (or SMTP) mailer in modify this (Don't copy this, instead modify the definition in your The syntax may vary on different sendmails):

Mtcp,    P=[IPC], F=mDFMueXLN,  S=14, R=24, A=IPC $h, E=\r\n
Mtcp,P=<path_to_emil>,F=DFMueXLN,S=14,R=24,A=emil -s $g -r $u -x $h -n,E=\r\n

Beware the change in the flag field (look above), Emil cannot handle multiple recipients, you need to remove the "m" (handle multiple recipients) from the mailer specification in

Other mailers

Just like when you define a local mailer (perhaps using helper), you can also define other mailers. The method is the same. I've set up conversion this way for a mail2pager facility, a mail2news facility etc.

March 1996

ITS Uppsala university
Box 887
751 08 Uppsala

Martin Wendel E-Mail: