MSMTP in default configuration sent emails with
'Received: from localhost' header, which will usually result in a very high spam score and will be blocked by spam filters.
For example, received message headers will look alike:
CONFIG_TEXT: Received: from localhost (example.com [203.0.113.2]) by domain.tld with ESMTP id qTt1Lh8JGyDoXQUV (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for firstname.lastname@example.org; Fri, 05 Jul 2019 12:52:01 +0300 (EEST)
- #PPPM-10727 "MSMTP: localhost instead of server hostname in 'Received' header"
- Plesk Obsidian 31 July 2019 (fixed as PPP-43131)
If update is not possible for some reason you may try the following
Add the domain name which will be used as a HELO hostname into
Connect to the server via SSH
# echo "domain example.com" >> /etc/msmtprc