Kevin,
> I even received an email from AXB that is very simple and failed DKIM tests.
>
> I also found that many emails where I'm disabling iframes, for example,
> are what's causing my DKIM errors.
The key idea is to do the DKIM validation *before* sanitizing mail.
> What's the easiest way with opendkim to basically pipe a message in mbox
> format to see if it thinks the DKIM sig is valid? I want to compare if
> a message filing DKIM through SA is passing with OpenDKIM.
This is what I'm using - a one line shell command call to Mail::DKIM,
piping a message on its stdin:
$ perl -MMail::DKIM::Verifier -ne '
BEGIN{$dkim=Mail::DKIM::Verifier->new_object};
s/\r?\n\z/\015\012/; $dkim->PRINT($_); END{$dkim->CLOSE;
printf("%s\n",$_->result_detail) for $dkim->signatures}' <sample.msg
Mark