• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved It is impossible to detect the FQDN of the host

Louise

New Pleskian
Hi Guys,
I'm trying to find a solution to this simple problem

plesk sendmail[5229]: It is impossible to detect the FQDN of the host. Please make sure that the host name is correctly specified in /etc/hosts and goes right after the host's IP address. Depending on your OS, you might need to set the host name in /etc/HOSTNAME or /etc/hostname.

This is what I have below in my /etc/hosts file

127.0.0.1 subdomain.domain.co.uk subdomain localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 subdomain.domain.co.uk subdomain localhost localhost.localdomain localhost6 localhost6.localdomain6
xxx.xx.xxx.xx vps401165-1
xxx.xx.xxx.xx subdomain.domain.co.uk subdomain

OS is Centos

any help will be appriciated
 
vps401165-1

Should

xxx.xx.xxx.xx subdomain.domain.co.uk subdomain

be above

xxx.xx.xxx.xx vps401165-1
 
if xxx.xx.xxx.xx is the same IP address, it should be in the same line and the additional line should be removed. Still asking for the output of
# hostname
It should either deliver an error message of the host name.
 
Doing hostname, brings back the following

[root@vps401165-1 ~]# hostname
vps401165-1
[root@vps401165-1 ~]

I've put them both on the same line as they are both the same IP

any other suggestions
 
You are all set. Restart the mail service(s) and check whether the error message is still being displayed.
 
thanks for your help so far however in the maillog im still getting

I have restarted all mail services that I can see

vps401165-1 plesk sendmail[27699]: Canonname is not correct fqdn
vps401165-1 plesk sendmail[27699]: It is impossible to detect the FQDN of the host.#012Please make sure that the host name is correctly specified in /etc/hosts and goes right after the host's IP address.#012Depending on your OS, you might need to set the host name in /etc/HOSTNAME or /etc/hostname.
vps401165-1 plesk sendmail[27699]: Unable to retrieve hostname. Use localhost.localdomain instead.

Current hosts file

127.0.0.1 subdomain.domain.co.uk subdomain localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 subdomain.domain.co.uk subdomain localhost localhost.localdomain localhost6 localhost6.localdomain6
xxx.xx.xxx.xx vps401165-1 subdomain.domain.co.uk subdomain

any other suggestions?
 
Could you please try to change the order of the host names in the IPv4-line xxx.xx.xxx.xx, e.g.
Now: xxx.xx.xxx.xx vps401165-1 subdomain.domain.co.uk subdomain
Change to: xxx.xx.xxx.xx subdomain.domain.co.uk subdomain vps401165-1
@UFHH01 had pointed out to me that vps401165-1 is no fully qualified domain name, but I did not pay attention to it until now, because we are running similar configurations, however the FQDN is following the IPV4 address, not the short name. So probably the order must be changed as described here.
 
Back
Top