File: spec_57.html

package info (click to toggle)
exim-html 3.20-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge, woody
  • size: 2,868 kB
  • ctags: 4,188
  • sloc: makefile: 40; sh: 19
file content (93 lines) | stat: -rw-r--r-- 2,769 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
     from spec on 25 November 2000 -->

<TITLE>Exim Specification - 57. Adding new drivers or lookup types</TITLE>
</HEAD>
<body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_56.html">previous</A>, <A HREF="spec_58.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC924" HREF="spec_toc.html#TOC924">57. Adding new drivers or lookup types</A></H1>
<P>
<A NAME="IDX2018"></A>
<A NAME="IDX2019"></A>
The following actions have to be taken in order to add a new director, 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 `newdriver' in what follows.

<LI>

Add to <TT>`src/EDITME'</TT> the line

<PRE>
&#60;<EM>type</EM>&#62;_NEWDRIVER=yes
</PRE>

where &#60;<EM>type</EM>&#62; is DIRECTOR, 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.

<LI>

Add to <EM>src/config.h.defaults</EM> the line

<PRE>
#define &#60;<EM>type</EM>&#62;_NEWDRIVER
</PRE>

<LI>

Edit <EM>src/drtables.c</EM>, 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>

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

<LI>

Create <EM>newdriver.h</EM> and <EM>newdriver.c</EM> in the appropriate sub-directory of
<EM>src</EM>.

<LI>

Edit <EM>scripts/MakeLinks</EM> and add commands to link the <EM>.h</EM> and <EM>.c</EM> files as
for other drivers and lookups.
</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 <EM>README</EM> file in each of the sub-directories of <EM>src</EM> describing the
interface that is expected.

</P>
<P><HR><P>
Go to the <A HREF="spec_1.html">first</A>, <A HREF="spec_56.html">previous</A>, <A HREF="spec_58.html">next</A>, <A HREF="spec_59.html">last</A> section, <A HREF="spec_toc.html">table of contents</A>.
</BODY>
</HTML>