Here is an example of changing the hostname in Linux.
First, switch to the root user or add “sudo” before the commands.
Let’s see the current hostname:
Vyacheslav Gapon – personal blog, manuals, articles, notes, development
Here is an example of changing the hostname in Linux.
First, switch to the root user or add “sudo” before the commands.
Let’s see the current hostname:
I noticed once on one server that Postfix does not always send mail, the logs had the following error:
warning: host NAME[192.168.5.5]:25 greeted me with my own hostname NAME
After seeing the host name:
hostname -f
Found that it is not correct and coincides with that on which the mail is sent!
Changed the host name to the correct one in the following files (in the nano editor Ctrl+X to exit, y/n to save or cancel changes):
sudo nano /etc/hostname sudo nano /etc/postfix/main.cf sudo nano /etc/hosts
Done, after that the error did not appear and the mail was successfully delivered.