resolv.conf
specifies the nameservers for resolver lookups, where it will actually use the DNS protocol for resolving the hostnames.
Typically the hosts
file is used for administrative purposes, such as backend and internal functions, which is substantially more isolated in scope, as only the local server will reference it.
/etc/nsswitch.conf
specifies the lookup order with the hosts
entry.
If this does not answer your question, please clarify further.
Look at the following manpages:
HOSTS(5)
RESOLVER(5)
EDIT: seems like you are talking about mail aliases.
Look into /etc/aliases
or /etc/mail/aliases
. After editing that file, run newaliases
I do not believe that Sendmail
has transport map capabilities, at least not that i know of.
The feature you are looking for is available in Postfix
out of the box. Not sure how much this answer would help you though...
There used to be a package called redhat-switchmail
that kind of accomplished that, but I am not sure if it is still available, or if its even compatible with your system.
/etc/mail/local-host-names
is just for that... local host names... the domains your sendmail server accepts mail for.
What exactly you want to accomplish with /etc/hosts
I am not sure...
Depending on your configuration and version of your Sendmail
, you need to edit /etc/mail/sendmail.mc
and then "make it" into /etc/mail/sendmail.cf
. On older versions, you edit /etc/mail/sendmail.cf
, but i do not suggest you touch either one of those files if you do not know what you are doing. They are pretty cryptic, to say the least.
Best Answer
In short, not that I know of. Most programs use standard system calls for any name resolution and leave the details to the OS.
Now, if you're concerned about people/programs changing file contents, take a look at the
chattr
command. You can set files such that they can't be overwritten without removing the immutable flag first. It's highly unlikely any program will be written to do that.