CSF Alert, How to Change Hostname in Email and Sender Address
Posted: 21 Jun 2016, 20:26
This is happening to me on 2 non-cpanel servers that we're running. Basically the title of the email reads something like: lfd on localhost.localdomain
How do we get localhost.localdomain to be the actual hostname of the server?
We have our hostname attached to each IP in /etc/hosts. On 1 server, the sending email is showing: root@ourdomain.com, but for some reason the other one is still: root@localhost.localdomain
These servers are configured basically identically, both running CentOS 7, both setup side by side at the same time. I have no idea where they are handling this differently but we manage enough servers I have to get the title and sending email corrected.
On all of our cpanel servers the emails read LFD on myserver.mydomain.com, etc. I compared CSF configurations and our host file and can't find any differences here, so it must be handled somewhere else. We haven't messed with the email templates on any of these servers. Can anyone point me to where CSF pulls the domain in the title, and where the domain in the sender's address is pulled from, since that part works on 1 server but not on the other and they're configured identically.
How do we get localhost.localdomain to be the actual hostname of the server?
We have our hostname attached to each IP in /etc/hosts. On 1 server, the sending email is showing: root@ourdomain.com, but for some reason the other one is still: root@localhost.localdomain
These servers are configured basically identically, both running CentOS 7, both setup side by side at the same time. I have no idea where they are handling this differently but we manage enough servers I have to get the title and sending email corrected.
On all of our cpanel servers the emails read LFD on myserver.mydomain.com, etc. I compared CSF configurations and our host file and can't find any differences here, so it must be handled somewhere else. We haven't messed with the email templates on any of these servers. Can anyone point me to where CSF pulls the domain in the title, and where the domain in the sender's address is pulled from, since that part works on 1 server but not on the other and they're configured identically.