Twisted Exim
Use the source, Luke
The great thing about open source is that you can learn from those who have published code on the 'net. At the very least you can shamelessly plagiarise it and bend it until it looks like something you could use ;-)
Another great thing about OSS is …