Signing too early #12

janithp opened this Issue Feb 20, 2014 · 3 comments


None yet

3 participants

janithp commented Feb 20, 2014


we're using the gem with ActionMailer 3.2.13 and Rails 3.2. Interceptor seems to be able to sign the message. But Using port25 verifier it fails saying "fail (wrong body hash: expected n9hw0s6A+39X2zHc07dPuzj1783GTadt3NHjLpqyZ/g=)".

I tried different lengths of html body in the email and it passes for small email body but fail for large ones. Is it possible that register_interceptor(Dkim::Interceptor) binds too early?

I have dkim initializer that calls register_interceptor. I'm also using html and text templates with ActionMailer.

Any ideas?


Is it possible your MTA is modifying the message? Try manually signing without the interceptor. Though, unless you have another interceptor, it is unlikely that the signed message is being modified via Mail gem.


@janithp is it possible for you to provide the exact signed message which had an incorrect body hash? (value of mail.to_s after delivery would provide this)

janithp commented Feb 26, 2014

Thank for the support! Actually it seemed to just start working all of a sudden. This was a strange one. But this is not an issue anymore, I will close it.

@janithp janithp closed this Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment