- Plesk for Linux
- 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 protected] [email protected] smtpstatus=554 smtpmsg='554 5.7.1 <[email protected]>: Relay access denied' errormsg='envelope from address [email protected] not accepted by the server' exitcode=EX_DATAERR
May 7 06:34:27 hostname msmtp: host=relay.host.com tls=on auth=off [email protected] [email protected] smtpstatus=504 smtpmsg='504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname' errormsg='envelope from address [email protected] not accepted by the server' exitcode=EX_DATAERR
Sending the message from command line, shows that msmtp takes "localhost" as domain name for the EHLO/HELO:
# echo "hello" | msmtp -d [email protected]
<-- 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;
- Change domain name for the EHLO/HELO from localhost to valid one by adding the following line in /etc/msmtprc file:
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