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.