Bwdkimd - a daemon for dkim validation
bwdkimd is a simple multi-threaded daemon for DKIM verification.
Summary
bwdkimd was written to work with our mainline filtering engine, but as it has an easy line-based interface, similar to e.g. spamc/spamd (spamassassin) and clamd (ClamAV), we think it might be useful to others, hence we are releasing the code under the GPL.
bwdkimd is multi-threaded, with one main thread receiving and queueing work and the remaining threads processing it. It uses libopendkim for the DKIM verification.
Reasoning
There are a number of DKIM capable tools and utilities around, but they seem to be mostly Perl based. For use in production at Spamchek, we try to avoid Perl in the mainline path as much as possible, so we decided to implement our own daemon in C. We already had a good starting point in bwclamd, and with libopendkim doing the actual work for us, it wasn't really much effort.
Input and output is supported on a Unix socket (could be easily expanded to support TCP/IP sockets):
Input line:
SCAN MSGID=<message-id> FILENAME=<filename> TRXID=<transaction identifier>
Output line:
DONE CODE= RESULT= TRXID=