Google

TUTORIAL FOR EMIL VERSION 2.1

Written by Martin Wendel, ITS, Uppsala university. Martin.Wendel@its.uu.se

OUTPUT CONVERSION

Output conversion is the recommended way of using Emil. When setting up output conversion you modify the delivery agent definitions in sendmail.cf 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 sendmail.cf 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 sendmail.cf and include the definition of mailer in emil.cf.

Running helper on my workstation yields this:

# helper /etc/sendmail.cf


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

Locate the following line in /etc/sendmail.cf:

        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/emil.cf:

        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 sendmail.cf and emil.cf. In the mailer definition in sendmail.cf Emil is called instead of bellmail. Emil is called with the argument "-m local" (mailer local in emil.cf). In emil.cf mailer local is defined, for a description of the syntax check the man page on emil.cf.

TCP mailer

Emil has a builtin SMTP client interface that is invoked by the "-n" argument. You do not have to define anything in emil.cf 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 sendmail.cf modify this (Don't copy this, instead modify the definition in your sendmail.cf. The syntax may vary on different sendmails):

Mtcp,    P=[IPC], F=mDFMueXLN,  S=14, R=24, A=IPC $h, E=\r\n
into:
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 sendmail.cf.

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
SWEDEN

Martin Wendel E-Mail: