Wow! What a great bunch of responses! I've received 14 so far and they
still seem to be coming in. The original question can be found a the
To summarize, there are two schools of thought in regard to aliasing a host
name. One route is to do it at the NIS level, modifying NIS tables and
sendmail.cf. The other route is at the DNS level modifying DNS tables.
I'll summarize both routes.
I forgot to specify in my original question; Yes, I'm running NIS and yes,
we`re using DNS, but we`re not the authoritative server. I tried the DNS
approach but my changes didn't seem to have any effect so I ended up using
the NIS approach. In the following examples I am aliasing a virtual
machine called northpole to a real machine called wayback. I am also
aliasing santa to my user name.
Here's the NIS approach:
(i.) Add the northpole as an additional parameter in the hosts
126.96.36.199 wayback loghost mailhost northpole #Sun 4/280 File Server
(ii.) Add alias for user (Santa in our case) to alias
# Santa Mail List
(iii.) Add line to sendmail configuration file (/etc/sendmail.cf).
That is how you tell sendmail about 'nicknames' to accept. Apparently
without this line, sendmail rejects the hostname and NIS is never
(iv.) Don`t forget to ypmake the NIS tables and HUP the sendmail!
# cd /var/yp
# ps -aux |grep sendmail
root 101 0.0 0.0 104 0 ? IW Dec 11 0:02 /usr/lib/sendmail -bd
# kill -HUP 101
That's it! That's all there is to it!
Here's the DNS approach:
(i.) Add the following line to your DNS database (in our case
wayback IN A 188.8.131.52
northpole IN CNAME wayback
This says 'northpole is a Canonical Name for wayback
(ii.) Add line to /etc/hosts as stated in NIS approach.
(iii.) Don't forget to ypmake and HUP named.
Alternative DNS approach:
Several people suggested using the MX record type instead of CNAME.
I'll let you read the man pages on MX yourselves so as not to
propagate my personal misunderstanding of the record tape. :-)
Here are all of the people who responed, in order of response.
Many thanks to all of you!!!
| _/ _/ _/_/_/_/ _/_/_/ _/_/_/_/ | Dan Penrod - Unix Administrator |
| _/ _/ _/ _/ _/ | USGS Center for Coastal Geology |
| _/ _/ _/_/_/_/ _/ _/_/ _/_/_/_/ | St. Petersburg, FL 33701 |
| _/ _/ _/ _/ _/ _/ | (813)893-3100 ext.3043 |
|_/_/_/_/ _/_/_/_/ _/_/_/_/ _/_/_/_/ | email@example.com |
>Is it possible to mail alias host names. For instance, my real address is:
>If I want to people to be able to mail to a different user name, like my
>first name for instance:
>It's a simple matter of creating an alias in /etc/aliases, but suppose I
>want people to be able to mail to a host name that doesn't exist:
> santa@northpole ;-)
>Can I do this??? I'm not very concerned with domain; I only need this to
>work on our local network.
>I tried modifying the /etc/hosts table by adding an entry with the same
>ip address as my host but this did not work. Example:
> 184.108.40.206 whiplash
> 220.127.116.11 northpole
>I also tried adding it as a second parameter in the host file...
> 18.104.22.168 whiplash northpole
>Neither attempt worked. :-(
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:34 CDT