Good afternoon Gentlemen,
I have a question regarding /etc/hosts for CentOS 6 x64. I already have a hostname set on my server, however there are 10 additional IP aliases assigned to the box, one which I plan to use as a mail server. The mail server will be serving mail for a completely different domain (different then the default hostname of my box). My question is this: If I take one of my additional IP addresses and bind it to postfix for mail, do I also have to specify the remote IP and mail server hostname in /etc/hosts?
For example my hosts looks something like this 127.0.0.1 localhost
Can I add? 66.x.x.x mail.foo.bar
Is this even necessary?
Am 08.11.2011 18:23, schrieb Jonathan Vomacka:
Good afternoon Gentlemen,
I have a question regarding /etc/hosts for CentOS 6 x64. I already have a hostname set on my server, however there are 10 additional IP aliases assigned to the box, one which I plan to use as a mail server. The mail server will be serving mail for a completely different domain (different then the default hostname of my box). My question is this: If I take one of my additional IP addresses and bind it to postfix for mail, do I also have to specify the remote IP and mail server hostname in /etc/hosts?
For example my hosts looks something like this 127.0.0.1 localhost
Can I add? 66.x.x.x mail.foo.bar
Is this even necessary?
not if your dns-servers on LAN and WAN are configured right and if this is not the case you must not run a public mailserver
Reindl,
To my knowledge, all that needs to be configured is A records, MX records, and SPF records (along with correlating PTR's). This is a whole other subject and I feel I will have this correctly configured. My fear is that someone will send email out from my server, and the hostname might come back as my systems host INSTEAD of the mail server hostname.
Is it good measure to add it to the hosts file anyway or is this a waste of time? I guess my understanding of the host file is clouded.
On 11/8/2011 12:50 PM, Reindl Harald wrote:
Am 08.11.2011 18:23, schrieb Jonathan Vomacka:
Good afternoon Gentlemen,
I have a question regarding /etc/hosts for CentOS 6 x64. I already have a hostname set on my server, however there are 10 additional IP aliases assigned to the box, one which I plan to use as a mail server. The mail server will be serving mail for a completely different domain (different then the default hostname of my box). My question is this: If I take one of my additional IP addresses and bind it to postfix for mail, do I also have to specify the remote IP and mail server hostname in /etc/hosts?
For example my hosts looks something like this 127.0.0.1 localhost
Can I add? 66.x.x.x mail.foo.bar
Is this even necessary?
not if your dns-servers on LAN and WAN are configured right and if this is not the case you must not run a public mailserver
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Is it good measure to add it to the hosts file anyway or is this a waste of time? I guess my understanding of the host file is clouded.
Yes, waste of time. It's all in how you've configured postfix to handle it. The default is to the FQDN of the server, but I'd suggest you change accordingly (ie: myhostname).
Am 08.11.2011 18:53, schrieb Jonathan Vomacka:
Reindl,
To my knowledge, all that needs to be configured is A records, MX records, and SPF records (along with correlating PTR's). This is a whole other subject and I feel I will have this correctly configured. My fear is that someone will send email out from my server, and the hostname might come back as my systems host INSTEAD of the mail server hostname.
Is it good measure to add it to the hosts file anyway or is this a waste of time? I guess my understanding of the host file is clouded
the host-file is simply the same as DNS in both directions and does nothing than resolve name/ip locally, normally not needed but maybe a good idea to make sure servers like httpd starts even if no dns is reachable at this moment because httpd refuses to start if he can not resolve his own name
Okay so the host file only allows system applications to understand what IP's are bound to a specific host, but in actuality, DNS has to be setup correctly in terms of a public server.
Is my understanding is correct now, then I think I am good to go. Thanks for all your help who responded to this thread Gentlemen.
On 11/8/2011 1:06 PM, Reindl Harald wrote:
Am 08.11.2011 18:53, schrieb Jonathan Vomacka:
Reindl,
To my knowledge, all that needs to be configured is A records, MX records, and SPF records (along with correlating PTR's). This is a whole other subject and I feel I will have this correctly configured. My fear is that someone will send email out from my server, and the hostname might come back as my systems host INSTEAD of the mail server hostname.
Is it good measure to add it to the hosts file anyway or is this a waste of time? I guess my understanding of the host file is clouded
the host-file is simply the same as DNS in both directions and does nothing than resolve name/ip locally, normally not needed but maybe a good idea to make sure servers like httpd starts even if no dns is reachable at this moment because httpd refuses to start if he can not resolve his own name
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Jonathan Vomacka wrote: <snip>
Is my understanding is correct now, then I think I am good to go. Thanks for all your help who responded to this thread Gentlemen.
<snip> *sigh* There are women on this list, also - Margaret Doll comes to mind, though many folks of both sexes are lurkers, so addressing the list as "Gentlemen" is inappropriate.
mark "gentleman? No, neither by breeding nor act of Congress"
Reindl Harald wrote:
Am 08.11.2011 18:53, schrieb Jonathan Vomacka:
Reindl,
To my knowledge, all that needs to be configured is A records, MX records, and SPF records (along with correlating PTR's). This is a whole other subject and I feel I will have this correctly configured. My fear is that someone will send email out from my server, and the hostname might come back as my systems host INSTEAD of the mail server hostname.
Is it good measure to add it to the hosts file anyway or is this a waste of time? I guess my understanding of the host file is clouded
the host-file is simply the same as DNS in both directions and does nothing than resolve name/ip locally, normally not needed but maybe a good idea to make sure servers like httpd starts even if no dns is reachable at this moment because httpd refuses to start if he can not resolve his own name
also refer to /etc/resolv.conf this file tells the system where to go for hostname lookups - as mentioned, if dns is unavailable during boot some things can get lost.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos