The following actions have to be taken in order to add a new router, transport, authenticator, or lookup type to Exim:
Add to src/EDITME the line
<type>_NEWDRIVER=yes
where <type> 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.
Add to src/config.h.defaults the line
#define <type>_NEWDRIVER
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.
There is a README file in each of the sub-directories of src describing the interface that is expected.