Bug Report: DKIM signing issue

On one of your customer emails we had at the end of the content some spaces (see screenshot / blue selected part). it seams that kumomta signs them incorrect as mail-tester.com reports dkim signature invalid as well as gmail.com e.g.
email content type is:
Content-Type: text/html;
charset=“UTF-8”
Content-Transfer-Encoding: Quoted-Printable

after i did some manual trimming (removed spaces and newlines) and add at the end \r\n the same email works. i cannot share the hole links here as it contains some sensitve content, but maybe its helping u to improve kumomta :slightly_smiling_face: also not sure if its against RFC, but wanted at least report it



Are you saying that the trailing spaces are causing a bad DKIM signature?

yes

correctly, after i removed them its working

removed them before signing? Can you give us an input message and policy that will produce an invalid result?

i cannot public share the message. i try to create and example

https://www.mail-tester.com/test-d0g9ta0tz&reloaded=5

Trying ::1...
Connection failed: Verbindungsaufbau abgelehnt
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mta01.sendnode.com KumoMTA
MAIL FROM: <test@sendnode.com>
250 OK EnvelopeAddress("test@sendnode.com")
RCPT TO: test-d0g9ta0tz@srv1.mail-tester.com
250 OK EnvelopeAddress("test-d0g9ta0tz@srv1.mail-tester.com")
DATA
354 Send body; end with CRLF.CRLF
FROM: <test@sendnode.com>
TO: <test-d0g9ta0tz@srv1.mail-tester.com
>
Subject: Test

This is a test
    
.