Thanks btw.  This has been very helpful. 

On 11/1/2011 8:44 PM, Mark Martinec wrote:
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


--
Kevin A. McGrail
President

Peregrine Computer Consultants Corporation
3927 Old Lee Highway, Suite 102-C
Fairfax, VA 22030-2422

http://www.pccc.com/

703-359-9700 x50 / 800-823-8402 (Toll-Free)
703-359-8451 (fax)
[email protected]

Reply via email to