Environment: CentOS, Postfix, Dovecot, Digital Ocean droplet
My /etc/hosts
file contains these lines.
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 example.com example
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4
# The following lines are desirable for IPv6 capable hosts
::1 example.com example
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
Question: After I install a Postfix mail server do I need to add mail.example.com
to the first line in the IPv4 and IPv6 sections? If I do does it matter what order the hosts are listed in?
For example,
127.0.0.1 example.com example mail.example.com
Addendum: These comments are at the top of the hosts
file. Not sure if they mean anything in this instance because when I edit this file the changes appear to persist.
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data