Bwdkimd - a daemon for dkim validation

From Perswiki
Revision as of 09:40, 4 August 2012 by Per Jessen (Talk | contribs) (Created page with "bwdkimd is a simple multi-threaded daemon for DKIM verification. ==Reasoning== There are a number of DKIM capable tools and utilities around, but they seem to be mostly Perl bas...")

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

bwdkimd is a simple multi-threaded daemon for 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.

Summary

bwdkimd is multi-threaded, with one main thread receiving work and the remaining threads queueing for it. It has an easy line-based interface, similar to e.g. spamc/spamd (spamassassin) and clamd (ClamAV).

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=