Bwdkimd - a daemon for dkim validation

From Perswiki
Revision as of 09:48, 4 August 2012 by Per Jessen (Talk | contribs) (Summary)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

bwdkimd is a simple multi-threaded daemon for DKIM verification.

Summary

bwdkimd was written to work with our mainline filtering engine, and 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=