Applicable to:
- Plesk for Linux
Symptoms
- The hostname (sent as part of the HELO) of the local mail server (usually Postfix) does not match the hostname of the Plesk server defined in Plesk > Tools & Settings > Server Settings (or is set to localhost.localdomain instead of a real hostname):
# telnet 203.0.113.2 25
...
220 localhost.localdomain ESMTP Postfix - After changing the hostname on the server in Plesk, the system notification emails are still sent from the previously used server hostname.
-
The IP address of this Plesk server got blacklisted with one of the following messages:
PLESK_INFO: 203.0.113.2 was found to be using the following name as the HELO/EHLO parameter during connections: "localhost.localdomain"
OR
PLESK_INFO: This is the mail system at host localhost.localdomain.
... -
Outgoing emails from this Plesk server are marked as spam or not delivered to Gmail, outlook, Yahoo! Mail, etc.
-
Non-delivery reports come from the address MAILER-DAEMON@localhost.localdomain.
-
MX Lookup Tool by MxToolbox may show the following problem:
CONFIG_TEXT: SMTP Reverse DNS Mismatch Reverse | DNS does not contain the hostname
- Mail servers are rejecting connections / marking as spam emails from the Plesk server because it does not have a fully qualified domain name (FQDN). As a result, the server IP address may be blacklisted.
Cause
The hostname is not configured properly either on the side of Plesk or on the side of the used mail server's configuration.
Resolution
-
Go to Tools & Settings > Server Settings and specify a FQDN, then click OK:
Note: Server hostname should be resolved to a Plesk server IP address. If a hostname is unknown, contact your service provider for assistance, or use any domain you own, which points to this server.
-
Connect to the Plesk server via SSH and check that the server hostname is configured in mail server configuration:
Note: To find out which mail server is in use, go to Tools & Settings > Mail Server Settings > Installed mail server
-
If Postfix is used as a mail server:
2.1. Make sure that the
myhostname
parameter is commented with the hash symbol "#" or has a fully qualified domain name:# grep "myhostname =" /etc/postfix/main.cf
#myhostname = localhost.localdomainOR
# grep "myhostname =" /etc/postfix/main.cf
myhostname = server.example.com2.2. If the file
/etc/mailname
exists, make sure a correct server hostname is defined in it:# cat /etc/mailname
server.example.com -
If QMail is used as a mail server:
2.1. Open/create the file
/var/qmail/control/me
in a text editor. In this example, we are using the "vi" editor:# vi /var/qmail/control/me
2.2. Put the same hostname as on step 1:
CONFIG_TEXT: server.example.com
2.3. Restart QMail:
# service qmail restart
-
-
Verify that the server hostname has been changed:
# hostnamectl status | grep 'Static hostname'
Static hostname: localhost.localdomainIf the hostname is still incorrect, change it manually with the command:
# hostnamectl set-hostname server.example.com
-
If the server IP address was blacklisted, contact blacklist owners and report that the hostname has been changed to FQDN. Visit this KB article for details:
Comments
0 comments
Please sign in to leave a comment.