I found out that some header entries (Date:, From:, Reply-To:, MIME-Version:, Content-Type:, Content-Transfer-Encoding:) have a space character at the first column and this cause the problem.
To: "forname surname " <mailaddress>
Subject: TEST
Message-ID: <messageID>
Date: Fri, 09 Sep 2022 12:15:57 +0200
From: via Kanboard <mailaddress>
Reply-To: user@domain.tld
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Auto-Submitted: auto-generated
From: noreply@domain.tld
Date: Fri, 09 Sep 2022 12:15:57 +0200
Where is the header generated?