PDA

View Full Version : hosts file default option



Easgs
21-Sep-2013, 03:02
I have a doub about configuring suse for zimbra

in dns the mx record for the server is mail.sienic.site with A record mail 192.168.1.11, but in the hosts file suse setup the real hostname of the server in the hosts file as follow:

127.0.0.1 localhost
192.168.1.11 server03.sienic.site server03

(server03 is the real name of the server in /etc/hostname)

instead of

127.0.0.1 localhost
192.168.1.11 mail.sienic.site mail

in this scenario what would be the correct form of the hosts file?

the other thing is tha zimbra requires the first line to be

127.0.0.1 localhost.localdomain localhost

but suse default is

127.0.0.1 localhost

is ok to change to meet zimbra requirements or it will break things?

ab
21-Sep-2013, 05:37
On 09/20/2013 08:04 PM, Easgs wrote:
>
> I have a doub about configuring suse for zimbra
>
> in dns the mx record for the server is mail.sienic.site with A record
> mail 192.168.1.11, but in the hosts file suse setup the real hostname of
> the server in the hosts file as follow:
>
> 127.0.0.1 localhost
> 192.168.1.11 server03.sienic.site server03
>
> (server03 is the real name of the server in /etc/hostname)
>
> instead of
>
> 127.0.0.1 localhost
> 192.168.1.11 mail.sienic.site mail
>
> in this scenario what would be the correct form of the hosts file?

So... change the server's hostname? I'm a little surprised any of this
matters locally, but bad coding practices of applications are common so
maybe this really is normal for some strange reason.

> the other thing is tha zimbra requires the first line to be
>
> 127.0.0.1 localhost.localdomain localhost
>
> but suse default is
>
> 127.0.0.1 localhost
>
> is ok to change to meet zimbra requirements or it will break things?

Sure, just add it on in there. Again, it's pretty weird to me that an
application would care much about the hostname or dnsname assigned to
resolve to the local system, especially since that will only ever be used
locally ans 127.x.x.x always resolve to the local system, but who knows
what kind of odd requirements applications may program into themselves.

Good luck.

jmozdzen
25-Sep-2013, 12:51
Hi Easgs,

I have a doub about configuring suse for zimbra

in dns the mx record for the server is mail.sienic.site with A record mail 192.168.1.11, but in the hosts file suse setup the real hostname of the server in the hosts file as follow:

127.0.0.1 localhost
192.168.1.11 server03.sienic.site server03

(server03 is the real name of the server in /etc/hostname)

instead of

127.0.0.1 localhost
192.168.1.11 mail.sienic.site mail

in this scenario what would be the correct form of the hosts file?

You left out two important parts of the scenario:

1. Does your server use it's DNS server for name resolution, too?

Resolving "mail.sienic.site" to an IP address can be done via DNS (you've got the appropriate record set up), so there's no need to add that info to /etc/hosts as well - if you server uses it's DNS server for name resolution (which it should).

2. Do you experience problems due to the host name variation?

It is not uncommon to name a server ("hostname") differently from it's DNS name, and many servers even have multiple DNS names. So unless Simbra *requires* the host name to be identical to the DNS name, you shouldn't be in trouble. Sometimes default values for some configuration items are derived from the host name, but as you are aware of the potential difference, it should be easy for you to spot such configuration items and change them accordingly.


the other thing is tha zimbra requires the first line to be

127.0.0.1 localhost.localdomain localhost

but suse default is

127.0.0.1 localhost

is ok to change to meet zimbra requirements or it will break things?

I see no problem in adding this additional name in /etc/hosts. BTW, if you have more servers/hosts requiring such additions, you might look into adding these (common) name resolutions to you DNS.

Regards,
Jens