[exim] exim 4.82 + dkim signing

Pàgina inicial
Delete this message
Reply to this message
Autor: Maxim Shpakov
Data:  
A: exim-users
Assumpte: [exim] exim 4.82 + dkim signing
Hi all!

I'm using exim 4.82 on centos 6 with dkim signing enabled.
Signing is working fine with some little but very annoying exception.

When I send email with empty line (\r\n) in body, dkim check always
fails on other side (gmail, port25 dkim verifier)

I've created test case to reproduce my problem

echo -e "To: check-auth2@???\nFrom:
maxim@???\nSubject: test\nContent-Type: text/plain;
charset=utf-8\n\nTest\r\n\r\nTest" | exim -v -f maxim@???
check-auth2@???

>>>

PDKIM >> Hashed body data, canonicalized >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Test{CR}{LF}{CR}{CR}{LF}Test{CR}{LF}PDKIM
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<

Answer from port25 dkim checker:

DKIM check details:
------------------------------
----------------------------
Result:         fail (wrong body hash: expected
l9qLW/Z1TIMHEIl16x0J09yLZXuCbdcdVGCHdUgSvhQ=)
........
Canonicalized Body:
    Test'0D''0A'
    '0D''0A'
    '0D''0A'
    Test'0D''0A'


=========

I've made some more tests:

\r\n\space\r\n = {CR}{LF}{CR}{LF} => dkim ok
\r\n\n = {CR}{LF}{CR}{LF} => dkim ok
\n\n = {CR}{LF}{CR}{LF} => dkim ok
\r\n\r\n = {CR}{LF}{CR}{CR}{LF} => dkim fail
\n\r\n = {CR}{LF}{CR}{CR}{LF} => dkim fail
\n\space\r\n = {CR}{LF}{CR}{CR}{LF} => dkim ok

Receiving side always see \r\n in all tests..
Why exim shows {CR}{CR} when it sign email body?
What I'm doing wrong ? Is this a bug or expected behaviour?