Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a4080654d049ad31b216b761b9173c1f > files > 159

exim-doc-4.69-4mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 10 2009 by texi2html 1.78 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>Specification of the Exim Mail Transfer Agent: 54. Adding new drivers or lookup types</title>

<meta name="description" content="Specification of the Exim Mail Transfer Agent: 54. Adding new drivers or lookup types">
<meta name="keywords" content="Specification of the Exim Mail Transfer Agent: 54. Adding new drivers or lookup types">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.78">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Adding-drivers-or-lookups"></a>
<a name="SEC492"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_53.html#SEC491" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec_53.html#SEC490" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 54. Adding new drivers or lookup types </h1>

<p>The following actions have to be taken in order to add a new router, transport,
authenticator, or lookup type to Exim:
</p>
<ol>
<li>
Choose a name for the driver or lookup type that does not conflict with any
existing name; I will use &quot;newdriver&quot; in what follows.

</li><li>
Add to &lsquo;<tt>src/EDITME</tt>&rsquo; the line:

<table><tr><td>&nbsp;</td><td><pre class="display">&lt;type&gt;_NEWDRIVER=yes
</pre></td></tr></table>

<p>where &lt;<em>type</em>&gt; is ROUTER, TRANSPORT, AUTH, or LOOKUP. If the
code is not to be included in the binary by default, comment this line out. You
should also add any relevant comments about the driver or lookup type.
</p>
</li><li>
Add to &lsquo;<tt>src/config.h.defaults</tt>&rsquo; the line:

<table><tr><td>&nbsp;</td><td><pre class="example">#define &lt;type&gt;_NEWDRIVER
</pre></td></tr></table>

</li><li>
Edit &lsquo;<tt>src/drtables.c</tt>&rsquo;, adding conditional code to pull in the private header
and create a table entry as is done for all the other drivers and lookup types.

</li><li>
Edit &lsquo;<tt>Makefile</tt>&rsquo; in the appropriate sub-directory (&lsquo;<tt>src/routers</tt>&rsquo;,
&lsquo;<tt>src/transports</tt>&rsquo;, &lsquo;<tt>src/auths</tt>&rsquo;, or &lsquo;<tt>src/lookups</tt>&rsquo;); add a line for the new
driver or lookup type and add it to the definition of OBJ.

</li><li>
Create &lsquo;<tt>newdriver.h</tt>&rsquo; and &lsquo;<tt>newdriver.c</tt>&rsquo; in the appropriate sub-directory of
&lsquo;<tt>src</tt>&rsquo;.

</li><li>
Edit &lsquo;<tt>scripts/MakeLinks</tt>&rsquo; and add commands to link the &lsquo;<tt>.h</tt>&rsquo; and &lsquo;<tt>.c</tt>&rsquo; files
as for other drivers and lookups.
</li></ol>

<p>Then all you need to do is write the code! A good way to start is to make a
proforma by copying an existing module of the same type, globally changing all
occurrences of the name, and cutting out most of the code. Note that any
options you create must be listed in alphabetical order, because the tables are
searched using a binary chop procedure.
</p>
<p>There is a &lsquo;<tt>README</tt>&rsquo; file in each of the sub-directories of &lsquo;<tt>src</tt>&rsquo; describing
the interface that is expected.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_53.html#SEC490" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>September, 10 2009</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.78</i></a>.
 </font>
 <br>

</p>
</body>
</html>