Msmtp, message is not RFC 5322 compliant, and other errors


I’m trying to send emails via smtp from my webserver (, to my mailinabox ( by using msmtp.

If I setup the SMTP account in a desktop email client like Outlook, it works perfectly.

But I don’t understand why, when sending emails via msmtp, I have the following result:

  • Sending to the mail arrives but without dkim signature
  • Sending to the mail never arrives, I get a "Undelivered mail returned to sender because “Our system has detected that this 550-5.7.1 message is not RFC 5322 compliant”
  • Sending to I never get any answer back, nor a failed delivery status notification.

You can see all the logs here (the forum doesn’t allow me to paste them here because there are too many links and I’m a new user):

Thank you if anyone could help me

I solved, it was just the From: header missing when using msmtp from command line…

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.