Symptoms
-
Plesk Email Security displays RDNS config in red:
-
PTR record is properly configured and resolves to server hostname:
# host 203.0.113.2
2.113.0.203.in-addr.arpa domain name pointer plesk.example.com# host plesk.example.com
plesk.example.com has address 203.0.113.2 -
When running the command below, wrong public IP or localhost address is displayed:
# plesk php -r “var_dump(gethostbynamel(‘<server_hostname>’));”
array(2) {
[0]=>
string(9) “127.0.0.1”
[1]=>
string(13) “203.0.114.3”
}
Cause
Plesk Email Security is checking RDNS for the server at the wrong IP address. One or several IP addresses have been added manually in /etc/hosts
for plesk.example.com:
# grep plesk.example.com /etc/hosts
127.0.0.1 plesk.example.com
203.0.114.3 plesk.example.com
Resolution
-
Connect to the server via SSH.
-
Open
/etc/hosts
file in any text editor and comment lines with the server hostname and wrong public IP address:#127.0.0.1 plesk.example.com
#203.0.114.3 plesk.example.com