iragsdale / rubydkim

Ruby gem for creating & verifying DKIM signatures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compatibility with dkimproxy

pepawel opened this issue · comments

Hi,

The following two commands work good -- when I'm testing dkimproxy and rubydkim separately:

( dkimproxy-sign --selector=sel --domain=example.com < mail.txt; cat mail.txt ) | dkimproxy-verify
originator address: someone@example.com
signature identity: @example.com
verify result: pass
sender policy result: accept
author policy result: accept
ADSP policy result: accept

dkim_sign.rb example.com sel private.key < mail.txt | dkim_verify.rb
signature: sel._domainkey.example.com passed? true
#<DKIM::Signature:0xb73e56b8 @verify_status=3, @querymethod=0, @canon_body=0, @Version=1, @headernames="Content-Type:Mime-Version:Subject:To:Reply-To:From:Date", @Domain="example.com", @canon_headers=0, @bodylength=-1, @verify_ext_status=0, @selector="sel", @algo=0>

But when I try to mix them, mail can't be verified:

dkim_sign.rb example.com sel private.key < mail.txt | dkimproxy-verify
originator address: someone@
signature identity: @example.com
verify result: fail (message has been altered)
sender policy result: neutral
author policy result: neutral
ADSP policy result: neutral

( dkimproxy-sign --selector=sel --domain=example.com < mail.txt ; cat mail.txt ) | dkim_verify.rb
signature: sel._domainkey.example.com passed? false
#<DKIM::Signature:0xb74388a4 @verify_status=2, @querymethod=0, @canon_body=0, @Version=1, @headernames="date:from:reply-to:to:subject:mime-version:content-type", @Domain="example.com", @canon_headers=0, @bodylength=-1, @verify_ext_status=1, @selector="sel", @algo=1>