- Plesk for Linux
- MSMTP (relay only) is used on Plesk server;
- Messages are not delivered on external SMTP server with the following records in
CONFIG_TEXT: May 7 04:46:17 hostname msmtp: host=relay.host.com tls=on auth=off email@example.com firstname.lastname@example.org smtpstatus=554 smtpmsg='554 5.7.1 <email@example.com>: Relay access denied' errormsg='envelope from address firstname.lastname@example.org not accepted by the server' exitcode=EX_DATAERR
May 7 06:34:27 hostname msmtp: host=relay.host.com tls=on auth=off email@example.com firstname.lastname@example.org smtpstatus=504 smtpmsg='504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname' errormsg='envelope from address email@example.com not accepted by the server' exitcode=EX_DATAERR
Sending the message from command line, shows that SMTP client (msmtp) takes "localhost" as domain name for the EHLO/HELO:
# echo "hello" | msmtp -d firstname.lastname@example.org
<-- 220 relay.hostname ESMTP Postfix
--> EHLO hostname
--> Date: Mon, 07 May 2018 22:05:24 +0700
<-- 250 2.0.0 Ok: queued as 025ABA298F
<-- 221 2.0.0 Bye
The mail is rejected on due to its security configurations on the recipient side.
Connect to the server via SSH;
Note: If direct SSH/RDP access to the server is not possible, contact server administrator for further assistance.
- Change domain name for the EHLO/HELO from "localhost" to valid one.
Edit /etc/msmtprc file by adding the following line:
CONFIG_TEXT: # Automatic envelope-from generation.
# Caution: this overrides explicitly set envelope-from via --from or other means.
Note: new_domain_name should resolve to Plesk server IP