Combined SMTP proxy for SQLgrey whitelisting and DKIM signing

One day I started experimenting with DKIM, and configuring my Postfix server to add DKIM signatures to my outgoing email. I quickly found dkimproxy, which is a content-filter for Postfix that implements DKIM. Besides doing my DKIM signing on outgoing email, I thought it would be nice if it could handle automatic sqlgrey whitelisting of recipients at the same time.

The result is a dkimproxy which does DKIM signing and at the same time updates the SQLgrey whitelist. Below is a patch for dkimproxy 1.2 which I find works nicely.

Currently I only use dkimproxy to sign outgoing email. For verifying DKIM signatures on incoming email, I have installed amavisd-new.

While I was at it I also learned that there is a more-or-less standardized port for clients to submit email: TCP 587.

Update 090526: The whitelist now keeps track of the last send and receive dates.
Update 091103: Ported the patch to dkimproxy 1.2.
Update 101125: Ported the patch to dkimproxy 1.3.
Update 130215: Ported the patch to dkimproxy 1.4.1.


Is it possible to provide this as a standalone utillity?I am using Amavisd-new for signing my email, but I would like to have a content-filter for automatic adding of whitelisted emails to sqlgrey.

I suppose with "standalone" you mean a proxy that only does sender whitelisting. Actually I started out with such a proxy, before I combined it with DKIM signing. I've dug into my archives and published that first variant here.