2

I found one tutorial on setting up sendmail that says that in the /etc/hosts file, "The entry for 127.0.0.1 must always be followed by the fully qualified domain name (FQDN) of the server." Like so:

127.0.0.1 bigboy.my-site.com localhost.localdomain localhost bigboy

(This tutorial is here).

However, I can't find anyone else suggesting something like that. instead most people seem to put some combination of localhost and localdomain.localhost after 127.0.0.1, and then some variant of the fully qualified domain name after the public ip address.

What is the correct way?

1 Answers1

1

The correct way is to put the hostname after the address you want to resolve it as. This usually means the external address unless you have good reason to use the loopback address instead.

Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84
  • So, do you know if for the purposes of sendmail there is a good reason to use the loopback address ... as the reference I cited seems to suggest? –  May 12 '10 at 11:26
  • The only reason to use it would be because the external address keeps changing since it's dynamically allocated. If this is not true then the external address should be used. – Ignacio Vazquez-Abrams May 12 '10 at 12:09