Go to the first, previous, next, last section, table of contents.
The following actions have to be taken in order to add a new director, router,
transport or lookup type to Exim:
-
Choose a name for the driver or lookup type that does not conflict with any
existing name; I will use `newdriver' in what follows.
-
Add to `src/EDITME' the line
<type>_NEWDRIVER=yes
where <type> is DIRECTOR, ROUTER, TRANSPORT 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.
-
Add to `src/config.h.defaults' the line
#define <type>_NEWDRIVER
-
Edit `src/drtables.c', 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.
-
Edit `Makefile' in the appropriate sub-directory (`src/directors',
`src/routers', `src/transports', or `src/lookups'); add a line for the new
driver or lookup type and add it to the definition of OBJ.
-
Create `newdriver.h' and `newdriver.c' in the appropriate sub-directory of
`src'.
-
Edit `scripts/MakeLinks' and add commands to link the `.h' and `.c' files as
for other drivers and lookups.
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.
There is a `README' file in each of the sub-directories of `src' describing the
interface that is expected.
Go to the first, previous, next, last section, table of contents.