Version: 2.11.0~alpha-10+deb9u1
OS: Debian 9
When I run opendkim-testmsg, it repeats the last 8 characters on the base64 encoded b tag value.
Note the end, flG52g==flG52g==:
$ opendkim-testmsg -k '/tmp/dkim.test.private.key' -s 'test20190817' -d 'user.com' < '/tmp/dkim.test.mail'
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=user.com; s=test20190817;
t=1566066601; bh=bgTxPlNk5mmbUo24DJIIqb1vTQI=;
h=Date:From:To:Subject:MIME-Version:Content-Type:Message-ID;
b=cmSmQREj8ip447K5WIl7YBmW97yiGsCF81XHQa5ObCXjRStVpziq9W0nXVpGR2iLi
PDkZBFfqdXFJRYcsaKbN6Z6GfnvRmxQxGRe1HSZjBD7o7lPsxc1D2NvI6DDo7kUeeu
6qF5ebh6ud2O9a0CJZrpCbu5UaExaBI7mcxRldUt0buP3Qo6oXKpPooMmomjAglGfT
ay2KhQZqcedWg5gjqjmiZhc5ZOL+WgdJldybwYpqMCoE2yNXSMsP9h73/k7Py0VAlW
nF+MxnVwtZT3ciF0liGjzURRRWLigINQKAh3rnCrthkW6EDm4BwscKiUnSEvCd6/ha
RV812njflG52g==flG52g==
Date: Sat, 17 Aug 2019 03:58:05 +0000
From: Signer <signer@user.com>
To: Vagrant <recipient@gmail.com>
Subject: Signed by OpenDKIM
MIME-Version: 1.0
Content-Type: text/plain
Message-ID: <C8.B5.44875.D4B775D5@user.com>
Message body here.
opendkim-testmsg correctly complains that this constitutes a syntax error.
$ opendkim-testmsg -k '/tmp/private.key' -s 'test20190817' -d 'user.com' < '/tmp/test.mail' | opendkim-testmsg
opendkim-testmsg: dkim_chunk(): Syntax error
Update to this... setting the
-Cflag (use CRLF) seems to solve the problem.Problem persists with or without -C flag.
Version...
lxd: net14-fixdeliver # opendkim -V | head -n 1
opendkim: OpenDKIM Filter v2.11.0
I've tried all variations of using -C flag alone with passing messages through unix2dos.
All variations fail.
I've also tried signing algorithms rsa-sha256 + sha256, with bit widths of 1024 + 2048 + 4096.
Again, all variations fail.
This suggests a bug in opendkim-testmsg which renders this code broken for all cases.
Since opendkim-testmsg has no verbosity/debug/trace facility + the code never makes it far enough to generate any temp files, some other approach is required.
Someone let me know if there's some other manual way to interact with the socket to return the signed headers for debugging.
Makes no difference how complex this process might be. Pass along any approach + I'll figure out how to get it working.
Thanks.
Using strace shows what appears to be a problem parsing the first line of the test message...
Last edit: David Favor 2020-04-19