• 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 Best /etc/hosts configuration

SalvadorS

Regular Pleskian
Server operating system version
Debian
Plesk version and microupdate number
18.0.45
Hello,

When I send a mail to a gmail account, if I check the headers of the mail in gmail I see this:

Received: from webmail.domain.com (localhost [IPv6:::1]) by server.domain.com (Postfix) (where domain.com and server.domain.com is the name of the domain and the name of the server)

But I want to know if this: (localhost [IPv6:::1])

Is correct, as my server don´t have IPv6 I don´t know if this line is a best practice to send mail. This is my /etc/host:


127.0.0.1 localhost
x.x.x.x server.domain.com server

# The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


I don´t know if the line ::1 localhost ip6-localhost ip6-loopback is correct or I have to change/comment it...

Thanks
 
There is no need to modify your hosts file. Just leave it as it is.

When you send a mail using webmail, the webmail will connect to Postfix via the loopback address to submit the mail. Your system has a loopback IPv4 and IPv6 address even when you're not using IPv6 for your public IP address.

IPv6 is preferred by most systems nowadays, so your webmail will connect to Postfix over the IPv6 loopback address and thus, you'll see that IPv6 connection in your headers. That's completely normal and expected (and correct) behaviour.

No need to change anything there.
 
Back
Top