How to replace "localhost.localdomain" after installation — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberLoader

How to replace "localhost.localdomain" after installation

Hello,

How to correctly replace "localhost.localdomain" after installation.

So far I ran the following commands to replace the localhost.localdomain with mail.mydomain.com

# cat /etc/hostname
# hostnamectl set-hostname mail.mydomain.com
# hostnamectl

All looks fine, however there is a problem because mail-tester.com is now telling me,

Your IP address xx.xxx.xxx.xx is associated with the domain mail.mydomain.com.
Nevertheless your message appears to be sent from localhost.localdomain.

You may want to change your pointer (PTR type) DNS record and the host name of your server to the same value.

Here are the tested values for this check:
IP: xx.xxx.xxx.xx
HELO: localhost.localdomain
rDNS: mail.mydomain.com

I replaced the above IP and domain for privacy.

I also found this file.
/etc/hosts

Contents are,
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Maybe I should replace localhost.localdomain in here too ? It looks as if I just need to get the HELO: Updated ?

I don't want to guess or take any chances, I've already made a mess of this server twice this week, third time lucky I hope!

Any help would be very much appreciated :)

Comments

  • Reinstalled system once again this time upon setup changed the localhost.localdomain to mail.mydomain.com.

    Email still reports as,

    Here are the tested values for this check:
    IP: xx.xxx.xxx.xx
    HELO: localhost.localdomain
    rDNS: mail.mydomain.com

    Either there is a bug or I am misunderstanding something ??
  • Ok so I reissued SSL yesterday, as of today I see correct host is now resolved :)
  • You just needed to do -> https://cyberpanel.net/docs/2-ssl-for-postfix-dovecot/
  • Type your comment> @usmannasir said:
    > You just needed to do -> https://cyberpanel.net/docs/2-ssl-for-postfix-dovecot/

    Any manual methode to change ssl for postfix and dovecot? Im using wildcard ssl like Sectigo and if i reissued ssl for email server i got error selfsign ssl. I got rare limited ssl for letsencrypt btw. Please help for this error specially we are using custom ssl wildcard.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!