0

due to my mail provider's setup, I need to DKIM sign my messages locally. I do this by piping messages composed in mutt through a simple Python script to msmtp.

These messages will fail a DKIM check with a wrong body hash. If I sent an (unsigned) message to myself and sign the incoming message using my script, though, it will pass the check.

The only visible difference between the messages is the order of the DKIM-Signature and Content-Length headers:

# Message received and then signed locally
Content-Length: 76
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; [...]

# Message signed and sent
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; [...]
Content-Length: 76

Is there anything msmtp does to the message which alters the body, rendering the body hash invalid? Any help is greatly appreciated.

Thanks, Jan

1 Answer 1

0

Question/problem solved: My mail provider's MTA was messing with the message body; using my own MTA results in valid DKIM signatures.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.